YJIT: Count all opt_getconstant_path exit reasons (#8187)
This commit is contained in:
parent
5eef3ce21f
commit
6acfc50bcc
Notes:
git
2023-08-09 13:54:45 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2
yjit.rb
2
yjit.rb
@ -262,7 +262,7 @@ module RubyVM::YJIT
|
|||||||
print_counters(stats, out: out, prefix: 'opt_aref_', prompt: 'opt_aref exit reasons: ')
|
print_counters(stats, out: out, prefix: 'opt_aref_', prompt: 'opt_aref exit reasons: ')
|
||||||
print_counters(stats, out: out, prefix: 'opt_aref_with_', prompt: 'opt_aref_with exit reasons: ')
|
print_counters(stats, out: out, prefix: 'opt_aref_with_', prompt: 'opt_aref_with exit reasons: ')
|
||||||
print_counters(stats, out: out, prefix: 'expandarray_', prompt: 'expandarray exit reasons: ')
|
print_counters(stats, out: out, prefix: 'expandarray_', prompt: 'expandarray exit reasons: ')
|
||||||
print_counters(stats, out: out, prefix: 'opt_getinlinecache_', prompt: 'opt_getinlinecache exit reasons: ')
|
print_counters(stats, out: out, prefix: 'opt_getconstant_path_', prompt: 'opt_getconstant_path exit reasons: ')
|
||||||
print_counters(stats, out: out, prefix: 'invalidate_', prompt: 'invalidation reasons: ')
|
print_counters(stats, out: out, prefix: 'invalidate_', prompt: 'invalidation reasons: ')
|
||||||
|
|
||||||
# Number of failed compiler invocations
|
# Number of failed compiler invocations
|
||||||
|
@ -7864,6 +7864,7 @@ fn gen_opt_getconstant_path(
|
|||||||
if ice.is_null() {
|
if ice.is_null() {
|
||||||
// In this case, leave a block that unconditionally side exits
|
// In this case, leave a block that unconditionally side exits
|
||||||
// for the interpreter to invalidate.
|
// for the interpreter to invalidate.
|
||||||
|
gen_counter_incr(asm, Counter::opt_getconstant_path_no_ic_entry);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7884,7 +7885,7 @@ fn gen_opt_getconstant_path(
|
|||||||
// Check the result. SysV only specifies one byte for _Bool return values,
|
// Check the result. SysV only specifies one byte for _Bool return values,
|
||||||
// so it's important we only check one bit to ignore the higher bits in the register.
|
// so it's important we only check one bit to ignore the higher bits in the register.
|
||||||
asm.test(ret_val, 1.into());
|
asm.test(ret_val, 1.into());
|
||||||
asm.jz(Target::side_exit(Counter::opt_getinlinecache_miss));
|
asm.jz(Target::side_exit(Counter::opt_getconstant_path_ic_miss));
|
||||||
|
|
||||||
let inline_cache = asm.load(Opnd::const_ptr(ic as *const u8));
|
let inline_cache = asm.load(Opnd::const_ptr(ic as *const u8));
|
||||||
|
|
||||||
@ -7906,6 +7907,7 @@ fn gen_opt_getconstant_path(
|
|||||||
} else {
|
} else {
|
||||||
// Optimize for single ractor mode.
|
// Optimize for single ractor mode.
|
||||||
if !assume_single_ractor_mode(jit, asm, ocb) {
|
if !assume_single_ractor_mode(jit, asm, ocb) {
|
||||||
|
gen_counter_incr(asm, Counter::opt_getconstant_path_multi_ractor);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,9 @@ make_counters! {
|
|||||||
|
|
||||||
opt_case_dispatch_megamorphic,
|
opt_case_dispatch_megamorphic,
|
||||||
|
|
||||||
opt_getinlinecache_miss,
|
opt_getconstant_path_ic_miss,
|
||||||
|
opt_getconstant_path_no_ic_entry,
|
||||||
|
opt_getconstant_path_multi_ractor,
|
||||||
|
|
||||||
expandarray_splat,
|
expandarray_splat,
|
||||||
expandarray_postarg,
|
expandarray_postarg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user