只需要在cmdline中加入androidboot.bootchart=50即可启动bootchart, 50表示抓取的时间,然后会在/data/bootchart下生成文件
安装sudo apt-get install bootchart pybootchartgui工具,
将/data/bootchart文件夹pull到本地,tar -czf bootchart.tgz * 命令打包
接着运行bootchart bootchart.tgz即可生成图片,
如果运行出错提示除0错误,进入/usr/share/pyshared/pybootchartgui/目录,修改draw.py 200行如下:
xscale = float(chart_bounds[2]) / max(0.00001, max(x for (x,y) in data))
yscale = float(chart_bounds[3]) / max(0.00001, max(y for (x,y) in data))
来规避该错误即可