Profiling my program with linux perf and different call graph modes gives different results
问题 I want to profile my c++ program with linux perf. For this I used the three following commands and I do not understand why I get three completely different reports. perf record --call-graph dwarf ./myProg perf report perf record --call-graph fp ./myProg perf report perf record --call-graph lbr ./myProg perf report Also I do not understand why the main function is not the highest function in the list. The logic of my program is the following, the main function calls the getPogDocumentFromFile