Do not reset non-increment-only counters
to prevernt underflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ce28c0642
commit
f7035dd3ff
@ -47,7 +47,16 @@ VALUE
|
|||||||
rb_debug_counter_reset(void)
|
rb_debug_counter_reset(void)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
|
for (int i = 0; i < RB_DEBUG_COUNTER_MAX; i++) {
|
||||||
|
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;
|
rb_debug_counter[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user