aboutsummaryrefslogtreecommitdiffstats
path: root/debug_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug_counter.c')
-rw-r--r--debug_counter.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/debug_counter.c b/debug_counter.c
index 4a0655380f..b9c32c1d15 100644
--- a/debug_counter.c
+++ b/debug_counter.c
@@ -47,7 +47,16 @@ VALUE
rb_debug_counter_reset(void)
{
for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
- rb_debug_counter[i] = 0;
+ switch (i) {
+ case RB_DEBUG_COUNTER_mjit_length_unit_queue:
+ case RB_DEBUG_COUNTER_mjit_length_active_units:
+ case RB_DEBUG_COUNTER_mjit_length_compact_units:
+ // These counters may be decreased and should not be reset.
+ break;
+ default:
+ rb_debug_counter[i] = 0;
+ break;
+ }
}
return Qnil;
}