[NativeAOT] Make conservative stack reporting configurable.#75803
[NativeAOT] Make conservative stack reporting configurable.#75803VSadov merged 4 commits intodotnet:mainfrom
Conversation
| RETAIL_CONFIG_VALUE(StressLogLevel) | ||
| RETAIL_CONFIG_VALUE(TotalStressLogSize) | ||
| RETAIL_CONFIG_VALUE(gcServer) | ||
| RETAIL_CONFIG_VALUE(GcConservativeStacks) // Enables conservative stack reporting |
There was a problem hiding this comment.
We should call it the same thing as in CoreCLR (
runtime/src/coreclr/inc/clrconfigvalues.h
Line 268 in 242c95a
There was a problem hiding this comment.
gcConservative turns support for conservative reporting in the GC. NativeAOT enables that unconditionally.
I think if we use the same key we will see it always "on".
There was a problem hiding this comment.
gcConservative turns on conservative stack scanning in CoreCLR:
runtime/src/coreclr/vm/gcenv.ee.cpp
Line 129 in 4cf2e3b
NativeAOT enables that unconditionally. I think if we use the same key we will see it always "on".
The GC should see it as always on in NativeAOT, but the runtime should use the env variable that you are adding.
There was a problem hiding this comment.
Actually it looks like we intercept gcConservative when GC asks about it. We may be able to use the same key.
Another issue could be that gcConservative would affect the test infrastructure as well as NativeAOT tests. That is probably ok.
|
Thanks! |
Follow up to dotnet#75803. If enabled, conservative GC stack scanning will be used and metadata related to GC stack reporting will not be generated. The generated executable file will be smaller, but the GC will be less efficient (garbage collection might take longer and keep objects alive for longer periods of time than usual). Saves 4.4% in size on a Hello World. I'll take that.
Conservative stack reporting is a convenient option when investigating issues with suspension/unwinding/root reporting.
Having to rebuild the runtime and testcases in order to switch is not convenient though as switching back and forth takes a very long time.
This change allows turning conservative stack reporting off/on via environment variable.