summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2020-08-25 18:49:03 -0700
committerAlex Light <allight@google.com>2020-09-03 17:06:37 +0000
commit93deebfd2af0470b13973d51e2cce6c62a7344f4 (patch)
treea5d0090945c0ed07a21bb5624f84dff0b5cd7d1a /compiler/optimizing/optimizing_compiler.cc
parent267832d6bb0d75ce945e623cd1696dde21ee2f2a (diff)
Add a simple profiling agent.
This agent will simply hold onto how many times each method is called and dump the information in a JSON file wherever one wishes. Test: manual, attach to google-maps Test: ./art/test/run-test --host --dev --64 --with-agent $ANDROID_HOST_OUT/lib64/libsimpleprofileds.so=/proc/self/fd/2,dump_on_shutdown 001-HelloWorld Test: ``` % adb root % adb shell setenforce 0 % adb push $OUT/system/lib64/libsimpleprofileds.so /data/local/tmp/libsimpleprofileds.so % adb shell blueline:/ # cd /data/data/com.google.android.apps.maps blueline:/data/data/com.google.android.apps.maps # cp /data/local/tmp/libsimpleprofileds.so . blueline:/data/data/com.google.android.apps.maps # ps -A | grep maps u0_a178 9143 927 15691440 190132 SyS_epoll_wait 0 S com.google.android.apps.maps blueline:/data/data/com.google.android.apps.maps # cmd activity attach-agent com.google.android.apps.maps $PWD/libsimpleprofileds.so=$PWD/maps.json blueline:/data/data/com.google.android.apps.maps # # Do things on the app. blueline:/data/data/com.google.android.apps.maps # kill -3 9143 blueline:/data/data/com.google.android.apps.maps # wc -l maps.json 17901 maps.json blueline:/data/data/com.google.android.apps.maps # ^D % adb pull /data/data/com.google.android.apps.maps/maps.json % jq 'sort_by(.count) | reverse' maps.json | head -13 [ { "class_name": "Ljava/lang/String;", "method_name": "charAt", "method_descriptor": "(I)C", "count": 586996 }, { "class_name": "Ljava/lang/Object;", "method_name": "<init>", "method_descriptor": "()V", "count": 482491 }, ``` Change-Id: I87056f641648c496c63c9de715951b65707844ef
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
0 files changed, 0 insertions, 0 deletions