-
Notifications
You must be signed in to change notification settings - Fork 711
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
How to properly use and visualize Start Stop activities in a custom ETW provider #2116
Comments
Your code looks generally correct to me, and so does the events view. Would you be able to share a sample trace containing these events? The error that you've described usually represents a programming error in PerfView because we can't match the view name up with a data stream. If you can share a trace, I can try to repro and debug this. |
Thank you for replying, here's a sample trace: perfviewdata.etl.zip To create this i did the following:
|
Thanks @exelix11. I'm not quite sure how you got the error
I also recommend that you specify Hopefully that helps - let me know how it goes. If that doesn't work, please do share an updated trace. |
I tried again with the following command line And i'm still missing the start stop activities view. PerfViewData.etl.zip To be clear and please correct me if i misunderstand this feature, i'm trying to replicate what i see in this article https://learn.microsoft.com/en-us/archive/blogs/vancem/exploring-eventsource-activity-correlation-and-causation-features so i can get a view like this with my own events: This view that i'm after doesn't seem to have any information outside of the custom ETW provider, does it really need the context switch events ? I'm just talking about this simple view, I do understand they will be needed later in case i want to correlate with other events like file io. |
Context
I'm adding profiling support to an application by emitting ETW events that represent logical function calls.
Currently, after i capture an ETL trace i use a tool to convert it to json for use on speedscope.app, but this produces jsons up to 300MB which does not feel optimal.
The problem
I would like to use something like perfview or Windows Performance Analyzer directly, so i looked into the ETW activity pattern which seems to be meant for this kind of use case, however there is not much documentation.
I tried to follow this reference from ms docs, from what i understand this event pattern should allow perfview to group activities and plot them in a hierarchy view.
Several stackoverflow questions point to the fact that this should be possible, however i couldn't find any working reference code in C.
Repro
I tried writing the following code
You can build it from Visual Studio or just the command line tools with
cl Repro.c Advapi32.lib Ole32.lib
(i only tried x64 tools).Then I start an event collection like this:
And the events are collected properly:
However, when i try to open the stacks view for start-stop activities i get
Error: Could not find stack source Any Stacks (with StartStop Activities)
Questions
The text was updated successfully, but these errors were encountered: