summaryrefslogtreecommitdiff
path: root/simpleperf/thread_tree.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2019-02-07 15:06:42 -0800
committerYabin Cui <yabinc@google.com>2019-02-07 15:23:32 -0800
commitdb2c493acf984c14c16a0417e6858f0140770208 (patch)
treed5f7c063dfc8b09c4f560094ea7998e989fd1ad2 /simpleperf/thread_tree.h
parented1f0357906b3b92bc180b28a6c2fd1f9082fb67 (diff)
downloadextras-db2c493acf984c14c16a0417e6858f0140770208.tar.gz
simpleperf: fix symbolization in multi-executable-segments libraries.
Apps may run with libraries with multiple executable segments. Symbolization ip addresses in these libraries need to use map.pgoff. The old formula converting ip to vaddr_in_file: vaddr_in_file = ip - map.start + min_executable_vaddr The new formula converting ip to vaddr_in_file: offset_in_file = ip - map.start + map.pgoff vaddr_in_file = offset_in_file - file_offset_of_min_executable_vaddr + min_executable_vaddr Bug: 124056476 Test: run simpleperf_unit_test. Test: use simpleperf to profile facebook app, ip addresses hitting libc.so Test: and libart.so are symbolized correctly. Change-Id: I5fd3ed822a916c4d04a9868d6d209c43ee190c5b
Diffstat (limited to 'simpleperf/thread_tree.h')
-rw-r--r--simpleperf/thread_tree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/simpleperf/thread_tree.h b/simpleperf/thread_tree.h
index 5bdaadae..3094d700 100644
--- a/simpleperf/thread_tree.h
+++ b/simpleperf/thread_tree.h
@@ -117,8 +117,8 @@ class ThreadTree {
void ClearThreadAndMap();
void AddDsoInfo(const std::string& file_path, uint32_t file_type,
- uint64_t min_vaddr, std::vector<Symbol>* symbols,
- const std::vector<uint64_t>& dex_file_offsets);
+ uint64_t min_vaddr, uint64_t file_offset_of_min_vaddr,
+ std::vector<Symbol>* symbols, const std::vector<uint64_t>& dex_file_offsets);
void AddDexFileOffset(const std::string& file_path, uint64_t dex_file_offset);
// Update thread tree with information provided by record.