diff options
author | Savannah Ostrowski <savannahostrowski@gmail.com> | 2024-09-26 17:35:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 00:35:42 +0000 |
commit | 65f12370982b9982b204d07f9f26ca8740f21845 (patch) | |
tree | 4ae4d96bd67052e4c801a805292fb081adf792b4 /Python/bytecodes.c | |
parent | 23e812b84ae688a56a1011ed69a0d178c70e35ea (diff) | |
download | cpython-65f12370982b9982b204d07f9f26ca8740f21845.tar.gz cpython-65f12370982b9982b204d07f9f26ca8740f21845.zip |
GH-123516: Improve JIT memory consumption by invalidating cold executors (GH-124443)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 0fd396f1319..8535306d9c7 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -4836,6 +4836,14 @@ dummy_func( assert(((_PyExecutorObject *)executor)->vm_data.valid); } + tier2 op(_MAKE_WARM, (--)) { + current_executor->vm_data.warm = true; + // It's okay if this ends up going negative. + if (--tstate->interp->trace_run_counter == 0) { + _Py_set_eval_breaker_bit(tstate, _PY_EVAL_JIT_INVALIDATE_COLD_BIT); + } + } + tier2 op(_FATAL_ERROR, (--)) { assert(0); Py_FatalError("Fatal error uop executed."); |