From 87ac00acbc48dada75b5e5327c7da5a6b4eae529 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Sun, 6 Oct 2024 20:02:23 +0800 Subject: [PATCH] fix jit ci --- Python/ceval.c | 3 +-- Python/ceval_macros.h | 5 +++++ Tools/jit/template.c | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Python/ceval.c b/Python/ceval.c index 9247b497ee0bf90..64044c548f47e80 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -276,8 +276,6 @@ static void monitor_throw(PyThreadState *tstate, static int check_args_iterable(PyThreadState *, PyObject *func, PyObject *vararg); static int get_exception_handler(PyCodeObject *, int, int*, int*, int*); -static void dtrace_function_entry(_PyInterpreterFrame *); -static void dtrace_function_return(_PyInterpreterFrame *); static _PyInterpreterFrame * _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func, PyObject *locals, Py_ssize_t nargs, PyObject *callargs, PyObject *kwargs, _PyInterpreterFrame *previous); @@ -819,6 +817,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int DTRACE_FUNCTION_ENTRY(); goto resume_with_error; } + /* Local "register" variables. * These are cached values from the frame and code object. */ _Py_CODEUNIT *next_instr; diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h index 1b69a8b5ff1cc5e..a728abb8aa18ffd 100644 --- a/Python/ceval_macros.h +++ b/Python/ceval_macros.h @@ -41,6 +41,8 @@ * the CFG. */ +#include "pycore_frame.h" + #ifdef WITH_DTRACE #define OR_DTRACE_LINE | (PyDTrace_LINE_ENABLED() ? 255 : 0) #else @@ -289,6 +291,9 @@ GETITEM(PyObject *v, Py_ssize_t i) { #define CONSTS() _PyFrame_GetCode(frame)->co_consts #define NAMES() _PyFrame_GetCode(frame)->co_names +static void dtrace_function_entry(_PyInterpreterFrame *); +static void dtrace_function_return(_PyInterpreterFrame *); + #define DTRACE_FUNCTION_EXIT() \ if (PyDTrace_FUNCTION_RETURN_ENABLED()) { \ dtrace_function_return(frame); \ diff --git a/Tools/jit/template.c b/Tools/jit/template.c index 6cf15085f79933d..b812cd322006abb 100644 --- a/Tools/jit/template.c +++ b/Tools/jit/template.c @@ -18,6 +18,7 @@ #include "pycore_sliceobject.h" #include "pycore_descrobject.h" #include "pycore_stackref.h" +#include "pydtrace.h" #include "ceval_macros.h"