diff options
Diffstat (limited to 'lib/ruby_vm/mjit')
-rw-r--r-- | lib/ruby_vm/mjit/compiler.rb | 8 | ||||
-rw-r--r-- | lib/ruby_vm/mjit/stats.rb | 1 |
2 files changed, 9 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 diff --git a/lib/ruby_vm/mjit/stats.rb b/lib/ruby_vm/mjit/stats.rb index 7fa9236257..bc5a30738e 100644 --- a/lib/ruby_vm/mjit/stats.rb +++ b/lib/ruby_vm/mjit/stats.rb @@ -36,6 +36,7 @@ module RubyVM::MJIT print_counters(stats, prefix: 'send_', prompt: 'method call exit reasons') + $stderr.puts "compiled_block_count: #{format('%10d', stats[:compiled_block_count])}" $stderr.puts "side_exit_count: #{format('%10d', stats[:side_exit_count])}" $stderr.puts "total_insns_count: #{format('%10d', stats[:total_insns_count])}" if stats.key?(:total_insns_count) $stderr.puts "vm_insns_count: #{format('%10d', stats[:vm_insns_count])}" if stats.key?(:vm_insns_count) |