Skip to content
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

Add some GC stats to Py_STATS #107581

Merged
merged 5 commits into from
Aug 4, 2023
Merged

Conversation

markshannon
Copy link
Member

This partly duplicates the stats from the GC module, but serves a different purpose, as it allows us to gather stats that would be too expensive to gather in a release build.

The stats:
https://github.com/faster-cpython/benchmarking/blob/main/results/bm-20230730-3.13.0a0-8bc0926/bm-20230730-azure-x86_64-faster%252dcpython-gc_stats-3.13.0a0-8bc0926-pystats.md

@pablogsal
Copy link
Member

I have already a PR open for this:

#100958

I would prefer to complete that one if possible

@markshannon
Copy link
Member Author

@pablogsal
If you want more stats could you use the Py_STATS mechanism?
That way the GC stats can be gathered along with all the other stats.

If you need additional timings, then adding an -X mechanism makes sense.
In that case I don't think that we want stats as the additional overhead will mess up the timings.

@markshannon
Copy link
Member Author

@pablogsal
I'd like to get this merged, as it just adds a few stats using the Py_STATS mechanism, whereas #100958 seems much broader.

There is some overlap between this PR and #100958, but #100958 has been open since January, and I'm worried that we will have no stats at all for months.
I'll be happy to review #100958 once it is mergeable.

As an aside:
Treating objects visited as a proxy for time taken, both your and my stats seem to show similar results.
Gen 2 is the most efficient, followed by gen 1 then gen 3.

@pablogsal
Copy link
Member

Ok let's merge this PR and let's refine the other one 👍

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

LGTM

@markshannon markshannon merged commit 2ba7c7f into python:main Aug 4, 2023
@markshannon markshannon deleted the gc-stats branch August 6, 2024 10:18
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.

4 participants