runtime
runtime copied to clipboard
Fix VirtualCallStubManager stats capturing on EE shutdown
Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager. Since it's only about logging we can perform uninit earlier.
Part of https://github.com/dotnet/runtime/issues/84834, cc @dotnet/samsung
Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.
Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager
What is the exact situation where it does not work? Is the whole block with the call unreachable?
Before this change logging stats to StubLog file doesn't work because on EE shutdown we don't shut down manager
What is the exact situation where it does not work? Is the whole block with the call unreachable?
I can explain giving a bit more background. Couple of weeks ago I tried capture VirtualCallStubManager stats, however I noticed that only empty StubLog was created. It turned out that whole block in EEShutDownHelper was bypassed because fIsDllUnloading was set to false. It happened on both RISC-V and x64 platforms.
Hmm, you are right. We do not seem to call this with fIsDllUnloading=true on Unix and so this block is never executed. @janvorli It sounds like another corner case shutdown bug that we have inherited from framework.
@yurai007 For this specific fix, could please move this logging call and also WriteJitHelperCountToSTRESSLOG to be right after Interpreter::PrintPostMortemData above? PrintPostMortemData is similar kind of logging, so we should have all those calls together.