Skip to content

gh-153293: Clear opcode statistics in the live profiler's reset_stats()#153295

Merged
pablogsal merged 1 commit into
python:mainfrom
lkk7:fix-live-profiler-reset-opcode-stats
Jul 11, 2026
Merged

gh-153293: Clear opcode statistics in the live profiler's reset_stats()#153295
pablogsal merged 1 commit into
python:mainfrom
lkk7:fix-live-profiler-reset-opcode-stats

Conversation

@lkk7

@lkk7 lkk7 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

LiveStatsCollector.reset_stats() cleared everything except the aggregated opcode_stats.
So after pressing r in --opcodes live mode the opcode panel kept counting instead of resetting.

Clear the opcodes counter correctly and extend the tests.

If this is merged, then 3.15 backport is needed.

@pablogsal pablogsal added awaiting review needs backport to 3.15 pre-release feature fixes, bugs and security fixes and removed awaiting merge labels Jul 11, 2026
@pablogsal

Copy link
Copy Markdown
Member

Thanks a lot for the fix ❤️

@pablogsal pablogsal merged commit 43b0e01 into python:main Jul 11, 2026
62 of 63 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @lkk7 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153586 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 11, 2026
@lkk7 lkk7 deleted the fix-live-profiler-reset-opcode-stats branch July 11, 2026 17:53
pablogsal pushed a commit that referenced this pull request Jul 11, 2026
…t_stats() (GH-153295) (#153586)

gh-153293: Clear opcode statistics in the live profiler's reset_stats() (GH-153295)
(cherry picked from commit 43b0e01)

Co-authored-by: Łukasz <lukaszlapinski7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants