From c37ba2c5478c8fa81f3cb26d7ddb9b79d681147d Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Mon, 14 Dec 2020 18:17:35 +0900 Subject: [PATCH] add ccs_not_found debug counter ccs_not_found to count not found in ccs table. --- debug_counter.h | 3 ++- vm_method.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debug_counter.h b/debug_counter.h index a4fb84dbdc..8b23f17102 100644 --- a/debug_counter.h +++ b/debug_counter.h @@ -54,7 +54,8 @@ RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs -RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup +RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup +RB_DEBUG_COUNTER(ccs_not_found) // count for not found corresponding ccs on method lookup // iseq RB_DEBUG_COUNTER(iseq_num) // number of total created iseq diff --git a/vm_method.c b/vm_method.c index 87827db5aa..e526ee0130 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1072,6 +1072,8 @@ cached_callable_method_entry(VALUE klass, ID mid) rb_id_table_delete(cc_tbl, mid); } } + + RB_DEBUG_COUNTER_INC(ccs_not_found); return NULL; }