PyThreadState *tstate);
static inline void
-_PyThreadState_DisableTracing(PyThreadState *tstate)
+_PyThreadState_PauseTracing(PyThreadState *tstate)
{
tstate->cframe->use_tracing = 0;
}
static inline void
-_PyThreadState_ResetTracing(PyThreadState *tstate)
+_PyThreadState_ResumeTracing(PyThreadState *tstate)
{
int use_tracing = (tstate->c_tracefunc != NULL
|| tstate->c_profilefunc != NULL);
if (tstate->tracing)
return 0;
tstate->tracing++;
- _PyThreadState_DisableTracing(tstate);
+ _PyThreadState_PauseTracing(tstate);
PyFrameObject *f = _PyFrame_GetFrameObject(frame);
if (f == NULL) {
return -1;
}
result = func(obj, f, what, arg);
f->f_lineno = 0;
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
tstate->tracing--;
return result;
}
PyObject *result;
tstate->tracing = 0;
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
result = PyObject_Call(func, args, NULL);
tstate->tracing = save_tracing;
tstate->cframe->use_tracing = save_use_tracing;
tstate->c_profilefunc = NULL;
tstate->c_profileobj = NULL;
/* Must make sure that tracing is not ignored if 'profileobj' is freed */
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
Py_XDECREF(profileobj);
Py_XINCREF(arg);
tstate->c_profilefunc = func;
/* Flag that tracing or profiling is turned on */
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
return 0;
}
tstate->c_tracefunc = NULL;
tstate->c_traceobj = NULL;
/* Must make sure that profiling is not ignored if 'traceobj' is freed */
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
Py_XDECREF(traceobj);
Py_XINCREF(arg);
tstate->c_tracefunc = func;
/* Flag that tracing or profiling is turned on */
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
return 0;
}
PyThreadState_EnterTracing(PyThreadState *tstate)
{
tstate->tracing++;
- _PyThreadState_DisableTracing(tstate);
+ _PyThreadState_PauseTracing(tstate);
}
void
PyThreadState_LeaveTracing(PyThreadState *tstate)
{
tstate->tracing--;
- _PyThreadState_ResetTracing(tstate);
+ _PyThreadState_ResumeTracing(tstate);
}