-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono][metadata] Enable compressed interface bitmap by default #119694
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
[mono][metadata] Enable compressed interface bitmap by default #119694
Conversation
180637e
to
48e02a5
Compare
Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness.
48e02a5
to
b62f455
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.
Pull Request Overview
This PR enables the compressed interface bitmap feature by default in the Mono runtime. This optimization compresses the interface bitmap used for interface type checking, reducing memory usage.
Key changes:
- Remove the
MONO_SMALL_CONFIG
conditional compilation guard for compressed interface bitmap - Add explicit type casting to avoid compiler warnings
- Improve variable naming for clarity
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/mono/mono/metadata/class-internals.h | Removes conditional compilation guard, enabling compressed interface bitmap by default |
src/mono/mono/metadata/class-setup-vtable.c | Improves variable naming and adds type cast for offset parameter |
src/mono/mono/metadata/class-init.c | Adds explicit uint8_t casts to prevent potential compiler warnings |
src/mono/mono/mini/type-checking.c | Adds explicit type cast for offset parameter to target_mgreg_t |
I assume the idea is to enable compressed bitmaps on all platforms to measure perf impact and then decide on additional actions, like if it should be default on just some platforms, if it should be a dynamic option or not etc. If so, I think we should also create a tracking issue and link it to this PR describing the different work items, where this is the first step. |
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.
The wide impact of the change, default on all platforms, is mainly to measure overhead. This will be followed up with additional changes based on perf data to either limit change to a set of platforms and/or add ability to enable/disable interface map compression dynamically (aot/runtime arguments). I also think we should link a tracking issue to this PR since it is one work item in a set of work items to resolve the underlying issue.
/ba-g wasm build tests known failure |
…t#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness.
…t#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness.
…able (#119953) * [mono][metadata] Enable compressed interface bitmap by default (#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness. * [mono] Enable configuration at runtime of the compressed interface bitmap feature (#119881) * Add option to configure use of compressed interface bitmaps This optimization is disabled by default. Enable it with `MONO_COMPRESSED_INTERFACE_BITMAP=1` * Add support for detecting mismatch with aot images
…t#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness.
…t#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness.
…ble (#120154) * [mono][metadata] Enable compressed interface bitmap by default (#119694) * [mono][metadata] Enable compressed interface bitmap by default * Fix build on windows * Fix publishing of compressed bitmap Before this commit we were doing changes on the published data which is problematic for multithreaded environments. We ensure the bitmap is fully processed before publishing it so that we can rely on the data dependency memory ordering constraint for correctness. * [mono] Enable configuration at runtime of the compressed interface bitmap feature (#119881) * Add option to configure use of compressed interface bitmaps This optimization is disabled by default. Enable it with `MONO_COMPRESSED_INTERFACE_BITMAP=1` * Add support for detecting mismatch with aot images
No description provided.