[wasm] Don't probe for aot modules unless we were built for AOT#100802
Merged
kg merged 2 commits intodotnet:mainfrom Apr 10, 2024
Merged
[wasm] Don't probe for aot modules unless we were built for AOT#100802kg merged 2 commits intodotnet:mainfrom
kg merged 2 commits intodotnet:mainfrom
Conversation
…citly built for AOT, because emscripten dlopen is very expensive
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing |
steveisok
approved these changes
Apr 9, 2024
This was referenced Apr 9, 2024
lambdageek
reviewed
Apr 9, 2024
Comment on lines
+1976
to
+1977
| if (mono_aot_mode == MONO_AOT_MODE_INTERP_ONLY) | ||
| return; |
Member
There was a problem hiding this comment.
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
Member
There was a problem hiding this comment.
ah, that's right. But if I remember right, we only need the aot image for corlib?
Member
There was a problem hiding this comment.
If I remember correctly, I think wasm is ok here.
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
This was referenced Apr 9, 2024
Member
|
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 |
lewing
approved these changes
Apr 10, 2024
matouskozak
pushed a commit
to matouskozak/runtime
that referenced
this pull request
Apr 30, 2024
…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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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.