-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[wasm] Don't probe for aot modules unless we were built for AOT #100802
Conversation
…citly built for AOT, because emscripten dlopen is very expensive
Tagging subscribers to 'arch-wasm': @lewing |
if (mono_aot_mode == MONO_AOT_MODE_INTERP_ONLY) | ||
return; |
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.
I don't remember which AOT mode it is, but I think for some interpreter modes we still need the AOT image for corlib because it contains some trampolines
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.
ah, that's right. But if I remember right, we only need the aot image for corlib?
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.
If I remember correctly, I think wasm is ok here.
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
I'm pretty sure dlopen isn't called in the wasm case unless WASM_SUPPORTS_DLOPEN is set to defined? We do appear to do all the probing even when none of this will ever resolve a symbol |
…et#100802) Don't probe for aot modules in emscripten builds unless we were explicitly built for AOT, because emscripten dlopen is very expensive Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
dlopen in emscripten is very expensive, so we should skip probing for AOT modules if we're currently configured for interpreter only, to reduce startup overhead.