-
Notifications
You must be signed in to change notification settings - Fork 340
[🍒 stable/20240723] DynamicLoaderDarwin load images in parallel with preload #9445
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
The head ref may contain hidden characters: "\u{1F352}/DynamicLoaderDarwin_parallel_image_load"
[🍒 stable/20240723] DynamicLoaderDarwin load images in parallel with preload #9445
Conversation
@augusto2112 PTAL |
@swift-ci test |
@swift-ci test |
@DmT021 the test suite failed on test:
I wonder if this could be a race condition? I'm going to rerun the test suite, but perhaps you could run this test locally on a loop to see if any run fails? |
@swift-ci test macOS |
Yeah, I'm checking it. EDIT: I can confirm there's a race condition somewhere. Will dig into it now. |
@augusto2112 The issue is that this test depends on the order of loading the dylibs. It depends on:
The issue can be reproduced without the patch if you swap You can also see later in the tests we expect
I think the best solution would be to fix this dependency on the order of modules in the ModuleList but not sure how difficult that would be. |
Besides the first binary, which should be the executable in the module list, the order of all the other binaries shouldn't matter. Also we probably should remove this test now that we no longer have a global scratch context. Would you mind adding a new commit on top of the current one removing that test? |
Sure |
This change enables `DynamicLoaderDarwin` to load modules in parallel using the thread pool. This new behavior is controlled by a new setting `plugin.dynamic-loader.darwin.experimental.enable-parallel-image-load`, which is enabled by default. When disabled, DynamicLoaderDarwin will load modules sequentially as before.
c817472
to
feb280d
Compare
@augusto2112 rerun the tests, please |
@swift-ci test |
@augusto2112 thank you! |
Cherry-pick llvm#110646
This change enables
DynamicLoaderDarwin
to load modules in parallel using the thread pool. This new behavior is controlled by a new settingplugin.dynamic-loader.darwin.experimental.enable-parallel-image-load
, which is enabled by default. When disabled, DynamicLoaderDarwin will load modules sequentially as before.