From b8b2990fb3218cffedfe7bc92e9e7ae2275b3c98 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 28 Jul 2022 10:17:22 +0100 Subject: GH-90081: Run python tracers at full speed (GH-95328) --- Include/internal/pycore_pystate.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Include/internal/pycore_pystate.h') 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); } -- cgit v1.2.1