hakunamatata

hakunamatata

Perfetto#

1. 使用 perfetto 抓取 trace#

adb shell setprop persist.traced.enable 1
使用 adb 命令抓取
通过 adb 把配置推送到手机:
adb push perfetto.pbtx /data/local/tmp/perfetto.pbtx

使用 adb 让手机以指定配置抓取Perfetto Trace:
adb shell 'cat /data/local/tmp/perfetto.pbtx | perfetto --txt -c - -o /data/misc/perfetto-traces/trace'

结束抓取:
adb shell 'perfetto --attach=perf_debug --stop'

相关文件见同级目录

python3 perfetto.py -c perfetto.pbtx -o /data/misc/perfetto-traces/trace_file.perfetto-trace

加载中...
此文章数据所有权由区块链加密技术和智能合约保障仅归创作者所有。