History log of /system/extras/simpleperf/read_apk.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dec43c18d06415a955b8f32355bca925be901905 30-Jul-2016 Yabin Cui <yabinc@google.com> simpleperf: print warning message when failed to read symbol table from elf file.

Change return type of read elf functions to ElfStatus, and print warning message
based on situation.
Add corresponding test.

Bug: 29193936
Change-Id: Ie449f8be34cb579962cb73f4be3df9e4997270ca
Test: run simpleperf_unit_test.
/system/extras/simpleperf/read_apk.cpp
3e4c5950f3aafb0bf66544468d98ee3ec26b705c 27-Jul-2016 Yabin Cui <yabinc@google.com> simpleperf: use libevent in stat command.

Wrap libevent in IOEventLoop, use IOEventLoop in stat command.
Add corresponding tests.

Bug: http://b/30405638
Change-Id: I78b79e0eff1365ab46dde29c2a24a2def586af79
Test: run simpleperf_unit_test.
/system/extras/simpleperf/read_apk.cpp
8f680f60dc800bec880c5c35bfbc1ac36165e1f3 19-Mar-2016 Yabin Cui <yabinc@google.com> Simpleperf: add test for reporting callgraph of shared libraries in apk file.

Also add comment for how to generate each perf.data in testdata/.
Add --log <leve> argument in unit test to help debugging.

Bug: 26962895
Change-Id: Iaa5a81cd8da5174d5b5b4e7847811e2432bf0db8
/system/extras/simpleperf/read_apk.cpp
be7ec66eaa4f995bd9068637f7c7d5718173922c 02-Mar-2016 Yabin Cui <yabinc@google.com> simpleperf: support building cts test.

1. build cts test libraries.
2. change tests to use tmpfile instead of perf.data.
3. support extracting testdata from cts test file.

Bug: 27387280
Change-Id: I7c5db77f3157d586d0c9beb446b247626e7cce36
/system/extras/simpleperf/read_apk.cpp
41e32ca272f474d35a84a6e7c7f0a28c3160abc3 18-Feb-2016 Yabin Cui <yabinc@google.com> simpleperf: fix build by removing off64_t.

Bug: 26962895
Change-Id: I211bacc22c2f6b6b24c639365c706e93d66ce4ac
/system/extras/simpleperf/read_apk.cpp
b1a885b014540a2f7798b5a35ea0f0ec150d93ee 15-Feb-2016 Yabin Cui <yabinc@google.com> simpleperf: report symbols of native libraries in apk file.

Changes included:
1. provide interface in read_apk.h to read build id and symbols.
2. report symbols of native libraries in apk file.
3. refactor code in read_elf.cpp and read_apk.cpp.
4. add verbose log.
5. add -o report_file_name option for report command.
6. add corresponding unit tests.

Bug: 26962895
Change-Id: I0d5398996e0c29dba4a6f5226692b758ca096bbd
/system/extras/simpleperf/read_apk.cpp
569f64afd3db2b43003978765b833669f99477d2 06-Feb-2016 Yabin Cui <yabinc@google.com> simpleperf: port read_apk and read_apk/read_elf tests to nonlinux.

Also make following small changes:
1. Manage testdata files like libziparchive.
2. Replace StringToPid() with android::base::ParseInt().
3. Add tests in read_elf_test.

Bug: 26962895

Change-Id: I6603e9f3cea3a013e2618ea003790d102739f843
/system/extras/simpleperf/read_apk.cpp
f831e6d12ca2298cb34b155a9d91ef002d0482f3 02-Feb-2016 Than McIntosh <thanm@google.com> Support profiling of shared libs embedded in APKs.

Some APKs contain shared libraries that the linker handles
by mmap'ing directly from their APKs (if the library is
uncompressed and the proper manifest flag is set). With
this patch simpleperf now breaks out samples on a per-li
basis and reports the name of the lib within the APK.
Example output:

Cmdline: /system/xbin/simpleperf record -a sleep 30
Samples: 140672 of event 'cpu-cycles'
Event count: 84111474884

Overhead Command Pid Tid Shared Object
90.22% b_open_from_apk 19066 19066
/data/app/com.android.frameworks.coretests.install_jni_lib_open_from_apk-2/base.apk!lib/armeabi-v7a/libgcdstuff.so
4.85% b_open_from_apk 19066 19066
/data/app/com.android.frameworks.coretests.install_jni_lib_open_from_apk-2/base.apk!lib/armeabi-v7a/libframeworks_coretests_jni.so
1.19% simpleperf 19085 19085 /system/lib/libc.so
...

Bug: 22560619
Change-Id: I1e0f2e155e03b33935eac24e104c3fd7b9a7e33c
/system/extras/simpleperf/read_apk.cpp