Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tracing of Python functions is handled at entry not call.
  • Loading branch information
markshannon committed Sep 23, 2021
commit 0721cea88f11173a4a3bd38a1d2507064892b9cc
3 changes: 1 addition & 2 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -4641,7 +4641,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
if (Py_TYPE(function) == &PyFunction_Type) {
PyCodeObject *code = (PyCodeObject*)PyFunction_GET_CODE(function);
int is_coro = code->co_flags & (CO_GENERATOR | CO_COROUTINE | CO_ASYNC_GENERATOR);
inline_call = (is_coro || cframe.use_tracing) ? 0 : 1;
inline_call = !is_coro;
}

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

assert(!cframe.use_tracing);
InterpreterFrame *new_frame = _PyEval_FrameFromPyFunctionAndArgs(tstate, stack_pointer-oparg, oparg, function);
Comment thread
Fidget-Spinner marked this conversation as resolved.
Outdated
if (new_frame == NULL) {
// When we exit here, we own all variables in the stack (the frame creation has not stolen
Expand Down