From 4eae1e53425d3a816a26760f28d128a4f05c1da4 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Fri, 25 Aug 2023 12:12:59 -0700 Subject: GH-106581: Fix instrumentation in tier 2 (GH-108493) --- Python/generated_cases.c.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Python/generated_cases.c.h') diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 4aa16f8311a..3f46f1a10a2 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -8,17 +8,19 @@ } TARGET(RESUME) { - #if TIER_ONE assert(frame == tstate->current_frame); /* Possibly combine this with eval breaker */ if (_PyFrame_GetCode(frame)->_co_instrumentation_version != tstate->interp->monitoring_version) { int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); if (err) goto error; + #if TIER_ONE next_instr--; + #endif + #if TIER_TWO + goto deoptimize; + #endif } - else - #endif - if (oparg < 2) { + else if (oparg < 2) { CHECK_EVAL_BREAKER(); } DISPATCH(); -- cgit v1.2.3