Skip to content
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

GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops #118482

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4111,7 +4111,6 @@ dummy_func(
#ifndef _Py_JIT
next_uop = &current_executor->trace[1];
#endif
CHECK_EVAL_BREAKER();
}

tier2 op(_SET_IP, (instr_ptr/4 --)) {
Expand Down
1 change: 0 additions & 1 deletion Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ translate_bytecode_to_trace(
if (opcode == JUMP_BACKWARD || opcode == JUMP_BACKWARD_NO_INTERRUPT) {
instr += 1 + _PyOpcode_Caches[opcode] - (int32_t)oparg;
initial_instr = instr;
if (opcode == JUMP_BACKWARD) {
ADD_TO_TRACE(_TIER2_RESUME_CHECK, 0, 0, target);
gvanrossum marked this conversation as resolved.
Show resolved Hide resolved
}
continue;
}
else {
Expand Down
1 change: 0 additions & 1 deletion Tools/jit/template.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ _JIT_ENTRY(_PyInterpreterFrame *frame, PyObject **stack_pointer, PyThreadState *

// The actual instruction definitions (only one will be used):
if (uopcode == _JUMP_TO_TOP) {
CHECK_EVAL_BREAKER();
PATCH_JUMP(_JIT_TOP);
}
switch (uopcode) {
Expand Down
Loading