_PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
ENTER_TRACING();
}
- // Don't add the JUMP_BACKWARD_JIT instruction to the trace.
- DISPATCH();
+ int _jump_taken = false;
+ PyCodeObject *old_code = _PyFrame_GetCode(frame);
+ PyFunctionObject *old_func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
+ TRACING_DISPATCH();
}
else {
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
_PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
ENTER_TRACING();
}
- DISPATCH();
+ int _jump_taken = false;
+ PyCodeObject *old_code = _PyFrame_GetCode(frame);
+ PyFunctionObject *old_func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
+ TRACING_DISPATCH();
}
else {
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
_PyJIT_InitializeTracing(tstate, frame, this_instr, STACK_LEVEL(), 0, NULL);
ENTER_TRACING();
}
+ int _jump_taken = false;
+ PyCodeObject *old_code = _PyFrame_GetCode(frame);
+ PyFunctionObject *old_func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
TRACING_DISPATCH();
}
else {
// Loop back to the start
if (is_first_instr && tstate->interp->jit_state.jit_tracer_code_curr_size > 2) {
- ADD_TO_TRACE(_CHECK_PERIODIC, 0, 0, target);
ADD_TO_TRACE(_JUMP_TO_TOP, 0, 0, 0);
goto done;
}
break;
}
case JUMP_BACKWARD_JIT:
- // This is possible as the JIT might have re-activated after it was disabled. // if (next_uop->opcode != _START_EXECUTOR) {
- // if (next_uop->format == UOP_FORMAT_TARGET) {
- // _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + next_uop->target;
- // printf(" aim=[%s]\n", _PyOpcode_OpName[aim->op.code]);
- // }
- // else if (next_uop->format == UOP_FORMAT_JUMP) {
- // _PyUOpInstruction *aim_uop = current_executor->trace + next_uop->jump_target;
- // if (aim_uop->format == UOP_FORMAT_TARGET) {
- // _Py_CODEUNIT *aim = _PyFrame_GetBytecode(frame) + aim_uop->target;
- // printf(" aim=[%s]\n", _PyOpcode_OpName[aim->op.code]);
- // }
- // }
- // }
+ // This is possible as the JIT might have re-activated after it was disabled
case JUMP_BACKWARD_NO_JIT:
case JUMP_BACKWARD:
ADD_TO_TRACE(_CHECK_PERIODIC, 0, 0, target);