|
| 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 | + |
| 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 | +  |
| 28 | + |
| 29 | +1. Select **Flame Graph** in the Current View dropdown selection. |
| 30 | + |
| 31 | +  |
| 32 | + |
| 33 | +  |
| 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 | +  |
| 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) |
0 commit comments