diff options
author | Yabin Cui <yabinc@google.com> | 2018-06-06 11:20:39 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-06-11 11:04:21 -0700 |
commit | c8571d42619a688c96cd6ed2e608c738de9ee7c5 (patch) | |
tree | f4761e05c40cc6db87c10c58b6e575bb1d58abce /simpleperf/dso_test.cpp | |
parent | 08fe4a22accad1ae126c623c6ef5d2846930a008 (diff) | |
download | extras-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_test.cpp')
-rw-r--r-- | simpleperf/dso_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/simpleperf/dso_test.cpp b/simpleperf/dso_test.cpp index 75d4c851..a1d005a3 100644 --- a/simpleperf/dso_test.cpp +++ b/simpleperf/dso_test.cpp @@ -92,6 +92,15 @@ TEST(dso, dex_file_dso) { #endif // defined(__linux__) } +TEST(dso, dex_file_offsets) { + std::unique_ptr<Dso> dso = Dso::CreateDso(DSO_DEX_FILE, ""); + ASSERT_TRUE(dso); + for (uint64_t offset : {0x3, 0x1, 0x5, 0x4, 0x2, 0x4, 0x3}) { + dso->AddDexFileOffset(offset); + } + ASSERT_EQ(*dso->DexFileOffsets(), std::vector<uint64_t>({0x1, 0x2, 0x3, 0x4, 0x5})); +} + TEST(dso, embedded_elf) { const std::string file_path = GetUrlInApk(GetTestData(APK_FILE), NATIVELIB_IN_APK); std::unique_ptr<Dso> dso = Dso::CreateDso(DSO_ELF_FILE, file_path); |