[前][次][番号順一覧][スレッド一覧]

ruby-changes:64142

From: Koichi <ko1@a...>
Date: Mon, 14 Dec 2020 18:34:46 +0900 (JST)
Subject: [ruby-changes:64142] c37ba2c547 (master): add ccs_not_found debug counter

https://git.ruby-lang.org/ruby.git/commit/?id=c37ba2c547

From c37ba2c5478c8fa81f3cb26d7ddb9b79d681147d Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Mon, 14 Dec 2020 18:17:35 +0900
Subject: add ccs_not_found debug counter

ccs_not_found to count not found in ccs table.

diff --git a/debug_counter.h b/debug_counter.h
index a4fb84d..8b23f17 100644
--- a/debug_counter.h
+++ b/debug_counter.h
@@ -54,7 +54,8 @@ RB_DEBUG_COUNTER(cc_invalidate_negative)      // count for invalidating negative https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L54
 
 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 87827db..e526ee0 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1072,6 +1072,8 @@ cached_callable_method_entry(VALUE klass, ID mid) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1072
             rb_id_table_delete(cc_tbl, mid);
         }
     }
+
+    RB_DEBUG_COUNTER_INC(ccs_not_found);
     return NULL;
 }
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]