@@ -113,7 +113,7 @@ insert_executor(PyCodeObject *code, _Py_CODEUNIT *instr, int index, _PyExecutorO
113113}
114114
115115static _PyExecutorObject *
116- make_executor_from_uops (_PyUOpInstruction * buffer , int length , const _PyBloomFilter * dependencies , int chain_depth );
116+ make_executor_from_uops (_PyThreadStateImpl * tstate , _PyUOpInstruction * buffer , int length , const _PyBloomFilter * dependencies );
117117
118118static int
119119uop_optimize (_PyInterpreterFrame * frame , PyThreadState * tstate ,
@@ -1328,7 +1328,7 @@ sanity_check(_PyExecutorObject *executor)
13281328 * and not a NOP.
13291329 */
13301330static _PyExecutorObject *
1331- make_executor_from_uops (_PyUOpInstruction * buffer , int length , const _PyBloomFilter * dependencies , int chain_depth )
1331+ make_executor_from_uops (_PyThreadStateImpl * tstate , _PyUOpInstruction * buffer , int length , const _PyBloomFilter * dependencies )
13321332{
13331333 int exit_count = count_exits (buffer , length );
13341334 _PyExecutorObject * executor = allocate_executor (exit_count , length );
@@ -1337,12 +1337,15 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
13371337 }
13381338
13391339 /* Initialize exits */
1340+ int chain_depth = tstate -> jit_tracer_state .initial_state .chain_depth ;
13401341 _PyExecutorObject * cold = _PyExecutor_GetColdExecutor ();
13411342 _PyExecutorObject * cold_dynamic = _PyExecutor_GetColdDynamicExecutor ();
13421343 cold -> vm_data .chain_depth = chain_depth ;
13431344 for (int i = 0 ; i < exit_count ; i ++ ) {
13441345 executor -> exits [i ].index = i ;
1345- executor -> exits [i ].temperature = initial_temperature_backoff_counter ();
1346+ executor -> exits [i ].temperature = initial_temperature_backoff_counter (
1347+ tstate -> jit_metrics .side_exit_initial_value ,
1348+ tstate -> jit_metrics .side_exit_initial_backoff );
13461349 }
13471350 int next_exit = exit_count - 1 ;
13481351 _PyUOpInstruction * dest = (_PyUOpInstruction * )& executor -> trace [length ];
@@ -1510,7 +1513,7 @@ uop_optimize(
15101513 length = prepare_for_execution (buffer , length );
15111514 assert (length <= UOP_MAX_TRACE_LENGTH );
15121515 _PyExecutorObject * executor = make_executor_from_uops (
1513- buffer , length , dependencies , _tstate -> jit_tracer_state . initial_state . chain_depth );
1516+ _tstate , buffer , length , dependencies );
15141517 if (executor == NULL ) {
15151518 return -1 ;
15161519 }
0 commit comments