用命令行:
- cd android-sdk-linux/platform-tools/systrace
- python systrace.py --time=10 -o trace.html sched gfx view wm
- 用浏览器打开trace.html
用android studio:
- tools->android->android device monitor
- 点左上角那个“capture system wide trace using Android systrace”,如图所示
打开trace.html的放大缩小和移动
- 放大:w
- 缩小:s
- 左移:a
- 右移:d