diagnostics icon indicating copy to clipboard operation
diagnostics copied to clipboard

dotnet trace --format speedscope does not contain an All Threads item

Open Therzok opened this issue 3 years ago • 6 comments

Background and Motivation

I've been using dotnet trace with speedscope, and you can only look at one thread at a time. It would be very useful to look at all the threads at once.

Proposed Feature

Add an entry in the speedscope report format that contains the aggregated information of all the threads.

Usage Examples

No change in user interaction with dotnet-trace itself.

Therzok avatar Nov 03 '22 18:11 Therzok

+1, I've tried to profile dotnet build before, and there were 64+ threads to try to look through.

If I could look at all threads at once, the "left heavy" view would be pretty useful.

jonathanpeppers avatar Nov 03 '22 18:11 jonathanpeppers

Did you get to try the experiment I recommended internally?

hoyosjs avatar Nov 14 '22 21:11 hoyosjs

This week I'll have some time to try it out, I've been focusing on some high priority tasks for the past 2 weeks.

Therzok avatar Nov 15 '22 14:11 Therzok

cc @davmason @dramos020

tommcdon avatar Jan 10 '23 19:01 tommcdon

I've been toying around with this, took some inspiration from the comments in https://github.com/microsoft/perfview/issues/1325

One side-effect of bunching up all the stacks in one profile is that the stacks aren't continous, so the trace file sizes inflate a ton.

.rw-r--r--  713M therzok  2 Feb 18:23  /Users/therzok/Downloads/VisualStudio_20230124_125130.new.speedscope.json
.rw-r--r--   17M therzok  2 Feb 18:24  /Users/therzok/Downloads/VisualStudio_20230124_125130.new.speedscope.json.zip
.rw-r--r--   43M therzok  2 Feb 18:23  /Users/therzok/Downloads/VisualStudio_20230124_125130.old.speedscope.speedscope.json
.rw-r--r--  2.6M therzok  2 Feb 18:24  /Users/therzok/Downloads/VisualStudio_20230124_125130.old.speedscope.speedscope.json.zip

Therzok avatar Feb 03 '23 11:02 Therzok

The problem with ^ seems to be caused by the bits that calculate continuous samples: https://github.com/microsoft/perfview/compare/main...Therzok:perfview:dev/therzok/aggregated-threads

Therzok avatar Feb 07 '23 13:02 Therzok