Skip to content

Commit 0c0dd61

Browse files
authored
Merge pull request #12833 from Mikejo5000/mikejo-br23
Add Just My Code settings to CPU Usage article, links
2 parents dbad677 + 8d38888 commit 0c0dd61

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

docs/debugger/autos-and-locals-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Inspect variables - Autos and Locals windows
33
description: Inspect variables in the Autos and Locals windows while debugging in Visual Studio. The Autos and Locals windows show variable values while you are debugging.
4-
ms.date: 07/20/2023
4+
ms.date: 07/25/2024
55
ms.topic: how-to
66
f1_keywords:
77
- vs.debug.autos

docs/profiling/beginners-guide-to-performance-profiling.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Measure CPU utilization in your apps"
33
description: Measure and analyze CPU performance issues in your C#, Visual Basic, C++, or F# application by using the debugger-integrated diagnostics tools in Visual Studio.
4-
ms.date: 12/02/2022
4+
ms.date: 07/25/2024
55
ms.topic: tutorial
66
helpviewer_keywords:
77
- "Profiling Tools, quick start"
@@ -16,7 +16,7 @@ ms.subservice: debug-diagnostics
1616

1717
# Measure application performance by analyzing CPU utilization (C#, Visual Basic, C++, F#)
1818

19-
Find performance issues while you're debugging with the debugger-integrated **CPU Usage** diagnostic tool. You can also analyze CPU usage without a debugger attached or by targeting a running app. For more information, see [Run profiling tools with or without the debugger](../profiling/running-profiling-tools-with-or-without-the-debugger.md).
19+
Find performance issues while you're debugging with the debugger-integrated **CPU Usage** diagnostic tool. You can also analyze CPU usage without a debugger attached or by targeting a running app. For more information, see [Run profiling tools with or without the debugger](../profiling/running-profiling-tools-with-or-without-the-debugger.md) and [Analyze performance by using CPU profiling](../profiling/cpu-usage.md).
2020

2121
When the debugger pauses, the **CPU Usage** tool in the Diagnostic Tools window collects information about the functions that are executing in your application. The tool lists the functions that were performing work, and provides a timeline graph you can use to focus on specific segments of the sampling session.
2222

@@ -174,21 +174,37 @@ We recommend that you begin analyzing your data by examining the list of functio
174174

175175
- **Modules** The name of the module containing the function, or the number of modules containing the functions in an [External Code] node.
176176

177-
To see the function calls that use the highest percentage of the CPU in the call tree view, click **Expand Hot Path**.
177+
To see the function calls that use the highest percentage of the CPU in the call tree view, click **Expand Hot Path**. The hot path can help focus your investigation on the area that would have the most impact.
178+
178179

179180
![Screenshot that shows Diagnostics Tools Hot Path.](../profiling/media/vs-2019/diag-tools-hot-path.png "DiagToolsHotPath")
180181

181182
> [!NOTE]
182183
> If you see code in the call tree marked as "broken" code or "unwalkable stack", this indicates that Event Tracing for Windows (ETW) events were likely dropped. Try collecting the same trace a second time to resolve the issue.
183184
185+
4. To see a different view of the data, select **Flame Graph** from the drop-down list at the top of the pane.
186+
187+
The flame graph provides a different visualization of the call tree that may help you to analyze the data. For more information, see [Identify hot paths with a flame graph](../profiling/flame-graph.md).
188+
184189
## View external code
185190

186-
External code are functions in system and framework components that are executed by the code you write. External code include functions that start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you won't be interested in external code, and so the CPU Usage tool gathers the external functions of a user method into one **[External Code]** node.
191+
::: moniker range=">=vs-2022"
192+
193+
External code are functions in system and framework components that are executed by the code you write. External code includes functions that start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you won't be interested in external code, and so the CPU Usage tool gathers the external functions of a user method into one **[External Call]** node.
194+
195+
If you want to view the call paths of external code, deselect **Show Just My Code** from the **Settings** list and then choose **Apply**.
187196

197+
![Screenshot that shows Settings, then Show Just My Code.](../profiling/media/vs-2022/diagnostics-tools-show-external-code.png)
198+
199+
::: moniker-end
188200
::: moniker range="vs-2019"
201+
202+
External code are functions in system and framework components that are executed by the code you write. External code includes functions that start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you won't be interested in external code, and so the CPU Usage tool gathers the external functions of a user method into one **[External Code]** node.
203+
189204
If you want to view the call paths of external code, choose **Show External Code** from the **Filter view** list and then choose **Apply**.
190205

191-
![Screenshot that shows Choose Filter View, then Show External Code.](../profiling/media/diag-tools-show-external-code.png "DiagToolsShowExternalCode")
206+
![Screenshot that shows Choose Filter View, then Show External Code.](../profiling/media/diag-tools-show-external-code.png)
207+
192208
::: moniker-end
193209

194210
Be aware that many external code call chains are deeply nested, so that the width of the Function Name column can exceed the display width of all but the largest of computer monitors. When this happens, function names are shown as **[...]**.

docs/profiling/cpu-usage.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: CPU profiling in the Performance Profiler
33
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: 08/15/2023
4+
ms.date: 07/25/2024
55
ms.topic: how-to
66
ms.custom: "profiling-seo"
77
author: mikejo5000
@@ -147,14 +147,16 @@ You can click the **Expand Hot Path** and **Show Hot Path** buttons to see the f
147147

148148
#### <a name="BKMK_External_Code"></a> External code
149149

150-
System and framework functions that are executed by your code are called *external code*. External code functions start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you aren't interested in external code, so the CPU Usage call tree gathers the external functions of a user method into one **[External Code]** node.
151-
152150
::: moniker range=">=vs-2022"
151+
System and framework functions that are executed by your code are called *external code*. External code functions start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you aren't interested in external code, so the CPU Usage call tree gathers the external functions of a user method into one **[External Call]** node.
152+
153153
To view the call paths of external code, switch the current view to the **Call Tree** view or right-click and select **View in Call Tree**.
154154

155155
![Screenshot that shows Show in Call Tree.](../profiling/media/vs-2022/cpu-use-wt-call-tree-view.png "Show Call Tree")
156156
::: moniker-end
157157
::: moniker range="vs-2019"
158+
System and framework functions that are executed by your code are called *external code*. External code functions start and stop the app, draw the UI, control threading, and provide other low-level services to the app. In most cases, you aren't interested in external code, so the CPU Usage call tree gathers the external functions of a user method into one **[External Code]** node.
159+
158160
To view the call paths of external code, on the main diagnostic report page (right pane), select **Show External Code** from the **Filter** dropdown, and then select **Apply**. The **Call Tree** view of the **CPU Usage** page then expands the external code calls. (The **Filter** dropdown is available on the main diagnostic page, not the detailed views.)
159161

160162
![Screenshot that shows Show External Code.](../profiling/media/cpu-use-wt-filter-view.png "Show External Code")
Loading

0 commit comments

Comments
 (0)