summaryrefslogtreecommitdiff
path: root/debug_counter.h
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2021-04-23 13:59:16 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2021-05-11 12:04:27 -0700
commit08de37f9fa3469365e6b5c964689ae2bae0eb9f3 (patch)
tree21b0b6cd2ae3e878bbf0a6dc3f51dce8415c5327 /debug_counter.h
parente8ae922b62adb00a80d3d4c49f7d7b0e6026eaba (diff)
Filling cache values on cvar write
Instead of on read. Once it's in the inline cache we never have to make one again. We want to eventually put the value into the cache, and the best opportunity to do that is when you write the value.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4340
Diffstat (limited to 'debug_counter.h')
-rw-r--r--debug_counter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_counter.h b/debug_counter.h
index 97a758ca94..3cf80cc188 100644
--- a/debug_counter.h
+++ b/debug_counter.h
@@ -24,7 +24,8 @@ RB_DEBUG_COUNTER(mc_inline_miss_same_cme) // IMC miss, but same CME
RB_DEBUG_COUNTER(mc_inline_miss_same_def) // IMC miss, but same definition
RB_DEBUG_COUNTER(mc_inline_miss_diff) // IMC miss, different methods
-RB_DEBUG_COUNTER(cvar_inline_hit) // cvar cache hit
+RB_DEBUG_COUNTER(cvar_write_inline_hit) // cvar cache hit on write
+RB_DEBUG_COUNTER(cvar_read_inline_hit) // cvar cache hit on read
RB_DEBUG_COUNTER(cvar_inline_miss) // miss inline cache
RB_DEBUG_COUNTER(cvar_class_invalidate) // invalidate cvar cache when define a cvar that's defined on a subclass
RB_DEBUG_COUNTER(cvar_include_invalidate) // invalidate cvar cache on module include or prepend