diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-09-08 12:01:39 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:40 -0400 |
commit | 4b58d698b14752f4dfd405637df384c758cae396 (patch) | |
tree | ca3d3ae9e45d6ebba3aa78795c40d6ada9e5caf1 /vm.c | |
parent | 9bd6ce47454a03ad1cec422f36017bcae56790dd (diff) |
Count interpreter instructions when -DYJIT_STATS=1
The interpreter instruction count was enabled based on RUBY_DEBUG as
opposed to YJIT_STATS. In builds with YJIT_STATS=1 but RUBY_DEBUG=0,
the count was not available.
Move YJIT_STATS in yjit.h where declarations are expoed to code outside
of YJIT. Also reduce the changes made to the interpreter for calling
into YJIT's instruction counting function.
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -28,6 +28,7 @@ #include "internal/sanitizers.h" #include "iseq.h" #include "mjit.h" +#include "yjit.h" #include "ruby/st.h" #include "ruby/vm.h" #include "vm_core.h" @@ -37,7 +38,6 @@ #include "vm_insnhelper.h" #include "ractor_core.h" #include "vm_sync.h" -#include "yjit.h" #include "builtin.h" @@ -345,10 +345,6 @@ static void vm_collect_usage_insn(int insn); static void vm_collect_usage_register(int reg, int isset); #endif -#if RUBY_DEBUG -static void vm_yjit_collect_usage_insn(int insn); -#endif - static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp); extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler, @@ -4061,14 +4057,6 @@ MAYBE_UNUSED(static void (*ruby_vm_collect_usage_func_register)(int reg, int iss #endif -#if RUBY_DEBUG -static void -vm_yjit_collect_usage_insn(int insn) -{ - rb_yjit_collect_vm_usage_insn(insn); -} -#endif - #if VM_COLLECT_USAGE_DETAILS /* @param insn instruction number */ static void |