-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono][jit] Use an mrgctx for all gshared methods on WASM. #82981
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
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
4b26b61 to
fe193bd
Compare
|
/azp run runtime-wasm |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
c1f47c8 to
8203760
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
40f1f7e to
13b04b0
Compare
|
/azp run runtime-ioslike |
|
No pipelines are associated with this pull request. |
src/mono/mono/utils/options-def.h
Outdated
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.
Should it include HOST_IOS as well?
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.
Its better to start with one platform to see how it goes.
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
As it might have performance disadvantages, is there a way to test it locally before merging? |
|
The benchmarking suite can be run on wasm locally, not sure about ios. |
|
Also, it could be merged and later reverted if the perf impact is significant. |
Enable it by default on WASM. In this mode, all gshared methods get an mrgctx, which means they can access their data using a simple load from the mrgctx instead of having to call a rgctx fetch trampoline. Upsides: - much simpler. - faster access to gshared data - smaller code and data size in the AOT case - if enabled by default on all platforms, large amount of gshared code can be removed Downsides: - the methods have to initialize their mrgctx in their prolog - on non-wasm platforms, indirect calls to gshared methods (like virtual calls) will need to use rgctx trampolines more often to pass the mrgctx.
|
@vargaz is it ready to be merged after the Preview 4 snap? Is there anything else missing? |
|
It could be merged. |
Good. I will approve it after the Preview 4 snap. |
kotlarmilos
left a comment
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.
LGTM, thank you! Hopefully, we can reduce the size with reasonable speed tradeoff.
P.S. I would leave this to @lambdageek for final approval.
/cc: @SamMonoRT
|
Will see what changes this will do to benchmarks. |
No description provided.