summaryrefslogtreecommitdiff
path: root/simpleperf/thread_tree.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-07-21 12:29:47 -0700
committerYabin Cui <yabinc@google.com>2016-07-21 12:31:35 -0700
commit71b533b5a2902c75901c9e3fc9da3befd53e54dc (patch)
tree81c8d7f435a5730711b52f1aaf3877f9f8b64778 /simpleperf/thread_tree.cpp
parenta33edd664d194e03ca25220f8657e2610449d632 (diff)
downloadextras-71b533b5a2902c75901c9e3fc9da3befd53e54dc.tar.gz
simplperf: improve unknown symbol print in report-sample command.
Add * for all unknown symbols, so it is easier to write program to identify unknown symbols. Use dso[+ip_offset] for unknown symbols. Bug: 28114205 Change-Id: I14cfffe6673a9aedc62cc288c1b2d724ab411f5d
Diffstat (limited to 'simpleperf/thread_tree.cpp')
-rw-r--r--simpleperf/thread_tree.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/simpleperf/thread_tree.cpp b/simpleperf/thread_tree.cpp
index fafefa01..3a20ee76 100644
--- a/simpleperf/thread_tree.cpp
+++ b/simpleperf/thread_tree.cpp
@@ -228,7 +228,9 @@ const Symbol* ThreadTree::FindSymbol(const MapEntry* map, uint64_t ip,
if (symbol == nullptr) {
if (show_ip_for_unknown_symbol_) {
std::string name = android::base::StringPrintf(
- "%s[+%" PRIx64 "]", dso->FileName().c_str(), vaddr_in_file);
+ "%s%s[+%" PRIx64 "]",
+ (show_mark_for_unknown_symbol_ ? "*" : ""),
+ dso->FileName().c_str(), vaddr_in_file);
dso->InsertSymbol(Symbol(name, vaddr_in_file, 1));
symbol = dso->FindSymbol(vaddr_in_file);
CHECK(symbol != nullptr);