mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add cc_invalidate_negative debug counter
counts for invalidating negative cache.
This commit is contained in:
parent
967040ba59
commit
a8aa169b8f
Notes:
git
2020-12-14 11:58:12 +09:00
2 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,7 @@ RB_DEBUG_COUNTER(cc_invalidate_leaf_callable) // complime
|
||||||
RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has sublcasses
|
RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has sublcasses
|
||||||
RB_DEBUG_COUNTER(cc_invalidate_tree_cme) // cme if cme is found in this class or superclasses
|
RB_DEBUG_COUNTER(cc_invalidate_tree_cme) // cme if cme is found in this class or superclasses
|
||||||
RB_DEBUG_COUNTER(cc_invalidate_tree_callable) // complimented cache (subclasses)
|
RB_DEBUG_COUNTER(cc_invalidate_tree_callable) // complimented cache (subclasses)
|
||||||
|
RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative cache
|
||||||
|
|
||||||
RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs
|
RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs
|
||||||
RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs
|
RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs
|
||||||
|
|
|
@ -198,6 +198,8 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid)
|
||||||
if (rb_id_table_lookup(vm->negative_cme_table, mid, (VALUE *)&cme)) {
|
if (rb_id_table_lookup(vm->negative_cme_table, mid, (VALUE *)&cme)) {
|
||||||
rb_id_table_delete(vm->negative_cme_table, mid);
|
rb_id_table_delete(vm->negative_cme_table, mid);
|
||||||
vm_me_invalidate_cache((rb_callable_method_entry_t *)cme);
|
vm_me_invalidate_cache((rb_callable_method_entry_t *)cme);
|
||||||
|
|
||||||
|
RB_DEBUG_COUNTER_INC(cc_invalidate_negative);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue