summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bernstein <rubybugs@bernsteinbear.com>2026-01-22 17:53:28 -0500
committerGitHub <noreply@github.com>2026-01-22 14:53:28 -0800
commitc1dde6d3877ad6f08879627689f4eb61d2eed478 (patch)
treed9e405123b2b41fcf212c66518a360ba2f416550
parent51a030833c61255ea85e7b75951f873c957e393b (diff)
ZJIT: Count GuardBitEquals for shapes as GuardShape in stats (#15936)
This brings back the GuardShape exit ratio in stats.
-rw-r--r--zjit/src/codegen.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs
index 1729d44041..8714518866 100644
--- a/zjit/src/codegen.rs
+++ b/zjit/src/codegen.rs
@@ -2276,6 +2276,9 @@ fn gen_guard_type_not(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, g
/// Compile an identity check with a side exit
fn gen_guard_bit_equals(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, expected: crate::hir::Const, reason: SideExitReason, state: &FrameState) -> lir::Opnd {
+ if matches!(reason, SideExitReason::GuardShape(_) ) {
+ gen_incr_counter(asm, Counter::guard_shape_count);
+ }
let expected_opnd: Opnd = match expected {
crate::hir::Const::Value(v) => { Opnd::Value(v) }
crate::hir::Const::CInt64(v) => { v.into() }