Skip to content
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

Emit JITStarting, MethodLoad, ModuleLoad and AssemblyLoad EventPipe events on Mono. #53020

Merged

Conversation

lateralusX
Copy link
Member

@lateralusX lateralusX commented May 20, 2021

Add support to emit JITStarting, MethodLoad, ModuleLoad and AssemblyLoad EventPipe events on Mono.

The JITStarting and MethodLoad is hooked up to existing profiler events jit_begin, jit_done meaning that it will cover JIT as well as loading of AOT methods or transformation of interpreter methods.

The module/assembly load events are hooked up to existing profiler events, image_loaded and assembly_loaded.

Profiler callbacks are dynamically added/removed based on EventPipe provider enable/disable callbacks, meaning that when no eventpipe session is using the runtime provider, all callbacks registered by that provider will be removed from mono profiler and runtime won't take any additional cost once a session (using the runtime provider) has been disabled.

These additional events gives some extra data in prefview making it possible to view JIT stats:

image

It also adds the JittingStarted metrics into the "Any Stack" view giving some more data points per callstacks:

image

These new events can also be consumed directly from the nettrace stream, making it possible to do custom presentations of JIT statistics combined with callstack information.

@lateralusX lateralusX merged commit 5525d0b into dotnet:main May 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants