From 7982d08f02a0ba5a3d5d78263c0e43cc1f6c5d78 Mon Sep 17 00:00:00 2001 From: Ken Jin Date: Sat, 17 Jan 2026 12:32:24 +0000 Subject: [PATCH 1/2] Export JIT functions for _testinternalcapi --- Include/internal/pycore_optimizer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/internal/pycore_optimizer.h b/Include/internal/pycore_optimizer.h index b4d19eb69511d2..5f92a86f813aae 100644 --- a/Include/internal/pycore_optimizer.h +++ b/Include/internal/pycore_optimizer.h @@ -225,7 +225,7 @@ PyAPI_FUNC(int) _PyDumpExecutors(FILE *out); PyAPI_FUNC(void) _Py_ClearExecutorDeletionList(PyInterpreterState *interp); #endif -int _PyJit_translate_single_bytecode_to_trace(PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *next_instr, int stop_tracing_opcode); +PyAPI_FUNC(int) _PyJit_translate_single_bytecode_to_trace(PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *next_instr, int stop_tracing_opcode); PyAPI_FUNC(int) _PyJit_TryInitializeTracing(PyThreadState *tstate, _PyInterpreterFrame *frame, @@ -233,7 +233,7 @@ _PyJit_TryInitializeTracing(PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *close_loop_instr, int curr_stackdepth, int chain_depth, _PyExitData *exit, int oparg, _PyExecutorObject *current_executor); -void _PyJit_FinalizeTracing(PyThreadState *tstate, int err); +PyAPI_FUNC(void) _PyJit_FinalizeTracing(PyThreadState *tstate, int err); void _PyJit_TracerFree(_PyThreadStateImpl *_tstate); void _PyJit_Tracer_InvalidateDependency(PyThreadState *old_tstate, void *obj); From b0c48193a80fdb35f6de5115aef87d5b94fc6905 Mon Sep 17 00:00:00 2001 From: Ken Jin Date: Sat, 17 Jan 2026 12:35:33 +0000 Subject: [PATCH 2/2] Add testinternalcapi to paths to run JIT CI on --- .github/workflows/jit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index a6bade2c044f80..cd6e9875d282d2 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -7,6 +7,7 @@ on: - 'Python/optimizer*.c' - 'Python/executor_cases.c.h' - 'Python/optimizer_cases.c.h' + - '**_testinternalcapi**' - '!Python/perf_jit_trampoline.c' - '!**/*.md' - '!**/*.ini' @@ -17,6 +18,7 @@ on: - 'Python/optimizer*.c' - 'Python/executor_cases.c.h' - 'Python/optimizer_cases.c.h' + - '**_testinternalcapi**' - '!Python/perf_jit_trampoline.c' - '!**/*.md' - '!**/*.ini'