diff --git a/.vim/vimwiki/run_perf.wiki b/.vim/vimwiki/run_perf.wiki index e1416bc..4ebb74d 100644 --- a/.vim/vimwiki/run_perf.wiki +++ b/.vim/vimwiki/run_perf.wiki @@ -6,6 +6,83 @@ ./report_html.py -i perf.data === Perf camera server === - ./run_simpleperf_on_device.py record -g -p $( adb shell ps | grep camera.provider | awk '{print $2}') --duration 5 -o perf_test.data + +./run_simpleperf_on_device.py record -g -p $( adb shell ps | grep camera.provider | awk '{print $2}') --duration 5 -o perf_test.data adb pull /data/local/tmp/perf_test.data . ./report_html.py -i perf_test.data + + +=== Call Graph === +# https://android.googlesource.com/platform/prebuilts/simpleperf/+/refs/heads/ndk-r13-release/README.md +./run_simpleperf_on_device.py record -g -p $( adb shell ps | grep camera.provider | awk '{print $2}') --duration 5 -o perf_test.data -g --symfs . +# Or, but do not seems better +./run_simpleperf_on_device.py record -g -p $( adb shell ps | grep camera.provider | awk '{print $2}') --duration 5 -o perf_test.data -g --symfs . --call-graph fp +adb shell /data/local/tmp/simpleperf report -n -g --symfs . -i /data/local/tmp/perf_test.data +adb shell /data/local/tmp/simpleperf report -n -g --symfs . -i /data/local/tmp/perf_test.data >perf.report && python3 report.py perf.report + + +== With perfecto == +https://devblogs.microsoft.com/performance-diagnostics/perfetto-tooling-for-analyzing-android-linux-and-chromium-browser-performance-microsoft-performance-tools-linux-android/ +https://perfetto.dev/docs/reference/trace-config-proto#PerfEventConfig + + + +#!/usr/bin/env bash +# see https://devblogs.microsoft.com/performance-diagnostics/perfetto-tooling-for-analyzing-android-linux-and-chromium-browser-performance-microsoft-performance-tools-linux-android/ +adb shell perfetto \ + -c - --txt \ + -o /data/misc/perfetto-traces/trace \ +<