forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mono]: Make EventPipe MonoProfiler provider GC events async safe. (d…
…otnet#56714) * Make EventPipe MonoProfiler provider GC events async safe. EventPipe MonoProfiler provider includes most Mono profiler events, but events currently triggered during GC is not emitted since EventPipe is not async safe. This commit add support to emit the MonoProfiler events triggered during GC (gc resize, gc moves, gc roots and heap dump object references) into a async safe temporary memory buffer that will be emitted into EventPipe once GC completes (and world has been restarted). This opens up the ability to do heapshots using EventPipe running on Mono into nettrace files. Heapshots can be triggered in same way as on CoreCLR, creating an EventPipe session with GCHeapCollectKeyword keyword. Only one heapshot can be triggered at a time, so in order to trigger an additional heapshot, a new EventPipe session is setup (after the previous heapshot has completed). Heapshot events will be included in all session with configured keywords. It is also possible to include all vtable/class references (including class name), into heap dump. This is enabled by a specific keyword and makes the dump self contained (no need to track type load etc). That way runtime can start up without any profiler support, and then it is possible to use custom tool or dotnet-trace to request a heap dump (including all referenced vtable/class references) and once that session is done, it is possible to do a new session and get a new separate heap dump into a new session. Having separate sessions in different files opens up the ability to diff between any heap dump over time.
- Loading branch information
1 parent
b6647fc
commit 7fb406a
Showing
3 changed files
with
2,012 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.