Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-143183: Link trace to side exits, rather than stop#143268

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Fidget-Spinner merged 5 commits intopython:mainfromFidget-Spinner:fix-jit-side-exit
Dec 29, 2025

Conversation

@Fidget-Spinner
Copy link
Member

@Fidget-SpinnerFidget-Spinner commentedDec 29, 2025
edited by bedevere-appbot
Loading

#143187 caused a pretty serious regression in JIT performance, mainly because we stop the traceprior to the ENTER_EXECUTOR. This PR restores the old behavior, stopping the traceat the ENTER_EXECUTOR, allowing it to link up to the executor.

The perf regression can be clearly seen here (going up means things got slower):

image

savannahostrowski reacted with heart emoji
@Fidget-Spinner
Copy link
MemberAuthor

Before:
graphviz (34)

After (notice how more things are linked):

graphviz (35)

Copy link
Contributor

@diegorussodiegorusso left a comment

Choose a reason for hiding this comment

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

I see that#143187 add a test. Can we have it here as well?

Fidget-Spinner reacted with thumbs up emoji
@Fidget-Spinner
Copy link
MemberAuthor

I fixed the test in the test suite so that it catches it. I verified that without the change, the test fails. With the change, the test passes.

@Fidget-Spinner
Copy link
MemberAuthor

Also verified that:

At commit713684d (before my previous PR), this test passes.
At commitdaa9aa4 (the first commit with my PR), this test fails.
At commita9548b8 (current PR commit), this test passes.

So this does indeed restore the old behavior!

@Fidget-Spinner
Copy link
MemberAuthor

For the following code:

TIER2_THRESHOLD = 4001def f():    for x in range(TIER2_THRESHOLD + 3):        for y in range(TIER2_THRESHOLD + 3):            z = x + yimport sysf()sys._dump_tracelets("hello.gvz")

Current main (buggy):

graphviz (36)

This PR (notice how the traces now link up):

graphviz (37)

Copy link
Contributor

@diegorussodiegorusso left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the regression and adding the test for it!

@Fidget-SpinnerFidget-Spinner merged commit6cb245d intopython:mainDec 29, 2025
66 checks passed
@Fidget-SpinnerFidget-Spinner deleted the fix-jit-side-exit branchDecember 29, 2025 15:10
Copy link
Member

@tomasr8tomasr8 left a comment
edited
Loading

Choose a reason for hiding this comment

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

Damn you're too fast.. was about to hit approve when you merged it 😆

Fidget-Spinner reacted with laugh emoji
DPRINTF(2, "Unsupported: oparg too large\n");
unsupported:
{
// Rewind to previous instruction and replace with _EXIT_TRACE.
Copy link
Member

Choose a reason for hiding this comment

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

In the other PR, I meant to update this comment but GH shows the suggestions in a weird a way for unchanges lines.. The point is the comment mentions_EXIT_TRACE but it should be_DEOPT now :)

// Rewind to previous instruction and replace with _EXIT_TRACE.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Oh yeah. Good point!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@diegorussodiegorussodiegorusso approved these changes

@tomasr8tomasr8tomasr8 approved these changes

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Fidget-Spinner@diegorusso@tomasr8

[8]ページ先頭

©2009-2026 Movatter.jp