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-92031: Deoptimize Static Code at Finalization#92039

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
markshannon merged 8 commits intopython:mainfromsweeneyde:unquicken
May 3, 2022

Conversation

@sweeneyde
Copy link
Member

@sweeneydesweeneyde commentedApr 29, 2022
edited
Loading

#92031

TODO:

  • Find a more deterministic test case
  • Decide on EXTENDED_ARG_QUICK/EXTENDED_ARG behavior

@sweeneydesweeneyde added type-bugAn unexpected behavior, bug, or error interpreter-core(Objects, Python, Grammar, and Parser dirs) 3.11only security fixes 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelsApr 29, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@sweeneyde for commitdf424cf 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelApr 29, 2022
@sweeneyde
Copy link
MemberAuthor

sweeneyde commentedApr 29, 2022
edited
Loading

One remark: this will convert EXTENDED_ARG_QUICK to EXTENDED_ARG for subsequent interpreters using this code, even though EXTENDED_ARG_QUICK is the one emitted by the compiler.

We should probably add a case forEXTENDED_ARG --> EXTENDED_ARG_QUICK in_PyCode_Quicken. Though we have a choice: do we

  1. Emit (unquickened) EXTENDED_ARG in the compiler, to letdeopt_code() convert it back to that state. This makes unquickened EXTENDED_ARG opcodes a hair slower, but adds consistency between interpreter invocations.
  2. Continue emitting EXTENDED_ARG_QUICK. Then most programs will start as EXTENDED_ARG_QUICK, but there will be an inconsistency between before and after the firstPy_FINALIZE()
  3. Add a special case todeopt_code that keeps EXTENDED_ARG_QUICK as is.

The central issue is that_PyOpcode_Deopt[] has two different contradictory meanings in this case: one is "restore to the original" and one is "what to do during tracing".

@markshannon
Copy link
Member

Feel free to add another table, they are only 256 bytes.
Maybe_PyOpcode_Original for restoring back to the original?

@sweeneydesweeneyde added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 2, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@sweeneyde for commitad9a38a 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 2, 2022
@sweeneyde
Copy link
MemberAuthor

@markshannon is this okay to merge now?

@markshannon
Copy link
Member

Yes it is

@vstinner
Copy link
Member

        for i in range(50):            out, err = run("test_repeated_init_exec", code, timeout=60)

test_repeated_init_exec() already repeats the code 4 times. What is the point of repeating the test 50 x 4 = 200 times?

@sweeneyde
Copy link
MemberAuthor

        for i in range(50):            out, err = run("test_repeated_init_exec", code, timeout=60)

test_repeated_init_exec() already repeats the code 4 times. What is the point of repeating the test 50 x 4 = 200 times?

The failure was still intermittent when I tried it, and just 4 runs only made the test fail about 10-15% of the time when I measured.

@sweeneydesweeneyde deleted the unquicken branchMay 5, 2022 02:27
@vstinner
Copy link
Member

The failure was still intermittent when I tried it, and just 4 runs only made the test fail about 10-15% of the time when I measured.

The Python test suite is run many times per day on each CI job and we have tons of CI jobs. IMO there is no need to loop so many tests inside the test.

On buildbots, it's very common that bugs which is barely possible to trigger manually when I really want to reproduce them... fail all the time on a specific worker because each worker has different timings and a different operating system ;-)

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

Reviewers

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

1 more reviewer

@neoneneneoneneneonene left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@sweeneyde@bedevere-bot@markshannon@vstinner@neonene

[8]ページ先頭

©2009-2025 Movatter.jp