WIP/NFC: create GC interface for third-party GCs#55256
Merged
Conversation
bb47811 to
a564641
Compare
d3e10d6 to
84ce9b5
Compare
84ce9b5 to
425fa38
Compare
kpamnany
approved these changes
Jul 29, 2024
Member
kpamnany
left a comment
There was a problem hiding this comment.
Nice work, good step towards modularizing the GC.
I'm not familiar enough with the LLVM side of things to review that part of the code, so need more reviews.
Comment on lines
1050
to
1054
| JL_DLLEXPORT void jl_gc_add_finalizer(jl_value_t *v, jl_function_t *f) JL_NOTSAFEPOINT; | ||
| JL_DLLEXPORT void jl_gc_add_ptr_finalizer(jl_ptls_t ptls, jl_value_t *v, void *f) JL_NOTSAFEPOINT; | ||
| JL_DLLEXPORT void jl_gc_add_quiescent(jl_ptls_t ptls, void **v, void *f) JL_NOTSAFEPOINT; | ||
| JL_DLLEXPORT void jl_finalize(jl_value_t *o); |
Member
There was a problem hiding this comment.
Shouldn't these also go into gc-interface.h?
Member
Author
There was a problem hiding this comment.
No.
If they had to be moved somewhere, it would be to gc-common.h, though I'm not fully convinced of it since the MMTk binding is not using this code now IIRC.
Member
Author
There was a problem hiding this comment.
My inclination is to keep them here for now.
425fa38 to
038eac0
Compare
3d6311f to
f8ef014
Compare
gbaraldi
approved these changes
Jul 31, 2024
f8ef014 to
469023c
Compare
lazarusA
pushed a commit
to lazarusA/julia
that referenced
this pull request
Aug 17, 2024
Prelude to the MMTk integration. Creates an interface header specifying the functions that a third-party GC must implement to plug into Julia, and also splits the stock Julia GC implementation into a separate file `gc-stock.c`. In the future, we'll include a few pre-processor guards to ensure some of these files are not compiled if MMTk is enabled. A WIP design document describing the rationale behind the interface and the plan for MMTk integration should be in this [design document](https://docs.google.com/document/d/1v0jtSrIpdEDNOxj5S9g1jPqSpuAkNWhr_T8ToFC9RLI/edit) (feedback is welcome at this stage!). ## TODO - [x] Ensure functions in `gc-interface.h` are only declared in this header. - [x] Add allocation fast-path & codegen write-barriers into the interface.
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
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.
Prelude to the MMTk integration.
Creates an interface header specifying the functions that a third-party GC must implement to plug into Julia, and also splits the stock Julia GC implementation into a separate file
gc-stock.c.In the future, we'll include a few pre-processor guards to ensure some of these files are not compiled if MMTk is enabled.
A WIP design document describing the rationale behind the interface and the plan for MMTk integration should be in this design document (feedback is welcome at this stage!).
TODO
gc-interface.hare only declared in this header.