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
12 files changed