Skip to content

Commit dfae71b

Browse files
committed
ZJIT: Count GuardBitEquals for shapes as GuardShape in stats
1 parent 253bfd7 commit dfae71b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

zjit/src/codegen.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,9 @@ fn gen_guard_type_not(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, g
22762276

22772277
/// Compile an identity check with a side exit
22782278
fn gen_guard_bit_equals(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, expected: crate::hir::Const, reason: SideExitReason, state: &FrameState) -> lir::Opnd {
2279+
if matches!(reason, SideExitReason::GuardShape(_) ) {
2280+
gen_incr_counter(asm, Counter::guard_shape_count);
2281+
}
22792282
let expected_opnd: Opnd = match expected {
22802283
crate::hir::Const::Value(v) => { Opnd::Value(v) }
22812284
crate::hir::Const::CInt64(v) => { v.into() }

0 commit comments

Comments
 (0)