-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Notify profiler about unloads of all class instances when module is unloaded #114107
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
Notify profiler about unloads of all class instances when module is unloaded #114107
Conversation
Tagging subscribers to this area: @tommcdon |
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
6c81f47
to
97ee0de
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.
LGTM
I have not reviewed the test in detail
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
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.
Looks good to me!
Fix
ClassLoadStarted
andClassUnloadStarted
profiler callbacks symmetry when unloading modules with generic class instances.The PR solves issue #114068
ClassUnloadStarted
andClassUnloadFinished
profiler api callbacks are not called for generic instances which are allocated under a different loader allocator. That:Notify
logic which is done at class loading time - https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/clsload.cpp#L2617The suggested change adds a separate
EEClass:NotifyUnload
method that is called for all classes symmetrically toClassLoadStarted
notification.Added a profiler test to validate the callbacks correctness for unloading modules and validated it locally.