diff options
-rw-r--r-- | yjit.rb | 1 | ||||
-rw-r--r-- | yjit/src/core.rs | 5 | ||||
-rw-r--r-- | yjit/src/stats.rs | 1 |
3 files changed, 7 insertions, 0 deletions
@@ -269,6 +269,7 @@ module RubyVM::YJIT $stderr.puts "compiled_branch_count: " + format_number(13, stats[:compiled_branch_count]) $stderr.puts "block_next_count: " + format_number(13, stats[:block_next_count]) $stderr.puts "defer_count: " + format_number(13, stats[:defer_count]) + $stderr.puts "defer_empty_count: " + format_number(13, stats[:defer_empty_count]) $stderr.puts "freed_iseq_count: " + format_number(13, stats[:freed_iseq_count]) $stderr.puts "invalidation_count: " + format_number(13, stats[:invalidation_count]) $stderr.puts "constant_state_bumps: " + format_number(13, stats[:constant_state_bumps]) diff --git a/yjit/src/core.rs b/yjit/src/core.rs index df884515d6..e296afc4da 100644 --- a/yjit/src/core.rs +++ b/yjit/src/core.rs @@ -2244,6 +2244,11 @@ pub fn defer_compilation( } asm.mark_branch_end(&branch_rc); + // If the block we're deferring from is empty + if jit.get_block().borrow().get_blockid().idx == jit.get_insn_idx() { + incr_counter!(defer_empty_count); + } + incr_counter!(defer_count); } diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 583e82527d..05e970702c 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -310,6 +310,7 @@ make_counters! { compilation_failure, block_next_count, defer_count, + defer_empty_count, freed_iseq_count, exit_from_branch_stub, |