-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[ORC][Runtime] Enhancing ELF Platform with Push-Request Model for Initializers #102846
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
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
1008b25
to
eec9d1c
Compare
This needs to be updated to resolve merge conflicts (you can just remove the method that I changed, and you'll need to wrap your function tag with |
c96559c
to
2e946ab
Compare
6b5f004
to
8686784
Compare
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.
Sorry for the delayed review. LGTM. Thanks @SahilPatidar!
Side note: |
@lhames I will create a new header for this. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/3788 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/2143 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/3440 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/2746 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/4297 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/4454 Here is the relevant piece of the build log for the reference
|
With the help of @lhames, this PR introduces a push-request model to manage list initializers in the runtime state for each
JITDylib
, similar to howMachO
andCOFF
handle it. Previously, the ELF runtime lacked the ability to register, deregister, or retain initializers, causing issues when re-runningdlopen
. Initializers were erased afterrt_getInitializers
was used.To address this, we introduce
__orc_rt_elfnix_register_init_sections
and__orc_rt_elfnix_register_jitdylib
(and corresponding deregister functions). This model allows the runtime to request the push of initializers for theJITDylib
, with the platform handling this via a record method. Additionally, we leverageMachO
'sRecordSectionsTracker
to store initializers, ensuring only newly updated initializers are executed usingprocessNewSections
, improving the runtime's efficiency and reliability.