OSDN Git Service

simpleperf: change default callgraph to use caller mode.
authorYabin Cui <yabinc@google.com>
Thu, 14 Jul 2016 18:50:31 +0000 (11:50 -0700)
committerYabin Cui <yabinc@google.com>
Thu, 14 Jul 2016 18:58:34 +0000 (11:58 -0700)
Callgraph in caller mode shows how functions call others, i.e.,
main() -> func1() -> func2(). Instead, callgraph in callee mode shows
how functions are called by others, i.e., func2() <- func1() <- main().
It seems callgraph in caller mode is easier to understand than callee
mode. So change to default option to use caller mode.

Bug: 29574526
Change-Id: I85f104ef7c974bbf7cafd290563e762ba1e0a084
Test: manually check if the default call graph changes.

simpleperf/cmd_report.cpp

index 464c57f..aea91f8 100644 (file)
@@ -276,7 +276,7 @@ class ReportCommand : public Command {
 "-g [callee|caller]    Print call graph. If callee mode is used, the graph\n"
 "                      shows how functions are called from others. Otherwise,\n"
 "                      the graph shows how functions call others.\n"
-"                      Default is callee mode.\n"
+"                      Default is caller mode.\n"
 "-i <file>  Specify path of record file, default is perf.data.\n"
 "-n         Print the sample count for each item.\n"
 "--no-demangle         Don't demangle symbol names.\n"
@@ -313,7 +313,7 @@ class ReportCommand : public Command {
         system_wide_collection_(false),
         accumulate_callchain_(false),
         print_callgraph_(false),
-        callgraph_show_callee_(true) {}
+        callgraph_show_callee_(false) {}
 
   bool Run(const std::vector<std::string>& args);