| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Moved this hack mark to an argument to `compile_hash`.
> Bad Hack: temporarily mark hash node with flag so
> compile_hash can compile call differently.
|
| |
|
|
|
|
| |
asked by ko1 to put this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a related VM improvement.
JIT related commits:
* Code size reduction
* Deduplicate functions on JIT compaction 818d6d33368a396d9cd3d1a34a84015a9e76c5c8
* Avoid always inlining cold paths of ivar fcd257629063a345c48ff2d8057fa8ab910881f2
* Inline only fast path of rb_class_of b16a2aa938d091c387a7437d94dac7f7bb829ba2
* Eliminate a call instruction on deopt 61b14bb32b7e62760225cb2207df5fe87e5339ab
* Cold path partitioning
* Mark method call slow paths as COLDFUNC 0e5a58b6bf6aae72b6290a8d68e0a1b6d9eb4f79
* Mark vm_stackoverflow as NOINLINE COLDFUNC 9d71373c237876038cbac63bb0132907a78288a2
* Create mjit_exec_slowpath and mark it as NOINLINE COLDFUNC 083a17a82ad4c1f80cfb9e84cfb1bff5586470b1
* Primitive.attr! 'inline' / Integer#zero? 7561db8c009bb79a75024fa4ed0350bfb3d0626c
* Kernel#class 946e5cc668f66a4a0b79461047d3fcba8b71eef0
* (more to come...)
* Properly generate opt_send for cfunc cc 7982dc1dfd5df000b7361ccb7bc820da4f3547b8
* Optimize exivar access b736ea63bd4ce4e2fc81dfa73938b39fa70f659c
* Make JIT-ed leave leaf 151f8be40d385ada2ebf7feb84210ed7db7ef4df
* Inline vm_call_cfunc b9d3ceee8f8e4fade1eddc0c18abee59f9c1eee7
VM:
* Enable fastpath on invokesuper 5c2768181382bf84137759efea66f3aaf212665d
* History: https://speakerdeck.com/k0kubun/ruby-3-samituto?slide=40 (in Japanese)
|
|
|
|
|
|
| |
https://github.com/ruby/fiddle/commit/a09e66adf4
https://github.com/ruby/fiddle/commit/6cab9b45d6
https://github.com/ruby/fiddle/commit/ab72b19bed
|
|
|
|
| |
and add a debug log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
|
|
|
|
|
|
| |
to make sure :opt_invokebuiltin_delegate_leave doesn't become
:(trace_)opt_invokebuiltin_delegate.
This is to prevent a warning like
> /tmp/ruby/v3/src/trunk-test/test/ruby/test_jit.rb:618: warning:
'opt_invokebuiltin_delegate_leave' insn is not included in the script.
Actual insns are: opt_invokebuiltin_delegate leave
|
|
|
|
|
|
|
| |
http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200626T033003Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20200626T033003Z/ruby/test/ruby/test_settracefunc.rb:2299: warning: ambiguous first argument; put parentheses or a space even after `/' operator
```
|
|
|
|
|
| |
To prevent random failure with --jit-wait like
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3026615
|
|
|
|
|
|
|
|
|
| |
If :return event is specified for a opt_invokebuiltin_delegate_leave
and leave combination, the instructions should be
opt_invokebuiltin_delegate
trace_return
instructions. To make it, opt_invokebuiltin_delegate_leave
instruction will be changed to opt_invokebuiltin_delegate even if
it is not an event target instruction.
|
| |
|
|
|
| |
In Ruby 2.7.1 SimpeDelegator cannot be used without requiring `delegate` this PR adds the require to the first example for each class so that devs don't have to hunt for what require to use.
|
|
|
|
|
|
|
| |
While `spec/bundler` and `spec/bundler/` are treated different
targets by GNU make 4, the same target by GNU make 3. The latter
target, ending with a slash, was to run `test-bundler-parallel`,
instead of `spec/bundler/%`.
|
|
|
|
|
| |
As it is ignored and set at building packages automatically, it is
just nonsense to set in gemspec file for input.
|
|
|
|
| |
https://github.com/flori/json/commit/9f430a7bba
|
|
|
|
| |
https://github.com/flori/json/commit/1920653013
|
|
|
|
| |
https://github.com/flori/json/commit/78ec5e2bd3
|
|
|
|
|
| |
It's probably not worth it because there's nothing we can optimize in
such builtin methods. It's worth JIT only when inlined.
|
|
|
|
|
| |
to prevent a random failure like
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3024287
|
|
|
|
|
|
|
|
|
|
| |
Methods:
map/collect
map!/collect!
values_at
select/filter
select!/filter!
|
|
|
|
| |
Because it does not have closing `end`.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The scanner location has to be set from `lex.ptok` before it is
flushed by dispatching the scanner event.
|
| |
|
|
|
|
|
|
|
| |
A test worker process may already be enabling TracePoint, which results
in changing the insn name in this test.
http://ci.rvm.jp/results/trunk-random0@phosphorus-docker/3022750
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
$ benchmark-driver -v --rbenv 'before;after;before --jit;after --jit' benchmark/mjit_class.yml --repeat-count=4
before: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) [x86_64-linux]
after: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) +JIT [x86_64-linux]
Calculating -------------------------------------
before after before --jit after --jit
mjit_class(self) 39.219M 40.060M 53.502M 69.202M i/s - 40.000M times in 1.019915s 0.998495s 0.747631s 0.578021s
mjit_class(1) 39.567M 41.242M 52.100M 68.895M i/s - 40.000M times in 1.010935s 0.969885s 0.767749s 0.580591s
Comparison:
mjit_class(self)
after --jit: 69201690.7 i/s
before --jit: 53502336.4 i/s - 1.29x slower
after: 40060289.1 i/s - 1.73x slower
before: 39218939.2 i/s - 1.76x slower
mjit_class(1)
after --jit: 68895358.6 i/s
before --jit: 52100353.0 i/s - 1.32x slower
after: 41241993.6 i/s - 1.67x slower
before: 39567314.0 i/s - 1.74x slower
```
|
|
|
|
|
|
| |
using opt_invokebuiltin_delegate_leave insn.
Since Ruby 2.7, :return of methods using builtin have not been traced properly.
|
| |
|
|
|
|
| |
RubyVM::AbstractSyntaxTree is a module actually, but the document says "class".
|
|
|
|
|
|
|
|
|
|
|
| |
Methods:
#rotate!
#rotate
#sort!
#sort
#bsearch
#bsearch_index
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
| |
|
|
|
|
| |
https://github.com/ruby/psych/commit/4e7794fc2c
|
|
|
|
| |
https://github.com/ruby/psych/commit/68da645c7e
|
|
|
|
| |
https://github.com/ruby/psych/commit/39996192cc
|
|
|
|
| |
https://github.com/ruby/psych/commit/ef74fc01e2
|
| |
|