summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-08-09 06:54:24 -0700
committerGitHub <noreply@github.com>2023-08-09 09:54:24 -0400
commit6acfc50bccf0c201f77c274281ac33920a0a6923 (patch)
tree2a7680392b73b14b6eb00e085b6914f76bfcadcc /yjit
parent5eef3ce21f09401814b9c4a1932e75f2fc962248 (diff)
YJIT: Count all opt_getconstant_path exit reasons (#8187)
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/codegen.rs4
-rw-r--r--yjit/src/stats.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 3c82bf3137..374fdddf3d 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -7864,6 +7864,7 @@ fn gen_opt_getconstant_path(
if ice.is_null() {
// In this case, leave a block that unconditionally side exits
// for the interpreter to invalidate.
+ gen_counter_incr(asm, Counter::opt_getconstant_path_no_ic_entry);
return None;
}
@@ -7884,7 +7885,7 @@ fn gen_opt_getconstant_path(
// 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.
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));
@@ -7906,6 +7907,7 @@ fn gen_opt_getconstant_path(
} else {
// Optimize for single ractor mode.
if !assume_single_ractor_mode(jit, asm, ocb) {
+ gen_counter_incr(asm, Counter::opt_getconstant_path_multi_ractor);
return None;
}
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs
index 0cd4ff2f44..620a038e32 100644
--- a/yjit/src/stats.rs
+++ b/yjit/src/stats.rs
@@ -353,7 +353,9 @@ make_counters! {
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_postarg,