summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/_mjit_compile_insn.erb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-12-19 21:35:59 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-12-19 21:38:14 -0800
commit7d0144e055fdbd7110cf84275b9e145550b77fd3 (patch)
tree6a18376be576b91c8927ed8c85445fc706fe4ee1 /tool/ruby_vm/views/_mjit_compile_insn.erb
parentae1cc3fd4e4e926dc9d84723ae2696b9799cfe9d (diff)
Check mjit_call_p only when interrupted
for leaf_without_check_ints insns. $ benchmark-driver -v --rbenv 'before --jit;after --jit' --repeat-count=12 --alternate --output=all benchmark.yml before --jit: ruby 3.0.0dev (2020-12-20T05:02:18Z master 02b3555874) +JIT [x86_64-linux] after --jit: ruby 3.0.0dev (2020-12-20T05:36:00Z master 3f58de4eab) +JIT [x86_64-linux] last_commit=Check mjit_call_p only when interrupted Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 84.50647332260259 85.85057800433144 fps 91.17796644338372 92.09930605656054 91.29346683444497 93.01336611323687 91.50322318568884 93.07234029037433 91.66560903214686 93.22773241529644 91.82315142636172 93.37032901061119 92.15066379608260 93.83701526141679 92.37897097456643 93.86032792681507 92.53049815524908 93.91211970920320 92.78414507914283 94.09109196967890 92.90299756525958 94.40107239595325 93.70279428858790 95.01326369371263
Diffstat (limited to 'tool/ruby_vm/views/_mjit_compile_insn.erb')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_insn.erb b/tool/ruby_vm/views/_mjit_compile_insn.erb
index e688f0853e..f54d1b0e0e 100644
--- a/tool/ruby_vm/views/_mjit_compile_insn.erb
+++ b/tool/ruby_vm/views/_mjit_compile_insn.erb
@@ -59,7 +59,8 @@
% end
%
% # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
-% unless insn.always_leaf?
+% # leaf insn may not cancel JIT. leaf_without_check_ints is covered in RUBY_VM_CHECK_INTS of _mjit_compile_insn_body.erb.
+% unless insn.always_leaf? || insn.leaf_without_check_ints?
fprintf(f, " if (UNLIKELY(!mjit_call_p)) {\n");
fprintf(f, " reg_cfp->sp = vm_base_ptr(reg_cfp) + %d;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %>);
if (!pc_moved_p) {