summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-07-14 13:26:19 -0700
committerYabin Cui <yabinc@google.com>2016-07-14 14:31:39 -0700
commit15475e6ff1bc0273f666ef1bd6c2f7a50c4b948c (patch)
treec0ccbeef9d35efd4adc853ac973cdf2a6bc91b8d /simpleperf/cmd_report.cpp
parente5b5cf07c7c092a178f25dadff8842e9000d0e1f (diff)
downloadextras-15475e6ff1bc0273f666ef1bd6c2f7a50c4b948c.tar.gz
simpleperf: show dso[+vaddr_in_file] for unknown symbols.
It gives more information than just unknown symbols. Add --no-show-ip option to disable this additional detail. Bug: 29772268 Change-Id: Ie8067f95b5fdc65806044e229ee12095367d115a Test: run simpleperf_unit_test.
Diffstat (limited to 'simpleperf/cmd_report.cpp')
-rw-r--r--simpleperf/cmd_report.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/simpleperf/cmd_report.cpp b/simpleperf/cmd_report.cpp
index 464c57f9..cbdd14b1 100644
--- a/simpleperf/cmd_report.cpp
+++ b/simpleperf/cmd_report.cpp
@@ -280,6 +280,7 @@ class ReportCommand : public Command {
"-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"
+"--no-show-ip Don't show vaddr in file for unknown symbols.\n"
"-o report_file_name Set report file name, default is stdout.\n"
"--pids pid1,pid2,... Report only for selected pids.\n"
"--sort key1,key2,... Select keys used to sort and print the report. The\n"
@@ -379,6 +380,7 @@ bool ReportCommand::Run(const std::vector<std::string>& args) {
bool ReportCommand::ParseOptions(const std::vector<std::string>& args) {
bool demangle = true;
+ bool show_ip_for_unknown_symbol = true;
std::string symfs_dir;
std::string vmlinux;
bool print_sample_count = false;
@@ -428,6 +430,8 @@ bool ReportCommand::ParseOptions(const std::vector<std::string>& args) {
} else if (args[i] == "--no-demangle") {
demangle = false;
+ } else if (args[i] == "--no-show-ip") {
+ show_ip_for_unknown_symbol = false;
} else if (args[i] == "-o") {
if (!NextArgumentOrError(args, &i)) {
return false;
@@ -488,6 +492,10 @@ bool ReportCommand::ParseOptions(const std::vector<std::string>& args) {
Dso::SetVmlinux(vmlinux);
}
+ if (show_ip_for_unknown_symbol) {
+ thread_tree_.ShowIpForUnknownSymbol();
+ }
+
SampleDisplayer<SampleEntry, SampleTree> displayer;
SampleComparator<SampleEntry> comparator;