diff options
author | Takashi Kokubun <[email protected]> | 2023-02-07 00:00:09 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | 4bb4479165209af59efae2dd3248873eecc3d4f5 (patch) | |
tree | f2d6ac66f3d70abd98a4fbed5924782a1aa7ecc8 /lib/ruby_vm/mjit/compiler.rb | |
parent | 5c638c97bb8e46b558b41b17b988722bb9432196 (diff) |
Add compiled_block_count
Diffstat (limited to 'lib/ruby_vm/mjit/compiler.rb')
-rw-r--r-- | lib/ruby_vm/mjit/compiler.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb index f855c8a6a5..18f2d94016 100644 --- a/lib/ruby_vm/mjit/compiler.rb +++ b/lib/ruby_vm/mjit/compiler.rb @@ -224,6 +224,14 @@ module RubyVM::MJIT raise "compiling #{insn.name} returned unexpected status: #{status.inspect}" end end + + incr_counter(:compiled_block_count) + end + + def incr_counter(name) + if C.mjit_opts.stats + C.rb_mjit_counters[name][0] += 1 + end end end end |