ruby-changes:61418
From: Takashi <ko1@a...>
Date: Fri, 29 May 2020 14:45:56 +0900 (JST)
Subject: [ruby-changes:61418] 0bd025ad69 (master): Add a debug_counter for JIT cancel on leave
https://git.ruby-lang.org/ruby.git/commit/?id=0bd025ad69 From 0bd025ad6991f2159ef8bd596a79c89b79f5cc3e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 28 May 2020 22:45:27 -0700 Subject: Add a debug_counter for JIT cancel on leave diff --git a/debug_counter.h b/debug_counter.h index c043531..f6223fb 100644 --- a/debug_counter.h +++ b/debug_counter.h @@ -333,6 +333,7 @@ RB_DEBUG_COUNTER(mjit_cancel_exivar_inline) https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L333 RB_DEBUG_COUNTER(mjit_cancel_send_inline) RB_DEBUG_COUNTER(mjit_cancel_opt_insn) /* CALL_SIMPLE_METHOD */ RB_DEBUG_COUNTER(mjit_cancel_invalidate_all) +RB_DEBUG_COUNTER(mjit_cancel_leave) /* rb_mjit_unit_list length */ RB_DEBUG_COUNTER(mjit_length_unit_queue) diff --git a/tool/ruby_vm/views/mjit_compile.inc.erb b/tool/ruby_vm/views/mjit_compile.inc.erb index 019994e..c975545 100644 --- a/tool/ruby_vm/views/mjit_compile.inc.erb +++ b/tool/ruby_vm/views/mjit_compile.inc.erb @@ -76,6 +76,7 @@ switch (insn) { https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/mjit_compile.inc.erb#L76 fprintf(f, " if (UNLIKELY(RUBY_VM_INTERRUPTED_ANY(ec))) {\n"); fprintf(f, " reg_cfp->sp = vm_base_ptr(reg_cfp) + %d;\n", b->stack_size); fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos); + fprintf(f, " RB_DEBUG_COUNTER_INC(mjit_cancel_leave);\n"); fprintf(f, " goto cancel;\n"); fprintf(f, " }\n"); fprintf(f, " ec->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(reg_cfp);\n"); // vm_pop_frame -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/