summaryrefslogtreecommitdiff
path: root/simpleperf/dso.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2018-06-06 11:20:39 -0700
committerYabin Cui <yabinc@google.com>2018-06-11 11:04:21 -0700
commitc8571d42619a688c96cd6ed2e608c738de9ee7c5 (patch)
treef4761e05c40cc6db87c10c58b6e575bb1d58abce /simpleperf/dso.cpp
parent08fe4a22accad1ae126c623c6ef5d2846930a008 (diff)
downloadextras-c8571d42619a688c96cd6ed2e608c738de9ee7c5.tar.gz
simpleperf: support JIT/interpreted java code in system wide profiling.
It contains below changes: 1. Support monitoring multiple processes in JITDebugReader. 2. Switch from 100ms period to 100ms interval when scanning JIT debug info changes. 3. Limit read entry length by seqlock different instead of a fixed value. 4. Support disable/enable periodic events in IOEventLoop. 5. Remove duplicated dex file offsets in DexFileDso. 6. Enable JITDebugReader for recording on Android P. 7. Remove " (deleted)" suffix in filenames of maps, because some vdex files in map file have this suffix. Bug: http://b/79118393 Test: run `simpleperf record -a` manually. Test: run simpleperf_unit_test. Change-Id: Ia398ddd7bc74cbc5fdca6caa6f548a62447d9729
Diffstat (limited to 'simpleperf/dso.cpp')
-rw-r--r--simpleperf/dso.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/simpleperf/dso.cpp b/simpleperf/dso.cpp
index 223866d0..a9c86f4a 100644
--- a/simpleperf/dso.cpp
+++ b/simpleperf/dso.cpp
@@ -333,7 +333,12 @@ class DexFileDso : public Dso {
: Dso(DSO_DEX_FILE, path, debug_file_path) {}
void AddDexFileOffset(uint64_t dex_file_offset) override {
- dex_file_offsets_.push_back(dex_file_offset);
+ auto it = std::lower_bound(dex_file_offsets_.begin(), dex_file_offsets_.end(),
+ dex_file_offset);
+ if (it != dex_file_offsets_.end() && *it == dex_file_offset) {
+ return;
+ }
+ dex_file_offsets_.insert(it, dex_file_offset);
}
const std::vector<uint64_t>* DexFileOffsets() override {