[dotnet-trace] Update Convert and Report to handle Universal.Events#5644
[dotnet-trace] Update Convert and Report to handle Universal.Events#5644mdh1418 wants to merge 3 commits intodotnet:mainfrom
Conversation
|
Still need to figure out how to resolve symbols from the nettrace like how PerfView does. |
|
The inclusive/exclusive numbers having values less than zero or greater than 100 also seems very fishy :) |
brianrob
left a comment
There was a problem hiding this comment.
I LOVE that you're doing this. I've seen a lot of people use these features successfully, and having them work for collect-linux (one-collect) traces will be a great addition. A couple of comments below.
| callTree.StackSource = filterStack; | ||
| FilterParams filterParams = new() | ||
| { | ||
| FoldRegExs = "CPU_TIME;UNMANAGED_CODE_TIME;{Thread (}", |
There was a problem hiding this comment.
I think you will want to separate a bit of the configuration based on whether or not the trace comes from the runtime (EventPipe) vs. one-collect. Traces from one-collect are going to have multiple processes and then either CPU time or Thread time.
One of the great things about this view is that when the data is focused on the right target (usually just a single process), it can be very useful. In the current state, we're looking at all processes on the machine, and blocked time. Blocked time almost always dominates CPU time because it's not a consumable resource - it's the time that was spent by every thread when they were blocked.
I'd recommend the following:
- Filter to just CPU time - don't show blocked time in these tools.
- Provide a way for users to select the process they want to filter to.
| <MicrosoftBclAsyncInterfacesVersion>9.0.8</MicrosoftBclAsyncInterfacesVersion> | ||
| <MicrosoftDiaSymReaderNativeVersion>17.10.0-beta1.24272.1</MicrosoftDiaSymReaderNativeVersion> | ||
| <MicrosoftDiagnosticsTracingTraceEventVersion>3.1.23</MicrosoftDiagnosticsTracingTraceEventVersion> | ||
| <MicrosoftDiagnosticsTracingTraceEventVersion>3.1.28</MicrosoftDiagnosticsTracingTraceEventVersion> |
There was a problem hiding this comment.
For symbol resolution, here is the current state in PerfView/TraceEvent:
- Native code: Symbols must be present on the collection machine at collection time so that one-collect can pick them up. They show up in the trace as ProcessSymbol events. From what I can see you're already getting these resolved properly.
- Jitted Code: Symbols are emitted into the trace as ProcessSymbol events.
- R2R Code: PerfView/TraceEvent downloads these from the symbol server at analysis time via an instance of
SymbolReader.
Fixes #5610
Demonstrates using the updated ThreadTimeStackComputer in TraceEvent 3.1.28 to generate ThreadTime stacks from traces containing Universal.Events.
This PR does the following:
Before
{"exporter": "Microsoft.Diagnostics.Tracing.TraceEvent@3.1.23.0", "name": "trace.speedscope", "activeProfileIndex": 0, "$schema": "https://www.speedscope.app/file-format-schema.json", "shared": { "frames": [ ] }, "profiles": [ ] }

After