-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
gh-100403: Collect GC statistics via -X option #100958
base: main
Are you sure you want to change the base?
Conversation
pablogsal
commented
Jan 11, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Improving GC collections: dynamic thresholds, single generation gc and time barriers #100403
…stats is provided
…able-pystats is provided
…en --enable-pystats is provided Signed-off-by: Pablo Galindo <[email protected]>
For testing with Python 3.11.x, this is a version ported on top of v3.11.1 . The pystats.h header is not really needed so I removed the references to it. I also added a check for the I'm planning to collect stats on some applications but haven't got too far on that yet. Initial indication is that the plots look quite different depending on application. |
For this PR I opted to mirror the workings and contracts of the other interpreter stats collection that were added in the specializing interpreter to not end with many different ways to activate and retrieve statistics. |
If set, youngest generation threshold will be set to value.
Use shorter labels for generations. Show unit as y-axis label on bar charts.
I pushed some changes here: https://github.com/nascheme/cpython/commits/gc_stats in case you want to cherry-pick or merge. |
@nascheme I have implemented the stats via a -X option where the filename is provided there. This should be a first baseline for the stats collection and we can add public interfaces in the future as I am keeping the containers around. Let me know if you think we should do further modifications. |
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.
Pull request does not meet quality requirements.
@@ -80,7 +80,6 @@ typedef struct _stats { | |||
ObjectStats object_stats; | |||
} PyStats; | |||
|
|||
|
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.
Spurious edit.
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.
Sir Bedevere obtained new powers?
@@ -151,8 +189,15 @@ _PyGC_InitState(GCState *gcstate) | |||
}; | |||
gcstate->generation0 = GEN_HEAD(gcstate, 0); | |||
INIT_HEAD(gcstate->permanent_generation); | |||
|
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.
Spurious edit.