抓取perfetto trace

抓取perfetto trace:

2023-2-26 hongxi.zhu 已验证
(仅限于Andorid S及以上版本使用)

  1. 通过配置文件抓取:
cat config.pbtx | adb shell perfetto -c - --txt -o /data/misc/perfetto-traces/trace.perfetto-trace
adb pull /data/misc/perfetto-traces/trace.perfetto-trace

或者把配置文件放到手机里:

adb push config.pbtx /data/local/tmp/config.pbtx
adb shell 'cat /data/local/tmp/config.pbtx | perfetto --txt -c - -o /data/misc/perfetto-traces/trace.perfetto-trace'
adb pull /data/misc/perfetto-traces/trace.perfetto-trace
  1. 通过简单字段抓取
adb shell perfetto -o /data/misc/perfetto-traces/trace.perfetto-trace -t 20s -b 128m \
sched freq idle am wm gfx view binder_driver hal dalvik camera input res memory

adb pull /data/misc/perfetto-traces/trace.perfetto-trace

猜你喜欢

转载自blog.csdn.net/qq_40731414/article/details/130656113