summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/_mjit_compile_insn.erb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-11 13:48:00 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-11 13:48:00 +0000
commit10ff0a2bbe31bb9121b6be79625ffc3ac54e032d (patch)
treea18f71c20fc3ac8c19ac7cf9d615fbc53ad95ddc /tool/ruby_vm/views/_mjit_compile_insn.erb
parent67bd8fb36b56858cb35aa05c5279b6f281954935 (diff)
_mjit_compile_insn.erb: prefer insn.always_leaf?
rather than `trace_enablable_insns` which is hard to maintain. This would make performance bad because new branches for tracepoint will be added. Optcarrot before: fps: 56.885371547337655 fps: 60.02493636060194 fps: 63.051028327122076 fps: 63.78463316242535 fps: 64.20391937940403 fps: 64.55990344731123 fps: 64.56771099162921 fps: 64.95991277629723 fps: 65.15120708973232 fps: 65.90558702393933 fps: 66.29579283026303 Optcarrot after: fps: 52.7647027470875 fps: 53.67404855529564 fps: 58.40514319229468 fps: 60.90736996487708 fps: 62.83487236283472 fps: 63.01386139447994 fps: 63.42395443471596 fps: 63.78328559878602 fps: 64.58432081229746 fps: 64.78720429848532 fps: 65.48720618907552 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/views/_mjit_compile_insn.erb')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn.erb10
1 files changed, 1 insertions, 9 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_insn.erb b/tool/ruby_vm/views/_mjit_compile_insn.erb
index e0955687cc..cb66e034b3 100644
--- a/tool/ruby_vm/views/_mjit_compile_insn.erb
+++ b/tool/ruby_vm/views/_mjit_compile_insn.erb
@@ -5,14 +5,6 @@
% # granted, to either redistribute and/or modify this file, provided that the
% # conditions mentioned in the file COPYING are met. Consult the file for
% # details.
-%
-% trace_enablable_insns = [
-% 'opt_send_without_block',
-% 'send',
-% 'invokeblock',
-% 'invokesuper',
-% ]
-%
fprintf(f, "{\n");
{
% # compiler: Prepare operands which may be used by `insn.call_attribute`
@@ -67,7 +59,7 @@
% end
%
% # JIT: We should evaluate ISeq modified for TracePoint if it's enabled. Note: This is slow.
-% if trace_enablable_insns.include?(insn.name)
+% unless insn.always_leaf?
fprintf(f, " if (UNLIKELY(ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS)) {\n");
fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + (int)<%= insn.call_attribute('sp_inc') %> + 1);
if (!body->catch_except_p) {