diff options
author | Alan Wu <[email protected]> | 2021-01-26 15:21:47 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:27 -0400 |
commit | b7f93e81dfe6864273707172be92896b54b6053e (patch) | |
tree | 0e04e68ed0d2e472a5819de3e5acbc7a3051e661 /vm.c | |
parent | 36232a48a63923e6d3bd3ccad30a12a02b20e89b (diff) |
Implement --ujit-stats and instructoin counting
VM and ujit instruction counting in debug builds.
shopify/ruby#19
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -37,6 +37,7 @@ #include "vm_insnhelper.h" #include "ractor_core.h" #include "vm_sync.h" +#include "ujit.h" #include "builtin.h" @@ -344,6 +345,10 @@ 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_ujit_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, @@ -4054,6 +4059,14 @@ MAYBE_UNUSED(static void (*ruby_vm_collect_usage_func_register)(int reg, int iss #endif +#if RUBY_DEBUG +static void +vm_ujit_collect_usage_insn(int insn) +{ + rb_ujit_collect_vm_usage_insn(insn); +} +#endif + #if VM_COLLECT_USAGE_DETAILS /* @param insn instruction number */ static void |