GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-148726: Add heap_size to generational GC by sergey-miryanov · Pull Request #149195 · python/cpython

Conversation

@sergey-miryanov

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Forward-port generational GC #148726

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sergey-miryanov added 2 commits May 1, 2026 00:21
@sergey-miryanov
Add heap_size to _gc_runtime_state
b6ec992
@sergey-miryanov
Add heap_size to stats
2281499
@bedevere-app bedevere-app Bot added the awaiting review label Apr 30, 2026
@sergey-miryanov sergey-miryanov changed the title Add heap_size to generational GC GH-148726: Add heap_size to generational GC Apr 30, 2026
@sergey-miryanov sergey-miryanov added the skip news label Apr 30, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 30, 2026
Forward-port generational GC #148726
Closed
zanieb
zanieb approved these changes Apr 30, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Apr 30, 2026
@nascheme

nascheme commented Apr 30, 2026

Copy link
Copy Markdown
Member

LGTM.

sergey-miryanov reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nascheme
nascheme approved these changes Apr 30, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 30, 2026
@hugovk hugovk added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 1, 2026
@bedevere-bot

bedevere-bot commented 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

sergey-miryanov commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sergey-miryanov added 4 commits May 3, 2026 17:01
@sergey-miryanov
Heap size should be added at end of the struct
704e94e
Co-authored-by: Dino Viehland <[email protected]>
Co-authored-by: Neil Schemenauer <[email protected]>
@sergey-miryanov
Move heap_size to the end of the gc_generation_stats struct
83953c5
@sergey-miryanov
Merge branch 'main' into feat/gc-gen-3.15+heap_size
da497d1
@sergey-miryanov
Add heap_size to get_gc_stats
fd93679
@sergey-miryanov
sergey-miryanov requested a review from pablogsal as a code owner May 3, 2026 12:27
@sergey-miryanov
Make AC happy
344f32c
@sergey-miryanov

sergey-miryanov commented May 3, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nascheme

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sergey-miryanov

sergey-miryanov commented May 4, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sergey-miryanov
Merge branch 'main' into feat/gc-gen-3.15+heap_size
8a3a862
@nascheme

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sergey-miryanov
Remove dummy members
014d98a
sergey-miryanov added 2 commits May 4, 2026 18:05
@sergey-miryanov
Merge branch 'feat/gc-gen-3.15+heap_size' of github.com:sergey-miryan…
e268637
…ov/cpython into feat/gc-gen-3.15+heap_size
@sergey-miryanov
Remove extra line
7ba65db
@sergey-miryanov

sergey-miryanov commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@nascheme Thanks! Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pablogsal
pablogsal approved these changes May 4, 2026
View reviewed changes

@pablogsal pablogsal left a comment

Copy link
Copy Markdown
Member

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.

Great job @sergey-miryanov

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with hooray emoji sergey-miryanov reacted with heart emoji hugovk and sergey-miryanov reacted with rocket emoji
All reactions
  • 🎉 1 reaction
  • ❤️ 1 reaction
  • 🚀 2 reactions
@pablogsal
pablogsal merged commit e89568f into python:main May 4, 2026
69 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 4, 2026
@sergey-miryanov

sergey-miryanov commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks all!

hugovk reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@nascheme nascheme nascheme approved these changes
@zanieb zanieb zanieb approved these changes
@pablogsal pablogsal pablogsal approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@sergey-miryanov @nascheme @bedevere-bot @hugovk @zanieb @pablogsal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.