mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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.
This commit is contained in:
parent
9bd6ce4745
commit
4b58d698b1
3 changed files with 9 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue