@@ -975,12 +975,12 @@ _PyObjectArray_Free(PyObject **array, PyObject **scratch)
975975
976976// 1 for trace full, 0 for successful write.
977977static int
978- add_to_code_trace (PyThreadState * tstate , _PyInterpreterFrame * frame , _Py_CODEUNIT * this_instr , _Py_CODEUNIT * next_instr , int oparg )
978+ add_to_code_trace (PyThreadState * tstate , _PyInterpreterFrame * frame , PyCodeObject * old_code , _Py_CODEUNIT * this_instr , _Py_CODEUNIT * next_instr , int oparg )
979979{
980980 assert (frame != NULL );
981981 assert (tstate -> interp -> jit_tracer_code_curr_size < UOP_MAX_TRACE_LENGTH );
982982 PyFunctionObject * func = (PyFunctionObject * )PyStackRef_AsPyObjectBorrow (frame -> f_funcobj );
983- return !_PyJIT_translate_single_bytecode_to_trace (tstate , this_instr , next_instr , _PyFrame_GetCode ( frame ) , func , oparg );
983+ return !_PyJIT_translate_single_bytecode_to_trace (tstate , this_instr , next_instr , old_code , func , oparg );
984984}
985985
986986/* _PyEval_EvalFrameDefault is too large to optimize for speed with PGO on MSVC.
@@ -1193,10 +1193,9 @@ _PyTier2Interpreter(
11931193 assert (next_uop -> opcode == _START_EXECUTOR || next_uop -> opcode == _COLD_EXIT );
11941194tier2_dispatch :
11951195 for (;;) {
1196- frame -> lltrace = 4 ;
11971196 uopcode = next_uop -> opcode ;
11981197#ifdef Py_DEBUG
1199- if (1 && next_uop -> opcode != _YIELD_VALUE ) {
1198+ if (frame -> lltrace >= 4 && next_uop -> opcode != _YIELD_VALUE ) {
12001199 // dump_stack(frame, stack_pointer);
12011200 if (next_uop -> opcode == _START_EXECUTOR ) {
12021201 printf ("%4d uop: " , 0 );
0 commit comments