Viewing Method Sampling Analysis Results
Prerequisites
A sampling analysis task has been created and the analysis is complete.
Procedure
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Sampling Profiling.
Click the CPU tab.
- Click the Method Sampling tab.View the flame graph, inverted flame graph, and call tree. Java method sample is used as an example, as shown in Figure 1 and Figure 3.
- You can select one of the following options from the Graph Type drop-down list:
- Flame graph: displays the flame graph. When you hover the mouse pointer over a function block, the detailed information about the function is displayed.
The Y axis indicates the call stack. Each layer has a function. A deeper stack indicates a higher flame. The top is the function being executed, and its parent functions are below it. The X axis shows the number of samplings of each function. If a function occupies a wider area on the X axis, it is more frequently sampled and its execution time is longer. Note that the X axis does not represent time. Instead, it represents all call stacks arranged in alphabetical order.
- An inverted flame graph starts from the top of the stack and gradually traces back to the bottom of the stack. It aggregates the call stacks that have the same call method.
- Call tree by thread: displays the logical process of each call stack in a tree structure and analyzes the call relationship and proportion of functions in the program.
- Flame graph: displays the flame graph. When you hover the mouse pointer over a function block, the detailed information about the function is displayed.
- You can choose Java method sample or Native method sample from the Sampling Data drop-down box.
- You can display the flame graph and reverse flame graph as needed: Click
to flip the flame graph up and down; click
to restore the flame graph to its initial status; click
to sort the inverted flame graph data by function proportion; click
to sort the inverted flame graph data by function name; click
and
to expand or collapse the content respectively; click
to view a graph in full screen. - For the flame graph and reverse flame graph, a search box is provided for you to search for a method name. The target method name is marked in purple and its percentage in all stacks is displayed. You can click Clear to remove the purple mark and search result.
Figure 2 Inverted flame graph
- You can select one of the following options from the Graph Type drop-down list:
Parent topic: Viewing Analysis Results

