gh-161827: Mark `_PyEval_EvalFrameDefault` as `Py_NO_INLINE` (GH-161829)

gh-161827: Mark _PyEval_EvalFrameDefault as Py_NO_INLINE

Signed-off-by: Iason Krommydas <iason.krom@gmail.com>
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-11-11-21-52-02.gh-issue-161827.3PD3RK.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-11-11-21-52-02.gh-issue-161827.3PD3RK.rst
new file mode 100644
index 0000000..2ae6517
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-11-11-21-52-02.gh-issue-161827.3PD3RK.rst
@@ -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.
diff --git a/Python/ceval.c b/Python/ceval.c
index 0d053cd..ccc0edc 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1200,7 +1200,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);