Граф коммитов

1389 Коммитов

Автор SHA1 Сообщение Дата
k0kubun fcd679ed11 Recompile without method inlining
if cancel happens in an inlined method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-16 17:02:35 +00:00
k0kubun d71b78575b Introduce frame-omitted method inlining
for ISeq including only leaf and no-handles_sp insns except leaf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-16 17:02:16 +00:00
k0kubun b0614decfc Implement single-level basic method inlining in JIT
"Basic" means it does not omit a call frame.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-16 17:01:05 +00:00
k0kubun ead870d7c3 Do not require Ruby 2.4 for baseruby
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 13:29:22 +00:00
k0kubun 1222534719 Share optimization cancel handlers
$ benchmark-driver benchmark.yml --rbenv='before --jit;after --jit' -v --output=all --repeat-count=12
before --jit: ruby 2.7.0dev (2019-04-14 trunk 67549) +JIT [x86_64-linux]
after --jit: ruby 2.7.0dev (2019-04-14 trunk 67549) +JIT [x86_64-linux]
last_commit=Share optimization cancel handlers
Calculating -------------------------------------
                                 before --jit           after --jit
Optcarrot Lan_Master.nes    69.55360655447375     74.15329176797863 fps
                            73.74545038318978     79.60903046141544
                            75.85637357897092     82.00930075612054
                            77.10594124022951     82.56228187301674
                            78.67350527368366     83.37512204205953
                            79.97235230767613     83.41521927993719
                            81.03050342478066     84.20227901852776
                            81.61308297895094     84.73733526226468
                            82.06805141753206     85.27884867863791
                            82.46493179193394     85.36558922650367
                            83.85259832896313     85.39993587223481
                            84.02325292922997     85.63649355214602

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 12:25:23 +00:00
k0kubun c5570cf9bd Detect send-compatible opt insns automatically
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 08:53:19 +00:00
k0kubun b75bb06e00 Allow falling back to non-inlined opt_send_without_block
for opt_aref with inline cache to minimize the possibility of JIT cancel.

Also opt_aset and opt_mod are added for the targets.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 08:33:43 +00:00
k0kubun fa13bb1a6f Unify comment styles across MJIT sources
I'm writing `//` comments in newer MJIT code after C99 enablement
(because I write 1-line comments more often than multi-line comments
 and `//` requires fewer chars on 1-line) and then they are mixed
with `/* */` now.

For consistency and to avoid the conversion in future changes, let me
finish the rewrite in MJIT-related code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 05:26:46 +00:00
k0kubun 9b6b4674d7 Recompile JIT-ed code without optimization
based on inline cache when JIT cancel happens by that.

This feature was in the original MJIT implementation by Vladimir, but on
merging MJIT to Ruby it was removed for simplification. This commit adds
the functionality again for the following benchmark:

52f05781f6/concurrent-map/bench.rb
(shown float is duration seconds. shorter is better)

* Before
```
$ INHERIT=0 ruby -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) [x86_64-linux]
--
1.6507579649914987

$ INHERIT=0 ruby -v --jit bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) +JIT [x86_64-linux]
--
1.5091587850474752

$ INHERIT=1 ruby -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) [x86_64-linux]
--
1.6124781150138006

$ INHERIT=1 ruby --jit -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) +JIT [x86_64-linux]
--
1.7495657080435194 # <-- this
```

* After
```
$ INHERIT=0 ruby -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) [x86_64-linux]
last_commit=Recompile JIT-ed code without optimization
--
1.653559010999743

$ INHERIT=0 ruby --jit -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) +JIT [x86_64-linux]
last_commit=Recompile JIT-ed code without optimization
--
1.4738391840364784

$ INHERIT=1 ruby -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) [x86_64-linux]
last_commit=Recompile JIT-ed code without optimization
--
1.645227018976584

$ INHERIT=1 ruby --jit -v bench.rb
ruby 2.7.0dev (2019-04-13 trunk 67523) +JIT [x86_64-linux]
last_commit=Recompile JIT-ed code without optimization
--
1.523708809982054 # <-- this
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 04:52:02 +00:00
k0kubun bbb0db6f1c Fix typo in a comment [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 16:03:11 +00:00
nobu b5df5296a4 appveyor.yml: Use pre-generated headers and tables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-06 00:08:04 +00:00
duerst cab005db92 revert r67445, (r67446,) r67447
Debugging output is no longer needed because the problem has been fixed with r67449.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 23:16:00 +00:00
nobu 6e0e93e60e downloader.rb: fix typo, extra %
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 14:44:15 +00:00
nobu aebc11dfe6 downloader.rb: quote base name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 12:44:04 +00:00
duerst 8f734dc7b5 output more debug information in downloader.rb (temporary)
Unicode file download doesn't work with Visual Studio, we need more debug output.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 12:36:29 +00:00
svn f6338966f1 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 10:39:02 +00:00
duerst 7fd8cdf398 add puts statements to debug Unicode file download (temporary)
Unicode file download doesn't work with Visual Studio, see e.g.
https://ci.appveyor.com/project/ruby/ruby/builds/23614399/job/f8vya2l7fjdfcye4
We temporarily produce more output for debugging.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-05 10:39:01 +00:00
nobu 79de8e9f6b downloader.rb: keep linked file newer than cached file
* tool/downloader.rb (Downloader.save_cache): keep linked file
  newer than cached file, so that GNU make triggers when the
  content is updated.  it uses the timestamp of symlink itself
  instead of the target.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 08:08:29 +00:00
k0kubun b03c11a337 Add debug counters for MJIT cancel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-29 13:54:29 +00:00
k0kubun c92c0a5935 Prefer using vm_base_ptr rather than cfp->bp
in MJIT implementation.

This allows us to drop cfp->bp by just modifying vm_base_ptr in the
future.

No performance impact:

$ benchmark-driver benchmark.yml --rbenv='before::before --disable-gems --jit;bp_::after --disable-gems --jit;vm_env_ptr::ruby-svn --disable-gems --jit' -v --output=all --repeat-count=12
before: ruby 2.7.0dev (2019-03-24 trunk 67341) +JIT [x86_64-linux]
bp_: ruby 2.7.0dev (2019-03-24 trunk 67342) +JIT [x86_64-linux]
vm_env_ptr: ruby 2.7.0dev (2019-03-25 trunk 67343) +JIT [x86_64-linux]
last_commit=Prefer using vm_base_ptr rather than cfp->bp
Calculating -------------------------------------
                                       before                   bp_            vm_env_ptr
Optcarrot Lan_Master.nes    77.15059205092646     70.18873044267853     69.62171387083328 fps
                            78.75767783870441     77.49867689173411     75.43496867709587
                            79.60102690369321     77.78037687683523     79.36688927929428
                            80.25144236638835     78.74729849101701     80.42363742291455
                            82.22375417165489     80.44265482494045     80.90287243299306
                            82.29166786292619     80.51740049420938     81.81153053252902
                            83.35386925305345     80.91054205210609     81.93562989125176
                            83.39770634366975     81.34550754145043     82.24544621470430
                            83.88523450309972     81.60698516017347     82.76801860263230
                            84.17553130135879     82.69615943446324     83.02530407910871
                            84.42132328119858     83.00969158037691     83.19968539409922
                            84.60731429793329     83.32703363300098     83.81352746019631

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-25 14:26:11 +00:00
ko1 8dd0fb9039 use cfp->bp more.
cfp->bp was (re-)introduced by Kokubun san, but VM doesn't use it
because I (ko1) want to remove it in a future. But using it make
leave instruction fast because of sp consisntency check.
So now VM uses cfp->bp.

To use cfp->bp, I checked the value and I found that it is not a
"initial value of sp" but a "initial value of ep". Fix this problem
and fix all bp references (this is why bp is renamed to bp_).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-25 06:58:50 +00:00
ko1 c671f836b4 add debug counters to count call cache fastpath.
Add counters to count ccf (call cache fastpath) usage.
These counters will help which kind of method dispatch
is important to optimize.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-22 07:57:26 +00:00
k0kubun 969156ce9a Check argument_arity_error condition in inlinable_iseq_p
to avoid inlining a method call when it becomes argument_arity_error,
fixing a potential bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-21 06:48:00 +00:00
nagachika 9e7f197c8e tool/make-snapshot: Use 6-spaces indent for SIZE and digests
to align with release note markdown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-14 22:43:57 +00:00
nobu d1e6304a89 Prefer relative directory from srcdir to top_srcdir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 05:42:14 +00:00
nobu da1f593aca Skip erb files, idirect prerequisites
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-12 12:31:01 +00:00
nobu 29c9f4a590 Replace versioned Unicode header paths with UNICODE_HDR_DIR
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-12 12:15:30 +00:00
nobu b795f9bd36 make-snapshot: try downloading Unicode files
Remove empty UNICODE_FILES list to update Unicode files like as
r67025, for 2.6 branch.

[Bug #15593]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-09 11:04:09 +00:00
nobu 1616dcb16e make-snapshot: try downloading Unicode files
[Bug #15593]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 09:49:49 +00:00
nobu 74f94b3e6e configure.ac: check finite,isinf,isnan as macros first
[ruby-core:91487] [Bug #15595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 07:22:55 +00:00
nobu 3d1c86a26f Removed moving toplevel header since r12501
Moving public headers was 12-years ago, no depend files would
expect ruby.h in the top source directory now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 02:46:22 +00:00
nobu 910b13fe51 Update Unicode files
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07 12:23:02 +00:00
kazu 58a4153439 tool/test/test_jisx0208.rb: Use `require_relative`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07 06:56:13 +00:00
hsbt 8cca079d3b Fixup r66984. Update the location of bundler gemspec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 10:41:22 +00:00
shyouhei e826b7d39e _leaf_helpers.erb: some functions are not leaf
If a function has rb_warning() that is not a leaf because warning
ultimately is a method call of Warning#warn.

If a function has rb_name_error() that is not a leaf because
NameError is allocated, then initialized.  This of course
involves calling NameError#initialize.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01 04:39:47 +00:00
shyouhei 857bbfd02c _insn_type_chars.erb: use C99
Now that comma at the end of enum is allowed, we can write this much
more straight-forward.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 05:36:17 +00:00
shyouhei e20714062b _insn_operand_info.erb: use C99
Same as r66957.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 05:22:58 +00:00
shyouhei 971f965da9 _insn_len_info.erb: add ASSERT_VM_INSTRUCTION_SIZE
Also previous rb_vm_insn_len_info is now a function static variable.
It seems nobody else is using it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 05:00:41 +00:00
shyouhei 72e318f118 _insn_name_info.erb: use C99
C99 allows string literals of at least 4095 characters (cf: ISO/IEC
9899:1999 section 5.2.4.1) so the previous complex struct layout is no
longer necessary.  Just dump the verbatim memory contents we want.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-31 04:46:03 +00:00
shyouhei 0a5b4c13ad vm.inc now in C99
This changeset modifies the VM generator so that vm.inc is written in
C99.  Also added some comments in _insn_entry.erb so that the
intention of each parts to be made more clear.  I think this improves
overall readability of the generated VM.

Confirmed that the exact same binary is generated before/after this
changeset.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-25 14:09:10 +00:00
hsbt c52ca1f2ff Revert r58345 and r58371.
These changes break the behavior of default gems. Bug #13428 says
  r58345 is reasonable because gemspec file is installed by `to_ruby_for_cache`
  method. But I revert `to_ruby_for_cache` in rbinstall.rb at r58403.
  There is no reason that we apply r58345 now.

  But I'm not sure about gemspec of default gems affects standalone gems.
  I'm going to investigate it on rubygems/rubygems.

  [Bug #15500][ruby-core:90867]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 03:36:22 +00:00
nobu 17aeff3e77 make-snapshot: get rid of circular dependency
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 09:31:32 +00:00
nobu 6b5695fef9 make-snapshot: make permissions uniform
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:52:58 +00:00
nobu 92c6072ef4 rbinstall.rb: add --exclude option for install-nodoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:23:14 +00:00
hsbt f550da512c Removed old gemspecs of default gems for the Ruby committers.
[Bug #12764][ruby-core:77284]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 13:45:48 +00:00
nagachika ad10418eab update redmine-backporter to catch up Redmine 4.0. [ci skip]
tool/redmine-backporter.rb: change revision resource URL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-14 11:04:52 +00:00
kazu e4f46eabab Fix make-snapshot for trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-11 04:58:33 +00:00
k0kubun 56bf732aaf mjit.c: use boolean type for boolean variables
and functions to clarify the intention and make sure it's not used in a
surprising way (like using 2, 3, ... other than 0, 1 even while it seems
to be a boolean).

This is a retry of r66775. It included some typos...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 14:31:18 +00:00
duerst d9699fadf8 simplify filename-related code
(Thanks to Nobuyoshi Nakada for the hint!)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-06 11:41:12 +00:00
duerst b991ccc210 add logic to handle Unicode beta period file names
In downloader.rb, add logic to handle file names of the form
UnicodeData-12.0.0d6.txt. To find the right file, we download
the index of the directory. Then we download the files by finding
the file names from the index. Files are always checked for changes,
because changes might be frequent during the beta period.
We also check whether any index.html files are left when we are not
in the beta period. This would indicate that we might have stale
data from the beta period rather than the actual release data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-06 07:50:18 +00:00