-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add API to disable full collections #61087
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
please take a note - we are monitoring content of
gc_record_full_sweep_reasonand gc_num during pre/post gc hooks to understand what runtime decided to do.please make sure that we would be able to reconstruct that FULL GC scheduled but cancelled
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.
@gbaraldi
Hi Gabriel
I've noticed that you merged this PR without answering question above.
can you reply to that one?
To illustrate issue I've prepared small repo with two demo files that I've collected:
https://github.com/tz-lom/gctest
you can see that with auto_full_collection enabled it is impossible to tell that it FULL GC was not done (except from timing which is much lower, but that is not reliable source of knowledge).
Do I miss something or can I distinguish it differently?
On top of that, I think it would be nice to expose this interface to Julia too, we are controlling GC from Julia most of the time (as GC strategy varies per interface call)
Please reply
Uh oh!
There was an error while loading. Please reload this page.
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.
Well, if you disabled full sweeps manually I guess you can query that for your instrumentation. (It's pretty tricky because the main heuristics always change the next GC. Not the current one). Also hypothetically, knowing that the GC would've run a full sweep but didn't because it was manually disabled can be useful to figure out if, when possible, a manual full GC should be ran.
As for the API, I'm slightly wary about adding a Julia level API for this to be back ported. If we like this feature we can add it for non released versions of Julia, but on 1.12 I feel more comfortable keeping this something one has to look for and ccall. In case we decide to go for a different API