summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-05-18 17:11:32 -0700
committerYabin Cui <yabinc@google.com>2017-05-18 18:35:26 -0700
commitdcb2a3e580f155bb28621c4cbad019d104e8f300 (patch)
treefa795a0a463d2d219e83281844b3ea3bc7f24361 /simpleperf/cmd_report.cpp
parentbc3f1c9f57f749cc616f9aa5b390bc2f70b15507 (diff)
downloadextras-dcb2a3e580f155bb28621c4cbad019d104e8f300.tar.gz
simpleperf: enable two options by default.
Enable dumping symbols in record cmd by default, and change --dump-symbols option into --no-dump-symbols option. Show brief call graph in report cmd by default, and change --brief-callgraph option into --full-callgraph option. Make the change because these two behaviors are always recommended. Bug: None. Test: run simpleperf_unit_test. Change-Id: Icff6a843a7f46c56313500f4da119aa5118a57e5
Diffstat (limited to 'simpleperf/cmd_report.cpp')
-rw-r--r--simpleperf/cmd_report.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp
index a3f80948..29cf743a 100644
--- a/simpleperf/cmd_report.cpp
+++ b/simpleperf/cmd_report.cpp
@@ -307,13 +307,15 @@ class ReportCommand : public Command {
"report", "report sampling information in perf.data",
// clang-format off
"Usage: simpleperf report [options]\n"
+"The default options are: -i perf.data --sort comm,pid,tid,dso,symbol.\n"
"-b Use the branch-to addresses in sampled take branches instead of the\n"
" instruction addresses. Only valid for perf.data recorded with -b/-j\n"
" option.\n"
-"--brief-callgraph Print brief call graph.\n"
"--children Print the overhead accumulated by appearing in the callchain.\n"
"--comms comm1,comm2,... Report only for selected comms.\n"
"--dsos dso1,dso2,... Report only for selected dsos.\n"
+"--full-callgraph Print full call graph. Used with -g option. By default,\n"
+" brief call graph is printed.\n"
"-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"
@@ -363,7 +365,7 @@ class ReportCommand : public Command {
callgraph_max_stack_(UINT32_MAX),
callgraph_percent_limit_(0),
raw_period_(false),
- brief_callgraph_(false) {}
+ brief_callgraph_(true) {}
bool Run(const std::vector<std::string>& args);
@@ -445,8 +447,6 @@ bool ReportCommand::ParseOptions(const std::vector<std::string>& args) {
for (size_t i = 0; i < args.size(); ++i) {
if (args[i] == "-b") {
use_branch_address_ = true;
- } else if (args[i] == "--brief-callgraph") {
- brief_callgraph_ = true;
} else if (args[i] == "--children") {
accumulate_callchain_ = true;
} else if (args[i] == "--comms" || args[i] == "--dsos") {
@@ -458,7 +458,8 @@ bool ReportCommand::ParseOptions(const std::vector<std::string>& args) {
}
std::vector<std::string> strs = android::base::Split(args[i], ",");
filter.insert(strs.begin(), strs.end());
-
+ } else if (args[i] == "--full-callgraph") {
+ brief_callgraph_ = false;
} else if (args[i] == "-g") {
print_callgraph_ = true;
accumulate_callchain_ = true;