-
Notifications
You must be signed in to change notification settings - Fork 89
Compiler hooks can access allocations found by check allocations #858
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
Closed
Conversation
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
xclerc
reviewed
Oct 20, 2022
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.
Lots of small/ignorable comments,
the only interesting one is the one
about the cmx file I think.
051ca48
to
32ebc02
Compare
xclerc
approved these changes
Oct 28, 2022
@poechsel could you please rebase? |
This was referenced May 23, 2023
@poechsel ping |
This work has been merged via another PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a new compiler hook to fetch all allocations discovered by the check allocations tool.
An allocation is considered to be:
caml_alloc
caml_apply_
,checkbound
)Each allocation is recorded with it's
kind
(see the list above), as well as somecontext
(was it post-dominated by a raise? Did it occur from the "catch" part of a try with?). The type forcontext
is here but not implemented as this will be done in a later PR.Collection of all allocations is done when
Checkmach.keep_all_details
is set by true by the user. By default it is turned to off and can only be turned off by a program using the compilerlibs or when compiler hook on Check_allocations has been registered.