aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 13:36:15 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-06 13:37:01 -0800
commit6df8a53055cfa5af02cb5572b3655806e6ed3d5f (patch)
treeb5859d7253075e5e635bb264c8995d678519f3ef /vm_insnhelper.h
parentb116b2bcf68d68f51743acd16592d430289aa431 (diff)
downloadruby-6df8a53055cfa5af02cb5572b3655806e6ed3d5f.tar.gz
Fix YJIT stats for RUBY_DEBUG builds
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index f787419d6c..39fd8587bb 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -29,8 +29,13 @@ 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 MJIT_STATS && YJIT_STATS
+// Both flags could be enabled at the same time. You need to call both in that case.
+#define COLLECT_USAGE_INSN(insn) rb_mjit_collect_vm_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 */
#elif MJIT_STATS
-// for --mjit-stats TODO: make it possible to support both MJIT_STATS and YJIT_STATS
+// for --mjit-stats
#define COLLECT_USAGE_INSN(insn) rb_mjit_collect_vm_usage_insn(insn)
#define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
#define COLLECT_USAGE_REGISTER(reg, s) /* none */