summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-11-09 11:59:18 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2020-11-09 14:05:41 -0800
commit4219cb7adb0240fa92cd044b2feebb66b7702ca1 (patch)
treedb86c2d267fe5422d72053aa3cce4899fb37abc9 /vm_insnhelper.c
parentf259906eabac6038bb7c79e426c17ae850c8e017 (diff)
Add debug counter for ivar inline cache misses that could hit
This commit adds a debug counter for the case where the inline cache *missed* but the ivar index table has an entry for that ivar. This is a case where a polymorphic cache could help
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3750
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index ea25de629f..74e992a500 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1246,6 +1246,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, const rb_iseq_t *iseq, IVC ic, const str
ptr = ROBJECT_IVPTR(obj);
}
RB_OBJ_WRITE(obj, &ptr[index], val);
+ RB_DEBUG_COUNTER_INC(ivar_set_ic_miss_iv_hit);
return val;
}