diff options
author | Takashi Kokubun <[email protected]> | 2023-01-03 23:51:37 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | ee80b2be20ae8a5102ac478f2b0fc0cf8786eaa3 (patch) | |
tree | 46bb4a1d943327afb5ab98843edae6032f80ffdd /lib/ruby_vm/mjit/exit_compiler.rb | |
parent | a8dec34961d7734ad975e44efa8aae361a1c4f5a (diff) |
Fix broken stats
Diffstat (limited to 'lib/ruby_vm/mjit/exit_compiler.rb')
-rw-r--r-- | lib/ruby_vm/mjit/exit_compiler.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb index 7e1c605d25..d92f8a1588 100644 --- a/lib/ruby_vm/mjit/exit_compiler.rb +++ b/lib/ruby_vm/mjit/exit_compiler.rb @@ -10,7 +10,7 @@ module RubyVM::MJIT # @param asm [RubyVM::MJIT::Assembler] def compile_entry_exit(pc, asm, cause:) # Increment per-insn exit counter - incr_insn_exit(pc) + incr_insn_exit(pc, asm) # TODO: Saving pc and sp may be needed later @@ -29,7 +29,7 @@ module RubyVM::MJIT # @param asm [RubyVM::MJIT::Assembler] def compile_side_exit(jit, ctx, asm) # Increment per-insn exit counter - incr_insn_exit(jit.pc) + incr_insn_exit(jit.pc, asm) # Fix pc/sp offsets for the interpreter save_pc_and_sp(jit, ctx.dup, asm) # dup to avoid sp_offset update @@ -70,9 +70,10 @@ module RubyVM::MJIT end # @param pc [Integer] - def incr_insn_exit(pc) + # @param asm [RubyVM::MJIT::Assembler] + def incr_insn_exit(pc, asm) if C.mjit_opts.stats - insn = decode_insn(C.VALUE.new(pc).*) + insn = Compiler.decode_insn(C.VALUE.new(pc).*) asm.comment("increment insn exit: #{insn.name}") asm.mov(:rax, (C.mjit_insn_exits + insn.bin).to_i) asm.add([:rax], 1) # TODO: lock |