aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-09-08 12:01:39 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:40 -0400
commit4b58d698b14752f4dfd405637df384c758cae396 (patch)
treeca3d3ae9e45d6ebba3aa78795c40d6ada9e5caf1 /vm_insnhelper.h
parent9bd6ce47454a03ad1cec422f36017bcae56790dd (diff)
downloadruby-4b58d698b14752f4dfd405637df384c758cae396.tar.gz
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_insnhelper.h')
-rw-r--r--vm_insnhelper.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 22a181f95a..459f567106 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -25,9 +25,9 @@ MJIT_SYMBOL_EXPORT_END
#define COLLECT_USAGE_OPERAND(insn, n, op) vm_collect_usage_operand((insn), (n), ((VALUE)(op)))
#define COLLECT_USAGE_REGISTER(reg, s) vm_collect_usage_register((reg), (s))
-#elif RUBY_DEBUG
+#elif YJIT_STATS
/* for --yjit-stats */
-#define COLLECT_USAGE_INSN(insn) vm_yjit_collect_usage_insn(insn)
+#define COLLECT_USAGE_INSN(insn) rb_yjit_collect_vm_usage_insn(insn)
#define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
#define COLLECT_USAGE_REGISTER(reg, s) /* none */
#else