aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yjit.rb2
-rw-r--r--yjit/src/codegen.rs5
-rw-r--r--yjit/src/stats.rs4
3 files changed, 7 insertions, 4 deletions
diff --git a/yjit.rb b/yjit.rb
index a3c03046b4..39c3e6a509 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -295,7 +295,7 @@ module RubyVM::YJIT
out.puts "num_send: " + format_number(13, stats[:num_send])
out.puts "num_send_known_class: " + format_number_pct(13, stats[:num_send_known_class], stats[:num_send])
out.puts "num_send_polymorphic: " + format_number_pct(13, stats[:num_send_polymorphic], stats[:num_send])
- out.puts "num_send_megamorphic: " + format_number_pct(13, stats[:num_send_megamorphic], stats[:num_send])
+ out.puts "num_send_megamorphic: " + format_number_pct(13, stats[:send_megamorphic], stats[:num_send])
out.puts "num_send_dynamic: " + format_number_pct(13, stats[:num_send_dynamic], stats[:num_send])
if stats[:num_send_x86_rel32] != 0 || stats[:num_send_x86_reg] != 0
out.puts "num_send_x86_rel32: " + format_number(13, stats[:num_send_x86_rel32])
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,