diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-02-09 07:38:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 10:38:31 -0500 |
commit | 0601ba6a1bf15e13ac931921861c90535ed29dde (patch) | |
tree | 68d200f404d60cc5c2b837aeaf1619bcdb45cfa7 /yjit | |
parent | b78f871d838c168789648738e5c67b071beb8a19 (diff) | |
download | ruby-0601ba6a1bf15e13ac931921861c90535ed29dde.tar.gz |
YJIT: Add counter for megamorphic send (#7274)
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/codegen.rs | 4 | ||||
-rw-r--r-- | yjit/src/stats.rs | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 9925568c35..be055c011b 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -5931,6 +5931,8 @@ fn gen_send_general( // Points to the receiver operand on the stack let recv = ctx.stack_opnd(recv_idx); let recv_opnd = StackOpnd(recv_idx.try_into().unwrap()); + + let megamorphic_exit = counted_exit!(ocb, side_exit, send_klass_megamorphic); jit_guard_known_klass( jit, ctx, @@ -5941,7 +5943,7 @@ fn gen_send_general( recv_opnd, comptime_recv, SEND_MAX_DEPTH, - side_exit, + megamorphic_exit, ); // Do method lookup diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index e9408b71c7..9fff7f0e27 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -168,6 +168,7 @@ make_counters! { exec_instruction, send_keywords, + send_klass_megamorphic, send_kw_splat, send_args_splat_super, send_iseq_zsuper, |