summaryrefslogtreecommitdiff
path: root/tool
AgeCommit message (Collapse)Author
2020-07-12sync_default_gems.rb: Added -e option to edit when conflictedNobuyoshi Nakada
2020-07-10Show messages around the line when replacing failed in format_changelogKazuhiro NISHIYAMA
2020-07-10Make sure vm_call_cfunc uses inlined ccTakashi Kokubun
which is checked by the first guard. When JIT-inlined cc and operand cd->cc are different, the JIT-ed code might wrongly dispatch cd->cc even while class check is done with another cc inlined by JIT. This fixes SEGV on railsbench.
2020-07-06tool/sync_default_gems.rb: Accept multiple commit rangesNobuyoshi Nakada
2020-07-05tool/sync_default_gems.rb: Added bigdecimalNobuyoshi Nakada
2020-07-05Skip comment and empty lines in gems/bundled_gems fileNobuyoshi Nakada
2020-07-05fix up Primitive.cinit! codeKoichi Sasada
Recent changes break Primitive.cinit!(c_code) so fix it.
2020-07-04Check ROBJECT_EMBED on guards-merged ivar accessTakashi Kokubun
Fix CI failure like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3043247 introduced by a69dd699ee630dd1086627dbca15a218a8538b6f
2020-07-04support all locals for cexpr!, cstmt!Koichi Sasada
Primitve.cexpr! and .cstmt! can access Ruby's parameter and *local variables* (note that local parameters are also local variables). However recent changes only allow to access parameters. This patch fix it. For example, the following code can work: def foo a, b, k: :kw, **kwrest c = a + b d = k e = kwrest p Primitive.cstmt!(%q(rb_p(rb_ary_new_from_args(5, a, b, c, d, e)); return Qnil;)) end
2020-07-03Merge ivar guards on JIT (#3284)Takashi Kokubun
when an ISeq has multiple ivar accesses. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2020-07-03Use ID instead of GENTRY for gvars. (#3278)Koichi Sasada
Use ID instead of GENTRY for gvars. Global variables are compiled into GENTRY (a pointer to struct rb_global_entry). This patch replace this GENTRY to ID and make the code simple. We need to search GENTRY from ID every time (st_lookup), so additional overhead will be introduced. However, the performance of accessing global variables is not important now a day and this simplicity helps Ractor development. Notes: Merged-By: ko1 <ko1@atdot.net>
2020-07-02Expose `assert_pattern_list` for drb test with test-unit gem.Hiroshi SHIBATA
2020-06-30Extract correct processor name for ARM64 MacsSamuel Giddins
Notes: Merged: https://github.com/ruby/ruby/pull/3272
2020-06-28Calculate header line count instead of hardcodingNobuyoshi Nakada
2020-06-28Replace separators in input file name in header tooNobuyoshi Nakada
2020-06-28Replace ALT_SEPARATOR with SEPARATOR also in output file nameNobuyoshi Nakada
To suppress warnings by Visual C. ``` ./integer.rb(5) : warning C4129: 'i' : unrecognized character escape sequence ./kernel.rb(21) : warning C4129: 'k' : unrecognized character escape sequence ```
2020-06-25Show what's inlined first in "JIT inline" logTakashi Kokubun
and add a debug log
2020-06-25Decide JIT-ed insn based on cached cfuncTakashi Kokubun
for opt_* insns. opt_eq handles rb_obj_equal inside opt_eq, and all other cfunc is handled by opt_send_without_block. Therefore we can't decide which insn should be generated by checking whether it's cfunc cc or not. ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4 before --jit: ruby 2.8.0dev (2020-06-26T05:21:43Z master 9dbc2294a6) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-06-26T06:30:18Z master 75cece1b0b) +JIT [x86_64-linux] last_commit=Decide JIT-ed insn based on cached cfunc Calculating ------------------------------------- before --jit after --jit mjit_nil?(1) 73.878M 74.021M i/s - 40.000M times in 0.541432s 0.540391s mjit_not(1) 72.635M 74.601M i/s - 40.000M times in 0.550702s 0.536187s mjit_eq(1, nil) 7.331M 7.445M i/s - 8.000M times in 1.091211s 1.074596s mjit_eq(nil, 1) 49.450M 64.711M i/s - 8.000M times in 0.161781s 0.123627s Comparison: mjit_nil?(1) after --jit: 74020528.4 i/s before --jit: 73878185.9 i/s - 1.00x slower mjit_not(1) after --jit: 74600882.0 i/s before --jit: 72634507.6 i/s - 1.03x slower mjit_eq(1, nil) after --jit: 7444657.4 i/s before --jit: 7331304.3 i/s - 1.02x slower mjit_eq(nil, 1) after --jit: 64710790.6 i/s before --jit: 49449507.4 i/s - 1.31x slower ```
2020-06-23Avoid generating opt_send with cfunc cc with JITTakashi Kokubun
only for opt_nil_p and opt_not. While vm_method_cfunc_is is used for opt_eq too, many fast paths of it don't call it. So if it's populated, it should generate opt_send, regardless of cfunc or not. And again, opt_neq isn't relevant due to the difference in operands. So opt_nil_p and opt_not are the only variants using vm_method_cfunc_is like they use. ``` $ benchmark-driver -v --rbenv 'before2 --jit::ruby --jit;before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4 before2 --jit: ruby 2.8.0dev (2020-06-22T08:37:37Z master 3238641750) +JIT [x86_64-linux] before --jit: ruby 2.8.0dev (2020-06-23T01:01:24Z master 9ce2066209) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-06-23T06:58:37Z master 17e9df3157) +JIT [x86_64-linux] last_commit=Avoid generating opt_send with cfunc cc with JIT Calculating ------------------------------------- before2 --jit before --jit after --jit mjit_nil?(1) 54.204M 75.536M 75.031M i/s - 40.000M times in 0.737947s 0.529548s 0.533110s mjit_not(1) 53.822M 70.921M 71.920M i/s - 40.000M times in 0.743195s 0.564007s 0.556171s mjit_eq(1, nil) 7.367M 6.496M 7.331M i/s - 8.000M times in 1.085882s 1.231470s 1.091327s Comparison: mjit_nil?(1) before --jit: 75536059.3 i/s after --jit: 75031409.4 i/s - 1.01x slower before2 --jit: 54204431.6 i/s - 1.39x slower mjit_not(1) after --jit: 71920324.1 i/s before --jit: 70921063.1 i/s - 1.01x slower before2 --jit: 53821697.6 i/s - 1.34x slower mjit_eq(1, nil) before2 --jit: 7367280.0 i/s after --jit: 7330527.4 i/s - 1.01x slower before --jit: 6496302.8 i/s - 1.13x slower ```
2020-06-22Compile opt_send for opt_* only when cc has ISeqTakashi Kokubun
because opt_nil/opt_not/opt_eq populates cc even when it doesn't fallback to opt_send_without_block because of vm_method_cfunc_is. ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4 before --jit: ruby 2.8.0dev (2020-06-22T08:11:24Z master d231b8f95b) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-06-22T08:53:27Z master e1125879ed) +JIT [x86_64-linux] last_commit=Compile opt_send for opt_* only when cc has ISeq Calculating ------------------------------------- before --jit after --jit mjit_nil?(1) 54.106M 73.693M i/s - 40.000M times in 0.739288s 0.542795s mjit_not(1) 53.398M 74.477M i/s - 40.000M times in 0.749090s 0.537075s mjit_eq(1, nil) 7.427M 6.497M i/s - 8.000M times in 1.077136s 1.231326s Comparison: mjit_nil?(1) after --jit: 73692594.3 i/s before --jit: 54106108.4 i/s - 1.36x slower mjit_not(1) after --jit: 74477487.9 i/s before --jit: 53398125.0 i/s - 1.39x slower mjit_eq(1, nil) before --jit: 7427105.9 i/s after --jit: 6497063.0 i/s - 1.14x slower ``` Actually opt_eq becomes slower by this. Maybe it's indeed using opt_send_without_block, but I'll approach that one in another commit.
2020-06-21Verify builtin inline annotation with VM_CHECK_MODE (#3244)Takashi Kokubun
* Verify builtin inline annotation with VM_CHECK_MODE * Remove static to fix the link issue on MJIT Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2020-06-21Prefer ruby_install_name as runnerNobuyoshi Nakada
`Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has the transformed basename.
2020-06-20Introduce Primitive.attr! to annotate 'inline' (#3242)Takashi Kokubun
[Feature #15589] Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2020-06-19[Feature #16254] Allow `Primitive.func` styleNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3165
2020-06-19[Feature #16254] Allow `__builtin.func` styleNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3165
2020-06-19Removed sdbm entries from toolchaninsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3234
2020-06-17Remove obsoleted opt_call_c_function insn (#3232)Takashi Kokubun
* Remove obsoleted opt_call_c_function insn * Keep opt_call_c_function with DEFINE_INSN_IF Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2020-06-15Prefer String#each_byte when using a blockNobuyoshi Nakada
2020-06-15tool/lib/minitest/unit.rb: Reproducible shuffle of test suitesYusuke Endoh
... based on CRC32 of names of the test suites. Formerly, `make test-all` randomized the order of the test suites by using `Array#shuffle`. It also shows `--seed N` to reproduce the order, but it was not reproducible when a suite set is different. This change sorts the suites by CRC32 hash of the suite names with a salt generated by the seed.
2020-06-15A help message to `tool/sync_default_gems.rb`David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/3223
2020-06-14Support arguments of singleton methodNobuyoshi Nakada
2020-06-14Fixed up rest, keywords, keyword rest and block argumentsNobuyoshi Nakada
2020-06-13Make __builtin_cexpr! and __builtin_cstmt! work againTakashi Kokubun
with Ripper. a3e6f52c17061f012c4e638b3343b57752ed7603 introduced __builtin_cexpr! and __builtin_cstmt!, but nobody has used them and then they broke on 79292b30884ebcd8be028a7f3c9ccafd7759f2ae by undefined `params`. This patch fixes the undefined `params`, but still we're not using them yet.
2020-06-13Added install-dbgNobuyoshi Nakada
Scripts to run the interpreter via debugger.
2020-06-05[rubygems/rubygems] Test against compact_index 0.13.0David Rodríguez
https://github.com/rubygems/rubygems/commit/9f15b595ab Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Bump compact_index to 0.12.1David Rodríguez
https://github.com/rubygems/rubygems/commit/08374d0e4a Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-04Update leaked-globals [Bug #16934]Nobuyoshi Nakada
* match uppercase types which would be global, other than [BDT] * ignore `RUBY_` prefixed symbols
2020-06-03Fixed up 56ca006784dNobuyoshi Nakada
Run lldb just before sending ABRT or KILL signal. Some tests terminate child processes by TERM signal intentionally.
2020-06-02run lldb to investigate the stuck process.Koichi Sasada
Before sending signals (ABRT, KILL), use lldb to show the backtrace of a stuck process. This commit also reverts recent changes for terminate().
2020-06-01add more 2 sec.Koichi Sasada
After sending SEGV signal, but no response. Try to add 2 more seconds. If we can not have a detailed log, we need to use gdb/lldb to show the backtrace.
2020-06-01send SEGV to show backtrace.Koichi Sasada
send SEGV to terminate the remaining process before sending ABRT and KILL to show the backtrace.
2020-05-30runnable.rb: ignore broken symlink error on Windows [ci skip]Nobuyoshi Nakada
2020-05-28Add a debug_counter for JIT cancel on leaveTakashi Kokubun
2020-05-28Remove Ruby <2.2 support from tool/lib/vcs.rbJeremy Evans
BASERUBY now requires at least Ruby 2.2, so there is no point trying to support older ruby versions here. Notes: Merged: https://github.com/ruby/ruby/pull/2947
2020-05-28Use Module#name instead of #inspectYusuke Endoh
Coverage measurement had failed since 7d5da30c9e9c572f6ef0aaccc1ca0e724966e2ee https://github.com/ruby/actions/runs/708557030?check_suite_focus=true
2020-05-27Don't convert bundler man pages from mdoc to manJeremy Evans
These man pages are already in man format and assuming they are mdoc format breaks things. Fixes [Bug #16823] Notes: Merged: https://github.com/ruby/ruby/pull/3147
2020-05-27test/drb/test_drbssl.rb: skip LeakChecker as openssl keeps /dev/randomYusuke Endoh
and /dev/urandom intentionally. OpenSSL::PKey::RSA.new opens the two random generators and keeps the file descriptors. https://github.com/openssl/openssl/blob/93f99b681ab5a1cf7062053323e09b0cad5ff854/crypto/rand/rand_unix.c#L674 They are detected by the LeakChecker as fd leak, but it is intentional. http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20200526T160005Z.log.html.gz ``` [ 597/20199] DRbTests::TestDRbSSLAry#test_01 = 0.29 s Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 8 #<File::Stat dev=0x6, ino=11, mode=020666, nlink=1, uid=0, gid=0, rdev=0x109, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.751999995 +0000, mtime=2020-05-23 14:45:13.751999995 +0000, ctime=2020-05-23 14:45:13.751999995 +0000> Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 9 #<File::Stat dev=0x6, ino=10, mode=020666, nlink=1, uid=0, gid=0, rdev=0x108, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.755999995 +0000, mtime=2020-05-23 14:45:13.755999995 +0000, ctime=2020-05-23 14:45:13.755999995 +0000> ```
2020-05-27fiddle: need to update configure after updating config toolsNobuyoshi Nakada
2020-05-23extlibs.rb: make symlink only if the target existsNobuyoshi Nakada
2020-05-23Fixed wrong usage rm_rf for cleanup the default gems in sync toolHiroshi SHIBATA