Skip to content

gh-116760: Fix pystats for trace attempts - #116761

Merged
Fidget-Spinner merged 1 commit into
python:mainfrom
mdboom:fix-optimization-stats
Mar 13, 2024
Merged

Fidget-Spinner merged 1 commit into
python:mainfrom
mdboom:fix-optimization-stats

Conversation

@mdboom

@mdboom mdboom commented Mar 13, 2024 •

Copy link
Copy Markdown
Contributor

There are now at least two bytecodes that may attempt to optimize, JUMP_BACK, and more recently, COLD_EXIT.

Only the JUMP_BACK was counting the attempt in the stats. This moves that counter to uop_optimize itself so it should always happen no matter where it is called from.

There are now at least two bytecodes that may attempt to optimize,
JUMP_BACK, and more recently, COLD_EXIT.

Only the JUMP_BACK was counting the attempt in the stats.
This moves that counter to uop_optimize itself so it should
always happen no matter where it is called from.

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merging...

@Fidget-Spinner
Fidget-Spinner merged commit cef0ec1 into python:main Mar 13, 2024
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
There are now at least two bytecodes that may attempt to optimize,
JUMP_BACK, and more recently, COLD_EXIT.

Only the JUMP_BACK was counting the attempt in the stats.
This moves that counter to uop_optimize itself so it should
always happen no matter where it is called from.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
There are now at least two bytecodes that may attempt to optimize,
JUMP_BACK, and more recently, COLD_EXIT.

Only the JUMP_BACK was counting the attempt in the stats.
This moves that counter to uop_optimize itself so it should
always happen no matter where it is called from.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
There are now at least two bytecodes that may attempt to optimize,
JUMP_BACK, and more recently, COLD_EXIT.

Only the JUMP_BACK was counting the attempt in the stats.
This moves that counter to uop_optimize itself so it should
always happen no matter where it is called from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance or resource usage skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants