diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-10-17 08:36:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 11:36:13 -0400 |
commit | d458b4127f1815e76774cb7c3c23b7c31dfd54bc (patch) | |
tree | 3b82120b1af94fb255f6d11ac59b210bdbaf19ea /yjit | |
parent | 1f7234c0152df5dcf9a73acb352d20fcd3004ddf (diff) |
YJIT: Add a few missing counters for send fallback (#8681)
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/codegen.rs | 5 | ||||
-rw-r--r-- | yjit/src/stats.rs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 1955ed45a7..b83fc80366 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -6974,7 +6974,7 @@ fn gen_send_general( } // If megamorphic, let the caller fallback to dynamic dispatch if asm.ctx.get_chain_depth() as i32 >= SEND_MAX_DEPTH { - gen_counter_incr(asm, Counter::num_send_megamorphic); + gen_counter_incr(asm, Counter::send_megamorphic); return None; } @@ -6993,7 +6993,7 @@ fn gen_send_general( // Do method lookup let mut cme = unsafe { rb_callable_method_entry(comptime_recv_klass, mid) }; if cme.is_null() { - // TODO: counter + gen_counter_incr(asm, Counter::send_cme_not_found); return None; } @@ -7006,6 +7006,7 @@ fn gen_send_general( if flags & VM_CALL_FCALL == 0 { // Can only call private methods with FCALL callsites. // (at the moment they are callsites without a receiver or an explicit `self` receiver) + gen_counter_incr(asm, Counter::send_private_not_fcall); return None; } } diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 859f57c966..7d44b388cd 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -255,8 +255,11 @@ make_counters! { send_call_block, send_call_kwarg, send_call_multi_ractor, + send_cme_not_found, + send_megamorphic, send_missing_method, send_refined_method, + send_private_not_fcall, send_cfunc_ruby_array_varg, send_cfunc_argc_mismatch, send_cfunc_toomany_args, @@ -469,7 +472,6 @@ make_counters! { num_send, num_send_known_class, - num_send_megamorphic, num_send_polymorphic, num_send_x86_rel32, num_send_x86_reg, |