You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/profiling/cpu-usage.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: CPU profiling in the Performance Profiler
3
3
description: Learn about the CPU profiler performance tool, which shows the CPU time and percentage spent executing code in C++, C#, Visual Basic, and JavaScript apps.
4
-
ms.date: 09/05/2024
4
+
ms.date: 02/19/2025
5
5
ms.topic: how-to
6
6
ms.custom: "profiling-seo"
7
7
author: mikejo5000
@@ -199,7 +199,7 @@ To find a function name you're looking for, use the search box. Hover over the s
199
199

200
200
::: moniker-end
201
201
202
-
### <aname="BKMK_Asynchronous_functions_in_the_CPU_Usage_call_tree"></a> Asynchronous functions in the CPU usage call tree
202
+
####<aname="BKMK_Asynchronous_functions_in_the_CPU_Usage_call_tree"></a> Asynchronous functions in the CPU usage call tree
203
203
204
204
When the compiler encounters an asynchronous method, it creates a hidden class to control the method's execution. Conceptually, the class is a state machine. The class has compiler-generated functions that asynchronously call the original methods, and the callbacks, scheduler, and iterators needed to run them. When a parent method calls the original method, the compiler removes the method from the execution context of the parent, and runs the hidden class methods in the context of the system and framework code that controls app execution. The asynchronous methods are often, but not always, executed on one or more different threads. This code appears in the **CPU Usage** call tree as children of the **[External Code]** node immediately below the top node of the tree.
205
205
@@ -224,6 +224,26 @@ Expand the generated methods to show what's going on:
224
224
-`MainPage::<GetNumberAsync>b__b` shows the activity of the tasks that call `GetNumber`.
225
225
::: moniker-end
226
226
227
+
::: moniker range=">=vs-2022"
228
+
229
+
### Analyze multi-process performance
230
+
231
+
Starting in Visual Studio 2022 version 17.13, you can analyze multi-process data in the CPU Usage tool. This makes it easier to analyzer performance for multi-process apps such as .NET Aspire. This features allows you to distinguish and analyze CPU utilization across processes within a single session, which provides clearer insights into resource consumption.
232
+
233
+
You need to collect multi-process data before you can analyze it. To collect the data, select **Collect data from multiple processes** for the CPU Usage tool in the Performance Profiler.
234
+
235
+

236
+
237
+
The timeline graph showing your app's CPU use displays performance data with distinct color coding for each process. The graphs are displayed as stacked area charts.
238
+
239
+

240
+
241
+
You can filter processes using a dropdown on the top left of the CPU timeline graph. When you select or deselect a process, the profiler summary page and detailed reports are updated based on the new selection(s), enabling more precise analysis.
242
+
243
+

0 commit comments