Skip to content

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

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

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented May 1, 2024

Insert a _TIER2_RESUME_CHECK at the start of all traces starting at a back edge.
_JUMP_TO_TOP no longer performs an eval breaker check.

Also, simplify the handling of the eval breaker in tier 2:

  • Always drop to tier 1 if the eval breaker is set.
  • Guarantee progress by never entering tier 2 from tier 1 with the eval breaker set.

@brandtbucher
Copy link
Member

Can you remove the CHECK_EVAL_BREAKER(); from the _JUMP_TO_TOP special-case in Tools/jit/template.c?

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough, I have one question.

@markshannon markshannon requested a review from brandtbucher as a code owner May 1, 2024 18:00
@brandtbucher
Copy link
Member

Nice, that ended up being a lot cleaner than I thought it would be!

@markshannon markshannon merged commit 67bba9d into python:main May 2, 2024
@markshannon markshannon deleted the check_periodic_on_back_edges branch May 2, 2024 12:22
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants