[3.15] gh-149335: Avoid JIT trace buffer asserts with overhead above FITNESS_INITIAL (GH-149633) (#150245)

gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633)
(cherry picked from commit 441af3a934)

Co-authored-by: Hai Zhu <haiizhu@outlook.com>
This commit is contained in:
Miss Islington (bot) 2026-05-24 09:18:58 +02:00 committed by GitHub
parent 6b17d1a783
commit 22c994cc92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 47 additions and 6 deletions

View file

@ -634,7 +634,7 @@ init_interpreter(PyInterpreterState *interp,
// Trace fitness configuration
init_policy(&interp->opt_config.fitness_initial,
"PYTHON_JIT_FITNESS_INITIAL",
FITNESS_INITIAL, EXIT_QUALITY_CLOSE_LOOP, UOP_MAX_TRACE_LENGTH - 1);
FITNESS_INITIAL, EXIT_QUALITY_CLOSE_LOOP, FITNESS_INITIAL);
interp->opt_config.specialization_enabled = !is_env_enabled("PYTHON_SPECIALIZATION_OFF");
interp->opt_config.uops_optimize_enabled = !is_env_disabled("PYTHON_UOPS_OPTIMIZE");