Inconsistency Between the Flame Graph of Call Stacks and the Actual Application Code
Symptom
The collected call stacks of hotspot functions are inconsistent with the actual code. In the application, a function or method is called only once, while the collected data contains another call branch with a very low proportion. The proportion of abnormal call stacks collected is extremely low, which does not affect the locating of major performance bottlenecks.
Possible Cause
The perf automatically installed during OS installation does not match the kernel version used during compilation. In addition, the call stack of the target application is too deep and the function execution time is too short.
Troubleshooting Procedure
Use the corresponding kernel version to recompile the perf source code.
The compilation procedure varies according to the OS. Perform the compilation based on the actual condition.