diff options
author | Mark Shannon <mark@hotpy.org> | 2022-07-28 10:17:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 10:17:22 +0100 |
commit | b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98 (patch) | |
tree | 2c1c782386166f700a091b064b113082aec31f39 /Include/internal/pycore_pystate.h | |
parent | ea269b9a380a52828d4e401fa695737bcd699398 (diff) | |
download | cpython-git-b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98.tar.gz |
GH-90081: Run python tracers at full speed (GH-95328)
Diffstat (limited to 'Include/internal/pycore_pystate.h')
-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 b4a39b62b7..51d119c23e 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); } |