summaryrefslogtreecommitdiff
path: root/simpleperf/read_dex_file.h
AgeCommit message (Collapse)Author
2019-01-09Rename libdexfile external API header.Martin Stjernholm
Test: m Bug: 120978655 Change-Id: Ic7e377541dc13640134e6bcf3fea9667b7cad1ef
2018-12-13Use libdexfile external API in simpleperf.Martin Stjernholm
Test: device boot Test: atest system/extras/simpleperf/ (lots of failures, but no new ones. 4 of 4 passed in simpleperf_unit_test) Test: mmma system/extras/simpleperf && adb root && adb shell rm -rf /data/test && adb push out/target/product/taimen/testcases/simpleperf_unit_test /data/test && adb shell /data/test/arm64/simpleperf_unit_test && adb shell /data/test/arm/simpleperf_unit_test Bug: 119632407 Change-Id: Id070b8a99cb4d3bf4ec90cae186a2e88bcec72a1
2018-05-22simpleperf: get symbols from dex files extracted from zip files.Yabin Cui
ART may extract dex files into memory from zip files. This CL supports getting symbols from extracted dex files in below steps: 1. Change map names in "/dev/ashmem/dalvik-xxx extracted in memory from yyy.apk" format into yyy.apk!/xxx format. 2. Support dumping dex files in yyy.apk!/xxx format in JITDebugReader. 3. Support reading symbols from dex files in yyy.apk!/xxx format in DexFileDso. Also refactor FileHelper to return android::base::unique_fd, refactor ArchiveHelper to wrap all operations to zip files. Bug: 79118393 Test: run simpleperf_unit_test. Test: run simpleperf on an app containing extracted dex files. Change-Id: I65dbd98843f2d47272ea72935fd3d2b6d6e8ae40
2018-03-28simpleperf: support showing symbols for interpreted java code.Yabin Cui
To convert from a dex_pc (returned by libunwindstack) to a symbol name, we need below things: 1. The mapping info of the vdex file containing the dex_pc. 2. The offsets of dex files in the vdex file. So make below changes: 1. Record none executable maps when profiling java code. 2. Refactor dso code to add a new type for dex file, using DexFileDso to store dex file offsets in a vdex file, and load symbols from that vdex file. 3. Add read_dex_file.cpp to read java symbols using libdexfile. 4. Change the format of file section in record_file_format.h, to store dex file offsets in vdex files. Bug: http://b/73126888 Bug: http://b/77236599 Test: Run simpleperf to profile several apps manually, can see Test: callstacks of both java code and native code. Test: Run simpleperf_unit_test. Change-Id: I08005a03beb3df1a70db034bc463f555934856ba