GH-106581: Fix instrumentation in tier 2 (GH-108493)

This commit is contained in:
Brandt Bucher 2023-08-25 12:12:59 -07:00 committed by GitHub
parent 5f41376e93
commit 4eae1e5342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 12 deletions

View file

@ -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();