gh-107674: Improve performance of sys.settrace (GH-117133)

* Check tracing in RESUME_CHECK

* Only change to RESUME_CHECK if not tracing
This commit is contained in:
Tian Gao 2024-05-03 11:49:24 -07:00 committed by GitHub
parent 998c3856c1
commit 9c14ed0618
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 63 additions and 52 deletions

View file

@ -4346,7 +4346,7 @@
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();
}
assert(eval_breaker == FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version));
assert(tstate->tracing || eval_breaker == FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version));
break;
}