FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-148726: Add heap_size to generational GC by sergey-miryanov · Pull Request #149195 · python/cpython · GitHub

/ cpython Public

GH-148726: Add heap_size to generational GC - #149195

Merged
pablogsal merged 11 commits into
python:mainfrom
sergey-miryanov:feat/gc-gen-3.15+heap_size
May 4, 2026
Merged

GH-148726: Add heap_size to generational GC#149195
pablogsal merged 11 commits into
python:mainfrom
sergey-miryanov:feat/gc-gen-3.15+heap_size

Conversation

sergey-miryanov commented Apr 30, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

sergey-miryanov changed the title Add heap_size to generational GC GH-148726: Add heap_size to generational GC Apr 30, 2026

Copy link
Copy Markdown
Member

LGTM.

hugovk added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 1, 2026

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hugovk for commit 2281499 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149195%2Fmerge

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

bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 1, 2026

Copy link
Copy Markdown
Contributor Author

Good catch by @DinoV in #149241. I believe we should cherry-pick those commits here.

hugovk commented May 2, 2026

Copy link
Copy Markdown
Member

Good catch by @DinoV in #149241. I believe we should cherry-pick those commits here.

Good idea.

sergey-miryanov requested a review from pablogsal as a code owner May 3, 2026 12:27

Copy link
Copy Markdown
Contributor Author

@zanieb @nascheme Could you please take another look? I've ported the 3.14 heap_size changes and included heap_size in get_gc_stats.

@DinoV FYI, the layout of _gc_runtime_state will change since we moved generation_stats to the heap.

nascheme commented May 3, 2026

Copy link
Copy Markdown
Member

I'd say for 3.15 we don't need the two dummy members and we could move generation0 back to it's old position. Preserving the member offsets should not be required for 3.15, right?

Copy link
Copy Markdown
Contributor Author

Since we're moving the stats to the heap, all subsequent offsets will shift anyway. There's no need to keep the dummy members.

I thought this would simplify backports if needed.

I'm happy to remove the dummy members and restore generation0 if you think that's cleaner.

nascheme commented May 4, 2026

Copy link
Copy Markdown
Member

I'm happy to remove the dummy members and restore generation0 if you think that's cleaner.

I think it's better to remove the dummy members. You don't have to restore generation0 since the code looks fine without that member. Other than that, this PR looks fine to me.

Copy link
Copy Markdown
Contributor Author

@nascheme Thanks! Done.

pablogsal 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Great job @sergey-miryanov

pablogsal merged commit e89568f into python:main May 4, 2026
69 checks passed

Copy link
Copy Markdown
Contributor Author

Thanks all!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL