Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Keep ``_PyEval_EvalFrameDefault`` as a separate frame in the C call stack
when Python is built with the tail-calling interpreter
(:option:`--with-tail-call-interp`), so that stack unwinders, profilers and
other tools that walk the stack can find the interpreter loop.
8 changes: 7 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,13 @@ dtrace_function_return(_PyInterpreterFrame *frame)
}
#endif

PyObject* _Py_HOT_FUNCTION DONT_SLP_VECTORIZE
/*
* _PyEval_EvalFrameDefault must remain a separate frame in the C call stack:
* stack unwinders, profilers and other tools that walk the stack use it to
* find the interpreter loop. With the tail-calling interpreter it is small
* enough to be inlined into its callers, e.g. by Clang with PGO.
*/
Py_NO_INLINE PyObject* _Py_HOT_FUNCTION DONT_SLP_VECTORIZE
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
{
_Py_EnsureTstateNotNULL(tstate);
Expand Down
Loading