赞
踩
trace是分析Android性能问题最直接有效的工具
adb shell perfetto -o /data/misc/perfetto-traces/systrace.log -t 10s sched freq idle am wm gfx view binder_driver hal dalvik input res memory power ss aidl sync binder_lock
adb shell perfetto -o /data/misc/perfetto-traces/systrace.log -t 0 sched freq idle am wm gfx view binder_driver hal dalvik input res memory power ss aidl sync binder_lock
ctrl + c 不可以,用下面的命令去停止。(开两个窗口,一个抓,另一个停)
adb shell killall perfetto
下面是 Linux 版(其他操作系统怎么操作官网也有介绍)
curl -O https://raw.githubusercontent.com/google/perfetto/master/tools/record_android_trace
chmod u+x record_android_trace
./record_android_trace -o trace_file.perfetto-trace -t 10s -b 32mb sched freq idle am wm gfx view binder_driver hal dalvik camera input res memory
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。