8000 GH-118093: Better handling of short and mid-loop traces by brandtbucher · Pull Request #122252 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-118093: Better handling of short and mid-loop traces #122252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 29, 2024
Prev Previous commit
Next Next commit
Revert "Guard _Py_GetExecutor on non-tier-two builds"
This reverts commit 7c404a8.
  • Loading branch information
brandtbucher committed Jul 29, 2024
commit 1606abd27b05b558de8344f4a8d2f46c2d24091a
2 changes: 0 additions & 2 deletions Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,12 @@ is_resume(_PyInterpreterFrame *frame, uint8_t *oparg_p)
int offset = frame->instr_ptr - _PyCode_CODE(code);
uint8_t opcode = _Py_GetBaseOpcode(code, offset);
uint8_t oparg = frame->instr_ptr->op.arg;
#ifdef _Py_TIER2
if (opcode == ENTER_EXECUTOR) {
_PyExecutorObject *executor = _Py_GetExecutor(code, sizeof(_Py_CODEUNIT) * offset);
opcode = _PyOpcode_Deopt[executor->vm_data.opcode];
oparg = executor->vm_data.oparg;
Py_DECREF(executor);
}
#endif
if (opcode == RESUME) {
*oparg_p = oparg;
return true;
Expand Down
0