diff options
author | Yabin Cui <yabinc@google.com> | 2020-06-24 23:42:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-06-24 23:42:29 +0000 |
commit | fa155a72b0e996faaa9f8fa8920e5fcccaf23efb (patch) | |
tree | ea33b99cc421751d6a0337b0be3a5ed07535dea6 | |
parent | 48eac73581191986c77ff58e9083eea107237bd5 (diff) | |
parent | ed0ef0f011d12ae358176a8810e070d55e11449d (diff) | |
download | extras-fa155a72b0e996faaa9f8fa8920e5fcccaf23efb.tar.gz |
Merge "simpleperf: add doc to show report in android studio."
-rw-r--r-- | simpleperf/doc/android_application_profiling.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/simpleperf/doc/android_application_profiling.md b/simpleperf/doc/android_application_profiling.md index 259c121e..f0e06c08 100644 --- a/simpleperf/doc/android_application_profiling.md +++ b/simpleperf/doc/android_application_profiling.md @@ -18,6 +18,7 @@ Profiling an Android application involves three steps: - [Record and report call graph](#record-and-report-call-graph) - [Report in html interface](#report-in-html-interface) - [Show flamegraph](#show-flamegraph) + - [Report in Android Studio](#report-in-android-studio) - [Record both on CPU time and off CPU time](#record-both-on-cpu-time-and-off-cpu-time) - [Profile from launch](#profile-from-launch) - [Control recording in application code](#control-recording-in-application-code) @@ -243,6 +244,17 @@ $ FlameGraph/stackcollapse-perf.pl out.perf >out.folded $ FlameGraph/flamegraph.pl out.folded >a.svg ``` +## Report in Android Studio + +simpleperf report-sample command can convert perf.data into protobuf format accepted by +Android Studio cpu profiler. The conversion can be done either on device or on host. If you have +more symbol info on host, then prefer do it on host with --symdir option. + +```sh +$ simpleperf report-sample --protobuf --show-callchain -i perf.data -o perf.trace +# Then open perf.trace in Android Studio to show it. +``` + ## Record both on CPU time and off CPU time We can [record both on CPU time and off CPU time](executable_commands_reference.md#record-both-on-cpu-time-and-off-cpu-time). |