зеркало из https://github.com/github/ruby.git
YJIT: Add a few missing counters for send fallback (#8681)
This commit is contained in:
Родитель
1f7234c015
Коммит
d458b4127f
2
yjit.rb
2
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])
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче