-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 GC metric last_incremental_sweep
#50190
Conversation
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.
I think we shoud separate this struct into a couple things, it currently has a bunch of things that the user shouldn't really care about. #50144 adds a new struct that has the heuristics only. I think we should have 3 structs, a per thread gc_num that just counts allocations. A global one that tracks the timings and such, and the global heap tracking one I added in that PR. With this we can remove a bunch of things, freed doesn't really mean much on the per thread thing for example |
Do we need the per thread one? If we track pages rather than bytes (with your PR), we don't need to ever look at how much each thread allocated. (since the decision on when to GC happens when we ask for a new page which can take a lock to check the global heap one) |
We need the per thread one to see how much a function call allocated for example for |
How does that work if the function switches threads while running (or spawns work onto another thread?) |
I think it just gets it wrong? I haven't tested it |
if so, would it be much worse to delete the per thread one and assume that people using |
The page based thing isn't precise for number of allocations, it just measures the heap it doesn't know anything about what is being done with it, so if you allocate 100GB but never go over 500mb of max heap that's what it will show. |
makes sense. |
Happy to have this reorganized, but for now...
Any idea what to do about this? Need a larger build machine? |
Records the time that the last incremental sweep ran.
Records the time that the last incremental sweep ran.
bbf89d9
to
2179e0e
Compare
Records the time that the last incremental sweep ran.
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
* Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c
Records the time that the last incremental sweep ran.
This allows an application that explicitly runs GC when idle or at convenient points to be more intelligent about it.
Related: #50018