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
|[CPU Usage](../profiling/beginners-guide-to-performance-profiling.md)|Shows where the CPU is spending time.|• Begin an investigation for general performance issues.</br>• Investigate high Server CPU usage.</br>• Investigate DevOps scenarios, such as when orders are not getting through to the retail website.</br>• Optimize CPU usage.</br>• Investigate latency in API calls.|
29
+
|[CPU Usage](../profiling/beginners-guide-to-performance-profiling.md)|Shows where the CPU is spending time.|• Begin an investigation for general performance issues.</br>• Investigate high server CPU usage.</br>• Investigate DevOps scenarios, such as when orders are not getting through to the retail website.</br>• Optimize CPU usage.</br>• Investigate latency in API calls.|
30
30
|[Flame graph](../profiling/flame-graph.md)|View within the CPU Usage tool that provides an alternate visualization of the call tree.|Investigate latency in API calls|
31
31
|[Hot path](../profiling/cpu-insights.md)|View within the CPU Usage tool that shows where most of the CPU time was spent in your application.|Investigate latency in API calls|
32
32
|[PerfTips](../profiling/perftips.md)|Shows a quick measurement of performance information while interacting with your code.|While debugging, you want to see the elapsed time between the previous step operation (or breakpoint) to the current step or breakpoint.|
Copy file name to clipboardExpand all lines: docs/profiling/dotnet-counters-tool.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ manager: AndSter
16
16
The .NET Counters tool allows you to visualize [dotnet counters](/dotnet/core/diagnostics/dotnet-counters) over time right from within the Visual Studio profiler.
17
17
18
18
> [!NOTE]
19
-
> The .NET Counters tool requires Visual Studio 2019 version 16.7 or later and targets .NET Core 3.0+.
19
+
> The .NET Counters tool requires Visual Studio 2019 version 16.7 or later and targets .NET Core 3.0+ and .NET 5+.
Copy file name to clipboardExpand all lines: docs/profiling/instrumentation-overview.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Instrumentation"
3
3
description: Learn about the tools you can use to instrument your applications.
4
-
ms.date: "03/31/2023"
4
+
ms.date: "11/09/2023"
5
5
ms.topic: "conceptual"
6
6
author: "mikejo5000"
7
7
ms.author: "mikejo"
@@ -35,9 +35,9 @@ When it comes to profiling, there's two mechanisms of collecting data. Collectio
35
35
36
36
::: moniker range=">=vs-2022"
37
37
38
-
**Instrumentation** - Starting in Visual Studio 2022 version 17.5, the Instrumentation tool provides dynamic instrumentation for .NET Core, .NET 5+, and .NET Framework. This tool provides the best performance for instrumentation scenarios. Access this tool using the Performance Profiler (Alt + F2). For more information, see [Instrument your application](../profiling/instrumentation.md). For DLLs, you need to use the command-line tool (VSInstr) instead.
38
+
**Instrumentation** - Starting in Visual Studio 2022 version 17.5, the Instrumentation tool provides dynamic instrumentation for .NET Core, .NET 5+, and .NET Framework. This tool provides the best performance for instrumentation scenarios. Access this tool using the Performance Profiler (Alt + F2). For more information, see [Instrument your application](../profiling/instrumentation.md).
39
39
40
-
Starting in Visual Studio 2022 version 17.6 Preview 2, the Instrumentation tool also supports C/C++, but uses static instrumentation (VSInstr).
40
+
Starting in Visual Studio 2022 version 17.6, the Instrumentation tool also supports C/C++, but uses static instrumentation (VSInstr).
41
41
42
42
To use this tool from the command-line, see [Profiling apps from the command-line](../profiling/profile-apps-from-command-line.md).
43
43
::: moniker-end
@@ -49,7 +49,7 @@ To use this tool from the command-line, see [Profiling apps from the command-lin
49
49
50
50
## Static instrumentation tool
51
51
52
-
**VSInstr** - Starting in Visual Studio 2022 version 17.6 Preview 2, the [Instrumentation tool](../profiling/instrumentation.md) uses VSInstr for C/C++ support. VSInstr is also used for command-line scenarios and works for .NET Framework, .NET 5+, and C/C++ apps. For instrumenting DLLs, the command-line tool is the only option. For more information, see [Collect detailed timing data for a stand-alone application by using the profiler command line](../profiling/collecting-detailed-timing-data-for-a-stand-alone-application.md).
52
+
**VSInstr** - Starting in Visual Studio 2022 version 17.6 Preview 2, the [Instrumentation tool](../profiling/instrumentation.md) uses VSInstr for C/C++ support. VSInstr is also used for command-line scenarios and works for .NET Frameworkand C/C++ apps. For more information, see [Collect detailed timing data for a stand-alone application by using the profiler command line](../profiling/collecting-detailed-timing-data-for-a-stand-alone-application.md).
While you are debugging, you can use the **Diagnostic Tools** window to analyze CPU, memory usage, .NET counters, and you can view events that show performance-related information.
While you are debugging, you can use the **Diagnostic Tools** window to analyze CPU and memory usage, and you can view events that show performance-related information.
@@ -55,9 +57,18 @@ While you are debugging, you can use the **Diagnostic Tools** window to analyze
55
57
The **Diagnostic Tools** window is a common way to profile apps, but for Release builds you can also do a post-mortem analysis of your app instead. For more information on different approaches, see [Run profiling tools with or without the debugger](../profiling/running-profiling-tools-with-or-without-the-debugger.md). To see profiling tool support for different app types, see [Which tool should I use?](../profiling/choose-performance-tool.md).
56
58
57
59
Tools available in the Diagnostic Tools window or during a debugging session include:
> Use relaunch to skip the launch page and automatically run with your previous settings by pressing **Alt+F2** or by clicking **Debug > Performance Profiler**.
@@ -254,6 +265,7 @@ Starting in Visual Studio 2019 version 16.7, you can use the [.NET Counters tool
254
265
The tool shows live values for each counter in a list view.
In XAML apps, such as Windows desktop WPF apps and UWP apps, you can analyze resource consumption using the Application Timeline tool. For example, you can analyze the time spent by your application preparing UI frames (layout and render), servicing network and disk requests, and in scenarios like application startup, page load, and Window resize. To use the tool, choose **Application Timeline** in the Performance Profiler, and then choose **Start**. In your app, go through the scenario with a suspected resource consumption issue, and then choose **Stop collection** to generate the report.
Copy file name to clipboardExpand all lines: docs/profiling/running-profiling-tools-with-or-without-the-debugger.md
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Run profiling tools with or without the debugger"
3
3
description: "Learn about differences between the different modes available for profiling tools"
4
-
ms.date: "03/22/2023"
4
+
ms.date: "11/09/2023"
5
5
ms.topic: "conceptual"
6
6
author: "mikejo5000"
7
7
ms.author: "mikejo"
@@ -26,16 +26,24 @@ To decide which tools and results to use, consider the following options:
26
26
- The debugger itself changes performance times, as it does necessary debugger operations like intercepting exception and module load events.
27
27
- Release build performance numbers in the Performance Profiler are the most precise and accurate. Debugger-integrated tool results are most useful to compare with other debugging-related measurements, or to use debugger features.
28
28
- Some tools, such as the .NET Object Allocation tool, are only available for non-debugger scenarios.
29
+
29
30
- Debug vs. release build
30
31
- For problems caused by CPU-intensive calls, there might be considerable performance differences between release and debug builds. Check to see whether the issue exists in release builds.
31
32
- If the problem occurs only during debug builds, you probably don't need to run the non-debugger tools. For release build problems, decide whether features provided by the debugger-integrated tools will help to pinpoint the problem.
32
33
- Release builds provide optimizations like inlining function calls and constants, pruning unused code paths, and storing variables in ways that can't be used by the debugger. Performance numbers in the debug builds are less accurate, because debug builds lack these optimizations.
33
34
34
35
## <aname="BKMK_Quick_start__Collect_diagnostic_data"></a> Collect profiling data while debugging
35
36
37
+
::: moniker range=">=vs-2022"
38
+
When you start debugging in Visual Studio by selecting **Debug** > **Start Debugging**, or pressing **F5**, the **Diagnostic Tools** window appears by default. To open it manually, select **Debug** > **Windows** > **Show Diagnostic Tools**. The **Diagnostic Tools** window shows information about events, process memory, CPU usage, and .NET Counters.
39
+
40
+

41
+
::: moniker-end
42
+
::: moniker range="<=vs-2019"
36
43
When you start debugging in Visual Studio by selecting **Debug** > **Start Debugging**, or pressing **F5**, the **Diagnostic Tools** window appears by default. To open it manually, select **Debug** > **Windows** > **Show Diagnostic Tools**. The **Diagnostic Tools** window shows information about events, process memory, and CPU usage.
37
44
38
45

46
+
::: moniker-end
39
47
40
48
- Use the **Settings** icon in the toolbar to select whether to view **Memory Usage**, **UI Analysis**, and **CPU Usage**.
41
49
@@ -59,11 +67,23 @@ During a debugging session, the Events tab of the Diagnostic Tools window lists
59
67
60
68
Use the **Filter** drop-down list to filter events in and out of view, by selecting or clearing specific categories of events.
61
69
70
+
::: moniker range=">=vs-2022"
71
+

72
+
::: moniker-end
73
+
::: moniker range="<=vs-2019"
62
74

75
+
::: moniker-end
76
+
77
+
::: moniker range=">=vs-2022"
78
+
Use the search box to find a specific string in the event list. Here are the results of a search for the file name *model* that matched three events:
63
79
80
+

81
+
::: moniker-end
82
+
::: moniker range="<=vs-2019"
64
83
Use the search box to find a specific string in the event list. Here are the results of a search for the string *name* that matched four events:
65
84
66
85

86
+
::: moniker-end
67
87
68
88
For more information, see [Searching and filtering the Events tab of the Diagnostic Tools window](https://devblogs.microsoft.com/devops/searching-and-filtering-the-events-tab-of-the-diagnostic-tools-window/).
69
89
@@ -77,21 +97,36 @@ To collect performance data without debugging, you can run the Performance Profi
77
97
78
98
1. On the diagnostic tools launch page, select one or more tools to run. Only the tools that are applicable to the project type, operating system, and programming language are shown. Select **Show all tools** to also see tools that are disabled for this diagnostic session.
79
99
100
+
::: moniker range=">=vs-2022"
101
+

102
+
::: moniker-end
103
+
::: moniker range="<=vs-2019"
80
104

105
+
::: moniker-end
81
106
82
107
1. To start the diagnostic session, select **Start**.
83
108
84
-
While the session is running, some tools show graphs of real-time data on the diagnostic tools page, and controls to pause and resume data collection.
109
+
While the session is running, some tools show graphs of real-time data on the diagnostic tools page, and might show options to pause and resume data collection.
85
110
86
-

111
+
::: moniker range=">=vs-2022"
112
+

113
+
::: moniker-end
114
+
::: moniker range="<=vs-2019"
115
+

116
+
::: moniker-end
87
117
88
118
1. To end the diagnostic session, select **Stop Collection**.
89
119
90
120
The analyzed data appears on the **Report** page.
91
121
92
122
You can save the reports, and open them from the **Recently Opened Sessions** list on the Diagnostic Tools launch page.
93
123
124
+
::: moniker range=">=vs-2022"
125
+

126
+
::: moniker-end
127
+
::: moniker range="<=vs-2019"
94
128

0 commit comments