Skip to content

Commit 0721cea

Browse files
committed
Tracing of Python functions is handled at entry not call.
1 parent d7a99c1 commit 0721cea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/ceval.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4641,7 +4641,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
46414641
if (Py_TYPE(function) == &PyFunction_Type) {
46424642
PyCodeObject *code = (PyCodeObject*)PyFunction_GET_CODE(function);
46434643
int is_coro = code->co_flags & (CO_GENERATOR | CO_COROUTINE | CO_ASYNC_GENERATOR);
4644-
inline_call = (is_coro || cframe.use_tracing) ? 0 : 1;
4644+
inline_call = !is_coro;
46454645
}
46464646

46474647
if (!inline_call) {
@@ -4656,7 +4656,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
46564656
DISPATCH();
46574657
}
46584658

4659-
assert(!cframe.use_tracing);
46604659
InterpreterFrame *new_frame = _PyEval_FrameFromPyFunctionAndArgs(tstate, stack_pointer-oparg, oparg, function);
46614660
if (new_frame == NULL) {
46624661
// When we exit here, we own all variables in the stack (the frame creation has not stolen

0 commit comments

Comments
 (0)