Skip to content

Commit

Permalink
add debug counter to count call reusing cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1 committed Dec 17, 2019
1 parent 618d091 commit fbe2299
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions debug_counter.h
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions vm_insnhelper.c
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fbe2299

Please sign in to comment.