diff options
author | Mark Shannon <mark@hotpy.org> | 2022-07-28 09:17:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 09:17:22 (GMT) |
commit | b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98 (patch) | |
tree | 2c1c782386166f700a091b064b113082aec31f39 /Include | |
parent | ea269b9a380a52828d4e401fa695737bcd699398 (diff) | |
download | cpython-b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98.zip cpython-b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98.tar.gz cpython-b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98.tar.bz2 |
GH-90081: Run python tracers at full speed (GH-95328)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_pystate.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index b4a39b6..51d119c 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -131,8 +131,9 @@ PyAPI_FUNC(void) _PyThreadState_DeleteExcept( static inline void _PyThreadState_UpdateTracingState(PyThreadState *tstate) { - int use_tracing = (tstate->c_tracefunc != NULL - || tstate->c_profilefunc != NULL); + bool use_tracing = + (tstate->tracing == 0) && + (tstate->c_tracefunc != NULL || tstate->c_profilefunc != NULL); tstate->cframe->use_tracing = (use_tracing ? 255 : 0); } |