summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-14 18:37:22 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-14 18:38:40 +0900
commit7060d6b721092d56f1cbc084940db960e01671fd (patch)
tree506a53e92931356919fc629d86b6a128fa344daf /vm_insnhelper.c
parente889c025501850de9a91012552d38924cc5fb947 (diff)
fix condition and add another debug counter
mc_inline_miss_same_def is added to check same method or not. Also the mc_inline_miss_same_cc calculation was fixed.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 9cade36fad..ac0f999b81 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1694,12 +1694,16 @@ rb_vm_search_method_slowpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klas
// empty
RB_DEBUG_COUNTER_INC(mc_inline_miss_empty);
}
- else if (old_cc == cd->cc) {
+ else if (old_cc == cc) {
RB_DEBUG_COUNTER_INC(mc_inline_miss_same_cc);
}
else if (vm_cc_cme(old_cc) == vm_cc_cme(cc)) {
RB_DEBUG_COUNTER_INC(mc_inline_miss_same_cme);
}
+ else if (vm_cc_cme(old_cc) && vm_cc_cme(cc) &&
+ vm_cc_cme(old_cc)->def == vm_cc_cme(cc)->def) {
+ RB_DEBUG_COUNTER_INC(mc_inline_miss_same_def);
+ }
else {
RB_DEBUG_COUNTER_INC(mc_inline_miss_diff);
}