1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/ruby_vm/views
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
..
_attributes.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_c_expr.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_copyright.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_insn_entry.erb vm.inc now in C99 2019-01-25 14:09:10 +00:00
_insn_len_info.erb _insn_len_info.erb: add ASSERT_VM_INSTRUCTION_SIZE 2019-01-31 05:00:41 +00:00
_insn_name_info.erb _insn_name_info.erb: use C99 2019-01-31 04:46:03 +00:00
_insn_operand_info.erb _insn_operand_info.erb: use C99 2019-01-31 05:22:58 +00:00
_insn_stack_increase.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_insn_type_chars.erb _insn_type_chars.erb: use C99 2019-01-31 05:36:17 +00:00
_leaf_helpers.erb _leaf_helpers.erb: some functions are not leaf 2019-02-01 04:39:47 +00:00
_mjit_compile_insn.erb Add debug counters for MJIT cancel 2019-03-29 13:54:29 +00:00
_mjit_compile_insn_body.erb Add debug counters for MJIT cancel 2019-03-29 13:54:29 +00:00
_mjit_compile_ivar.erb Recompile JIT-ed code without optimization 2019-04-14 04:52:02 +00:00
_mjit_compile_pc_and_sp.erb Prefer using vm_base_ptr rather than cfp->bp 2019-03-25 14:26:11 +00:00
_mjit_compile_send.erb Recompile JIT-ed code without optimization 2019-04-14 04:52:02 +00:00
_notice.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_sp_inc_helpers.erb Arrange as same as comment and return statement 2018-12-27 09:09:42 +00:00
_trace_instruction.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
insns.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
insns_info.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
mjit_compile.inc.erb mjit.c: use boolean type for boolean variables 2019-01-10 14:31:18 +00:00
opt_sc.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
optinsn.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
optunifs.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
vm.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
vmtc.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00