bpo-45923: Decouple suspension of tracing from tracing flag. (GH-31908)

This commit is contained in:
Mark Shannon 2022-03-15 17:06:21 +00:00 committed by GitHub
parent a8c728b8b7
commit 099f756141
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 39 deletions

View file

@ -139,14 +139,9 @@ PyAPI_FUNC(void) _PyThreadState_DeleteExcept(
_PyRuntimeState *runtime,
PyThreadState *tstate);
static inline void
_PyThreadState_PauseTracing(PyThreadState *tstate)
{
tstate->cframe->use_tracing = 0;
}
static inline void
_PyThreadState_ResumeTracing(PyThreadState *tstate)
_PyThreadState_UpdateTracingState(PyThreadState *tstate)
{
int use_tracing = (tstate->c_tracefunc != NULL
|| tstate->c_profilefunc != NULL);