summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-02-07 00:00:09 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commit4bb4479165209af59efae2dd3248873eecc3d4f5 (patch)
treef2d6ac66f3d70abd98a4fbed5924782a1aa7ecc8 /lib/ruby_vm/mjit/compiler.rb
parent5c638c97bb8e46b558b41b17b988722bb9432196 (diff)
Add compiled_block_count
Diffstat (limited to 'lib/ruby_vm/mjit/compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/compiler.rb8
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