@@ -135,14 +135,14 @@ dump_stack(_PyInterpreterFrame *frame, PyObject **stack_pointer)
135
135
static void
136
136
lltrace_instruction (_PyInterpreterFrame * frame ,
137
137
PyObject * * stack_pointer ,
138
- _Py_CODEUNIT * next_instr )
138
+ _Py_CODEUNIT * next_instr ,
139
+ int opcode ,
140
+ int oparg )
139
141
{
140
142
if (frame -> owner == FRAME_OWNED_BY_CSTACK ) {
141
143
return ;
142
144
}
143
145
dump_stack (frame , stack_pointer );
144
- int oparg = next_instr -> op .arg ;
145
- int opcode = next_instr -> op .code ;
146
146
const char * opname = _PyOpcode_OpName [opcode ];
147
147
assert (opname != NULL );
148
148
int offset = (int )(next_instr - _PyCode_CODE (_PyFrame_GetCode (frame )));
@@ -1051,9 +1051,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
1051
1051
pop_1_error_tier_two :
1052
1052
STACK_SHRINK (1 );
1053
1053
error_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" ,
1055
1055
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 ]);
1057
1058
OPT_HIST (trace_uop_execution_counter , trace_run_length_hist );
1058
1059
frame -> return_offset = 0 ; // Don't leave this random
1059
1060
_PyFrame_SetStackPointer (frame , stack_pointer );
@@ -1064,14 +1065,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
1064
1065
deoptimize :
1065
1066
// On DEOPT_IF we just repeat the last instruction.
1066
1067
// 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" ,
1068
1070
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 ]);
1070
1073
OPT_HIST (trace_uop_execution_counter , trace_run_length_hist );
1071
1074
UOP_STAT_INC (uopcode , miss );
1072
1075
frame -> return_offset = 0 ; // Dispatch to frame->instr_ptr
1073
1076
_PyFrame_SetStackPointer (frame , stack_pointer );
1074
- frame -> instr_ptr = next_uop [-1 ].target + _PyCode_CODE (_PyFrame_GetCode (frame ));
1075
1077
Py_DECREF (current_executor );
1076
1078
// Fall through
1077
1079
// Jump here from ENTER_EXECUTOR
0 commit comments