summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yjit.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/yjit.rb b/yjit.rb
index 51424a6a5e..0e118cc87e 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -162,10 +162,12 @@ module YJIT
print_counters(stats, prefix: 'oaref_', prompt: 'opt_aref exit reasons: ')
print_counters(stats, prefix: 'expandarray_', prompt: 'expandarray exit reasons: ')
- total_exits = total_exit_count(stats)
+ side_exits = total_exit_count(stats)
+ total_exits = side_exits + stats[:leave_interp_return]
- # Number of instructions that finish executing in YJIT
- retired_in_yjit = stats[:exec_instruction] - total_exits
+ # Number of instructions that finish executing in YJIT.
+ # See :count-placement: about the subtraction.
+ retired_in_yjit = stats[:exec_instruction] - side_exits
# Average length of instruction sequences executed by YJIT
avg_len_in_yjit = retired_in_yjit.to_f / total_exits