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/flame-graph.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,29 +13,41 @@ monikerRange: '>= vs-2022'
13
13
14
14
# Identify hot paths with a flame graph (C#, Visual Basic, C++, F#)
15
15
16
-
The **Flame Graph**in the CPU Usage and Instrumentation tools help you identify hot paths in your code by visualizing a call tree. 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. 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.
16
+
Visual Studio profiling tools for CPU utilization and instrumentation include the **Flame Graph**view. The **Flame Graph** helps you identify *hot paths* in your code by presenting a visualization of the call tree. The *hot path* is the call stack for the functions that are using the most CPU or the most time, and is often a good place to look for potential performance optimizations. 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.
17
17
18
-

For a tutorial that shows how to improve performance using the flame graph, see [Case study: Beginner's guide to optimizing code](../profiling/optimize-code-using-profiling-tools.md). For information on the CPU profiler, see [Analyze performance by using CPU profiling](../profiling/cpu-usage.md).
21
21
22
22
## Investigate hot paths
23
23
24
-
1.The Flame Graph view is in the details view of the tool, above the source line highlighting view. After you've stopped your profiling session, you can view the Flame Graph by clicking **Open details**.
24
+
The Flame Graph view is in the details view of *.diagession* report.
25
25
26
-

26
+
1.[Start a profiling session](../profiling/cpu-usage.md#collect-cpu-utilization-data) with either the CPU Usage or Instrumentation tool.
27
+
28
+
1. After you've stopped your profiling session and the report loads, select **Open details**.
29
+
30
+

27
31
28
32
1. Select **Flame Graph** in the Current View dropdown selection.
By default, the data shown in the Flame Graph represents the same data as shown in the **Call tree** view, which represents the data collection period. Specifically, for CPU Usage, it shows the **Total CPU** values. This value is inclusive, so it includes CPU utilization (that is, CPU computation time) used by calls to the function, and any other functions called by the function. In the same way, for Instrumentation, the graph shows the values equivalent to the **Total** column in the call tree view.
41
+
42
+
However, if you select a node, the selected node becomes the new baseline and uses 100% of the flame graph width. This allows you to better visualize a complex call tree. Choose **Reset Zoom** to return to the default view.
43
+
44
+
## Flip the Flame Graph
45
+
46
+
By default, the flame graph in the tool is shown upside down or as an "icicle chart," where the y-axis is counting stack depth downwards from zero at the top.
35
47
36
-
1. By default, the flame graph in the 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**.
48
+
You can view a standard flame chart layout by clicking **Flip Flame Graph**.
0 commit comments