ruby-changes:59288
From: Koichi <ko1@a...>
Date: Tue, 17 Dec 2019 13:16:14 +0900 (JST)
Subject: [ruby-changes:59288] fbe229906b (master): add debug counter to count `call` reusing cases.
https://git.ruby-lang.org/ruby.git/commit/?id=fbe229906b From fbe229906b6e55c2e7bb1e68452d5c225503b9ca Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Tue, 17 Dec 2019 13:14:52 +0900 Subject: add debug counter to count `call` reusing cases. diff --git a/debug_counter.h b/debug_counter.h index 35ffe08..ea045a8 100644 --- a/debug_counter.h +++ b/debug_counter.h @@ -46,6 +46,7 @@ RB_DEBUG_COUNTER(mc_miss_by_distinct) https://github.com/ruby/ruby/blob/trunk/debug_counter.h#L46 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 diff --git a/vm_insnhelper.c b/vm_insnhelper.c index e7e20ee..efd297d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1458,6 +1458,7 @@ calccall(const struct rb_call_data *cd, const rb_callable_method_entry_t *me) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1458 } 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; } } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/