mirror of
https://github.com/python/cpython.git
synced 2026-06-28 03:41:13 +00:00
[3.15] gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609) (gh-151648)
gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609)
(cherry picked from commit 3fa92e7c55)
Co-authored-by: Donghee Na <donghee.na@python.org>
This commit is contained in:
parent
d9a1bff40b
commit
c0582dbe7f
1 changed files with 6 additions and 1 deletions
|
|
@ -18,8 +18,13 @@ int Test_EvalFrame_Resumes, Test_EvalFrame_Loads;
|
|||
static int
|
||||
stop_tracing_and_jit(PyThreadState *tstate, _PyInterpreterFrame *frame)
|
||||
{
|
||||
(void)(tstate);
|
||||
(void)(frame);
|
||||
// Don't actually JIT-compile in this test eval-frame, but we still must
|
||||
// finalize the tracer so the thread-global is_tracing flag is reset.
|
||||
// Otherwise a trace started inside this duplicated interpreter loop
|
||||
// (reachable under low JIT thresholds, e.g. PYTHON_JIT_STRESS=1) would
|
||||
// leave is_tracing stuck true and permanently disable the JIT.
|
||||
_PyJit_FinalizeTracing(tstate, 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue