Skip to content

Commit bd35384

Browse files
authored
Merge pull request #10471 from mistymadonna/flame-graph
New Flame graph doc
2 parents 6bb4730 + c0aaa70 commit bd35384

9 files changed

+70
-9
lines changed

docs/profiling/flame-graph.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Identify hot paths with the Flame Graph
3+
description: Find hot paths in your code with a visualized overview
4+
ms.date: 09/30/2022
5+
ms.topic: how-to
6+
ms.assetid: 7501a20d-04a1-480f-a69c-201524aa709d
7+
author: mikejo5000
8+
ms.author: mikejo
9+
manager: jmartens
10+
ms.technology: vs-ide-debug
11+
monikerRange: '>= vs-2022'
12+
ms.workload:
13+
- multiple
14+
---
15+
# Identify hot paths with a visualized call tree
16+
17+
Flame graphs are a visualization of categorized data, created to visualize stack traces of profiled software so that the most frequent code paths can be identified quickly and accurately.
18+
19+
The **Flame Graph** helps you identify hot paths in your code by visualizing a call tree. The graph gives a visual overview of where time is being spent in your application and you can click on specific nodes to dig into them further.
20+
21+
![Screenshot showing Flame Graph with tooltips displayed.](./media/vs-2022/flame-graph-tooltips.png "Flame Graph with tooltips displayed")
22+
23+
## Investigate hot paths
24+
25+
1. The Flame Graph view is in the CPU tool details tool window, above the source line highlighting view. After you've stopped your profiling session, you can view the Flame Graph by clicking **Open details**.
26+
27+
![Screenshot showing Open details selected.](./media/vs-2022/flame-graph-open-details.png "Open details view selected")
28+
29+
1. Select **Flame Graph** in the Current View dropdown selection.
30+
31+
![Screenshot showing Flame Graph view selected.](./media/vs-2022/flame-graph-view.png "Flame Graph view selected")
32+
33+
![Screenshot showing Flame Graph overview displayed.](./media/vs-2022/flame-graph-overview.png "Flame Graph overview displayed")
34+
35+
1. By default, the flame graph in the CPU tool is shown upside down or as an "icicle chart," where the y-axis is counting stack depth downwards from zero at the top. You can view the standard flame chart layout by clicking **Flip Flame Graph**.
36+
37+
![Screenshot showing Flip Flame Graph selected.](./media/vs-2022/flame-graph-flip.png "Flip Flame Graph selected")
38+
39+
## Navigation
40+
In the Flame Graph view, you can navigate by clicking on a node with a mouse or using the keyboard.
41+
42+
|Keyboard shortcut|Command|
43+
|-|-|
44+
|Tab|Go to any node|
45+
|Up/Down arrow|Go to a node's parent or child|
46+
|Enter|Zoom in|
47+
|Escape|Zoom out|
48+
49+
## See also
50+
- [Diagnose high latency with CPU Insights](../profiling/cpu-insights.md)
51+
- [Analyze CPU usage without debugging](../profiling/cpu-usage.md)
Loading
Loading
Loading
Loading
Loading

docs/profiling/profiling-feature-tour.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Tools available in the Diagnostic Tools window or during a debugging session inc
5252
- [Memory usage](../profiling/memory-usage.md)
5353
- [PerfTips](../profiling/perftips.md)
5454

55+
> [!TIP]
56+
> Use relaunch to skip the launch page and automatically run with your previous settings by pressing **Alt+F2** or by clicking **Debug > Performance Profiler**.
57+
5558
> [!NOTE]
5659
> Windows 8 and later is required to run profiling tools with the debugger (**Diagnostic Tools** window). You can use the [post-mortem](#post_mortem) tools with Windows 7 and later.
5760

docs/profiling/running-profiling-tools-with-or-without-the-debugger.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ When you start debugging in Visual Studio by selecting **Debug** > **Start Debug
4949

5050
The diagnostic session ends when you stop debugging.
5151

52+
>[!NOTE]
53+
>Use relaunch to skip the launch page and automatically run with your previous settings with **Alt+F2** or by clicking **Debug > Performance Profiler**.
54+
5255
For more information, see:
5356

5457
- [Measure application performance by analyzing CPU usage](../profiling/beginners-guide-to-performance-profiling.md)

docs/profiling/toc.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,21 @@
3333
- name: Events Viewer
3434
href: events-viewer.md
3535
- name: CPU Usage
36-
href: cpu-usage.md
37-
- name: CPU Insights
3836
items:
39-
- name: CPU Insights
40-
href: cpu-insights.md
41-
- name: Performance insights
37+
- name: CPU Usage
38+
href: cpu-usage.md
39+
- name: Flame Graph
40+
href: flame-graph.md
41+
- name: CPU Insights
4242
items:
43-
- name: String concatenation
44-
href: perf-insights-string-concatenation.md
45-
- name: Regex
46-
href: perf-insights-regex.md
43+
- name: CPU Insights
44+
href: cpu-insights.md
45+
- name: Performance insights
46+
items:
47+
- name: String concatenation
48+
href: perf-insights-string-concatenation.md
49+
- name: Regex
50+
href: perf-insights-regex.md
4751
- name: File IO
4852
href: use-file-io.md
4953
- name: Memory usage

0 commit comments

Comments
 (0)