0 Windows Performance Analyzer (WPA) Usage Guide
Leonard Hecker редактировал(а) эту страницу 2024-04-03 23:40:33 +02:00

This is an excerpt of https://github.com/microsoft/terminal/issues/16983#issuecomment-2034681234


When you open it, it'll look something like this: image

Each tab can contain an arbitrary number of panes. When you click on the graph types on the left, new panes will be added to the current tab. As such, I usually first close all tabs and then open the graph that I want. In this case we want the "Virtual Allocations" graph which is in the "Others" section on the left. This will list all the processes that were recorded:

image

In the table view, everything to the left of the vertical yellow line are columns which group data and everything to right of the yellow line is an aggregate. It's a little bit like working with a database. Basically, everything to the left "maps" / "groups" and everything to right "reduces" / "sums".

Columns in WPA are special however: They can have complex rules and configurations to customize everything to your liking. If you're interested in this, click on the wheel icon at the top of the pane (next to the red "3" marker).

Here you can do a couple things, which I've marked with the red numbers:

  1. By right clicking on the process(es) that you actually want, you get to choose "Filter to Selection", which will remove all the noise.
  2. By right clicking on the headers of the table you can choose which columns to see. Here you can choose "Stack". The "Stack" column is configured by default to be to the left of the yellow line. That way you get a cumulative amount of allocations per stack trace.
  3. The graph button allows you to switch to a "Flame" (-graph) which is IMO the most useful view. If you aren't familiar with flame graphs: Each bar is a function call and it represents your call stack. The width of each bar represents the percentage it makes up compared to the total. For instance if your app allocates 1GB of memory and 1 function allocates 100MB, then its bar will be exactly 10% wide.
  4. Here you can change the view to hide the table and only show the graph. There's a "maximize" button which you can click to resize the pane to fit the tab size.

To get function names you have to load symbols. Unfortunately, even if you use a "Filter" it'll load symbols for all applications by default. This takes a long time. So what you can do is add a filter for symbol loading:

image

At the end it'll look something like this: image