@@ -135,14 +135,14 @@ dump_stack(_PyInterpreterFrame *frame, PyObject **stack_pointer)
135135static void
136136lltrace_instruction (_PyInterpreterFrame * frame ,
137137 PyObject * * stack_pointer ,
138- _Py_CODEUNIT * next_instr )
138+ _Py_CODEUNIT * next_instr ,
139+ int opcode ,
140+ int oparg )
139141{
140142 if (frame -> owner == FRAME_OWNED_BY_CSTACK ) {
141143 return ;
142144 }
143145 dump_stack (frame , stack_pointer );
144- int oparg = next_instr -> op .arg ;
145- int opcode = next_instr -> op .code ;
146146 const char * opname = _PyOpcode_OpName [opcode ];
147147 assert (opname != NULL );
148148 int offset = (int )(next_instr - _PyCode_CODE (_PyFrame_GetCode (frame )));
@@ -1051,9 +1051,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
10511051pop_1_error_tier_two :
10521052 STACK_SHRINK (1 );
10531053error_tier_two :
1054- DPRINTF (2 , "Error: [UOp %d (%s), oparg %d, operand %" PRIu64 ", target %d @ %d]\n" ,
1054+ DPRINTF (2 , "Error: [UOp %d (%s), oparg %d, operand %" PRIu64 ", target %d @ %d -> %s ]\n" ,
10551055 uopcode , _PyUOpName (uopcode ), next_uop [-1 ].oparg , next_uop [-1 ].operand , next_uop [-1 ].target ,
1056- (int )(next_uop - current_executor -> trace - 1 ));
1056+ (int )(next_uop - current_executor -> trace - 1 ),
1057+ _PyOpcode_OpName [frame -> instr_ptr -> op .code ]);
10571058 OPT_HIST (trace_uop_execution_counter , trace_run_length_hist );
10581059 frame -> return_offset = 0 ; // Don't leave this random
10591060 _PyFrame_SetStackPointer (frame , stack_pointer );
@@ -1064,14 +1065,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
10641065deoptimize :
10651066 // On DEOPT_IF we just repeat the last instruction.
10661067 // This presumes nothing was popped from the stack (nor pushed).
1067- DPRINTF (2 , "DEOPT: [UOp %d (%s), oparg %d, operand %" PRIu64 ", target %d @ %d]\n" ,
1068+ frame -> instr_ptr = next_uop [-1 ].target + _PyCode_CODE (_PyFrame_GetCode (frame ));
1069+ DPRINTF (2 , "DEOPT: [UOp %d (%s), oparg %d, operand %" PRIu64 ", target %d @ %d -> %s]\n" ,
10681070 uopcode , _PyUOpName (uopcode ), next_uop [-1 ].oparg , next_uop [-1 ].operand , next_uop [-1 ].target ,
1069- (int )(next_uop - current_executor -> trace - 1 ));
1071+ (int )(next_uop - current_executor -> trace - 1 ),
1072+ _PyOpcode_OpName [frame -> instr_ptr -> op .code ]);
10701073 OPT_HIST (trace_uop_execution_counter , trace_run_length_hist );
10711074 UOP_STAT_INC (uopcode , miss );
10721075 frame -> return_offset = 0 ; // Dispatch to frame->instr_ptr
10731076 _PyFrame_SetStackPointer (frame , stack_pointer );
1074- frame -> instr_ptr = next_uop [-1 ].target + _PyCode_CODE (_PyFrame_GetCode (frame ));
10751077 Py_DECREF (current_executor );
10761078 // Fall through
10771079// Jump here from ENTER_EXECUTOR
0 commit comments