From 15475e6ff1bc0273f666ef1bd6c2f7a50c4b948c Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 14 Jul 2016 13:26:19 -0700 Subject: 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. --- simpleperf/cmd_report.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'simpleperf/cmd_report.cpp') 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 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& args) { bool ReportCommand::ParseOptions(const std::vector& 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& 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& args) { Dso::SetVmlinux(vmlinux); } + if (show_ip_for_unknown_symbol) { + thread_tree_.ShowIpForUnknownSymbol(); + } + SampleDisplayer displayer; SampleComparator comparator; -- cgit v1.2.3