ruby-changes:55338
From: k0kubun <ko1@a...>
Date: Sun, 14 Apr 2019 16:12:50 +0900 (JST)
Subject: [ruby-changes:55338] k0kubun:r67546 (trunk): Add debug counter for MJIT stale_units
k0kubun 2019-04-14 16:12:44 +0900 (Sun, 14 Apr 2019) New Revision: 67546 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67546 Log: Add debug counter for MJIT stale_units Modified files: trunk/debug_counter.c trunk/debug_counter.h trunk/mjit_worker.c Index: debug_counter.c =================================================================== --- debug_counter.c (revision 67545) +++ debug_counter.c (revision 67546) @@ -51,6 +51,7 @@ rb_debug_counter_reset(void) https://github.com/ruby/ruby/blob/trunk/debug_counter.c#L51 case RB_DEBUG_COUNTER_mjit_length_unit_queue: case RB_DEBUG_COUNTER_mjit_length_active_units: case RB_DEBUG_COUNTER_mjit_length_compact_units: + case RB_DEBUG_COUNTER_mjit_length_stale_units: // These counters may be decreased and should not be reset. break; default: Index: debug_counter.h =================================================================== --- debug_counter.h (revision 67545) +++ debug_counter.h (revision 67546) @@ -280,6 +280,7 @@ RB_DEBUG_COUNTER(mjit_cancel_trace) https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L280 RB_DEBUG_COUNTER(mjit_length_unit_queue) RB_DEBUG_COUNTER(mjit_length_active_units) RB_DEBUG_COUNTER(mjit_length_compact_units) +RB_DEBUG_COUNTER(mjit_length_stale_units) /* Other MJIT counters */ RB_DEBUG_COUNTER(mjit_compile_failures) Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 67545) +++ mjit_worker.c (revision 67546) @@ -334,6 +334,7 @@ add_to_list(struct rb_mjit_unit *unit, s https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L334 (void)RB_DEBUG_COUNTER_INC_IF(mjit_length_unit_queue, list == &unit_queue); (void)RB_DEBUG_COUNTER_INC_IF(mjit_length_active_units, list == &active_units); (void)RB_DEBUG_COUNTER_INC_IF(mjit_length_compact_units, list == &compact_units); + (void)RB_DEBUG_COUNTER_INC_IF(mjit_length_stale_units, list == &stale_units); list_add_tail(&list->head, &unit->unode); list->length++; @@ -346,6 +347,7 @@ remove_from_list(struct rb_mjit_unit *un https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L347 rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_unit_queue, -1, list == &unit_queue); rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_active_units, -1, list == &active_units); rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_compact_units, -1, list == &compact_units); + rb_debug_counter_add(RB_DEBUG_COUNTER_mjit_length_stale_units, -1, list == &stale_units); #endif list_del(&unit->unode); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/