Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend#148089
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
1bfa1762f9438a709c0a1ef6ac2421f7122b99fe61d09afb5c9957c394475467d3e4c42c1b5e02409b2f88a91dc4e12f044bd251e1d93208386c23a83fd8abc90056397d8be4559b1647a5e1fe9324df0e69443b751a1d9896e4fe13641599fbec7576b9c9ed565f41598d33264f34687661e7b9c75bb6bafa264f2bde9e8ce4b53bde4926File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3529,7 +3529,7 @@ dummy_func( | ||
| int og_oparg = (oparg & ~255) | executor->vm_data.oparg; | ||
| next_instr = this_instr; | ||
| if (_PyJit_EnterExecutorShouldStopTracing(og_opcode)) { | ||
| if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) { | ||
| if (_PyOpcode_Caches[_PyOpcode_Deopt[og_opcode]]) { | ||
| PAUSE_ADAPTIVE_COUNTER(this_instr[1].counter); | ||
| } | ||
| opcode = og_opcode; | ||
| @@ -6541,7 +6541,10 @@ dummy_func( | ||
| tracer->prev_state.instr_frame = frame; | ||
| tracer->prev_state.instr_oparg = oparg; | ||
| tracer->prev_state.instr_stacklevel = PyStackRef_IsNone(frame->f_executable) ? 2 : STACK_LEVEL(); | ||
| if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) { | ||
| if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]] | ||
cocolato marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // Branch opcodes use the cache for branch history, not | ||
| // specialization counters. Don't reset it. | ||
| && !IS_CONDITIONAL_JUMP_OPCODE(opcode)) { | ||
| (&next_instr[1])->counter = trigger_backoff_counter(); | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE:
The problem here is that when tracing loops, we are treating the start of the loop as the closing point, but we want to stop at the end of the loop otherwise.
We probably need to make the back edge quality calculation a bit more complex.
(this can be fixed in a separate PR if would complicate this PR too much)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to do this in next PR.