1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add debug counter to count call reusing cases.

This commit is contained in:
Koichi Sasada 2019-12-17 13:14:52 +09:00
parent 618d091151
commit fbe229906b
2 changed files with 2 additions and 0 deletions

View file

@ -46,6 +46,7 @@ RB_DEBUG_COUNTER(mc_miss_by_distinct)
RB_DEBUG_COUNTER(mc_miss_by_refine)
RB_DEBUG_COUNTER(mc_miss_by_visi)
RB_DEBUG_COUNTER(mc_miss_spurious)
RB_DEBUG_COUNTER(mc_miss_reuse_call)
/*
* call cache fastpath usage

View file

@ -1458,6 +1458,7 @@ calccall(const struct rb_call_data *cd, const rb_callable_method_entry_t *me)
}
else {
RB_DEBUG_COUNTER_INC(mc_miss_spurious);
(void)RB_DEBUG_COUNTER_INC_IF(mc_miss_reuse_call, cc->call != vm_call_general);
return cc->call;
}
}