目的
本文档用于说明如何通过操作生成imx6 bootchart流程图,以便于做android系统启动优化。
bootchart用途
Bootchart is a system designed to show a graphical display of the activity of a system during boot.
Built-in Bootchart
Under android top level dir.
#export INIT_BOOTCHART=true
#touch system/core/init/init.cpp
Recompile android
How to enable bootchart
After burn new android system image:
Through adb tool login device
#echo 120 > /data/bootchart/start
Then reboot system
Wait for 120s, login in devices
# cd /data/bootchart
# tar zvf bootchart.tar.gz *
Pull bootchart.tar.gz from device to local system.
adb pull /data/bootchart/bootchart.tar.gz ./
Generate bootchart png file
Under ubuntu system
#apt install bootchart
#bootchart bootchart.tar.gz
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
parsing 'bootchart.tar.gz'
parsing 'header'
parsing 'kernel_pacct'
parsing 'proc_diskstats.log'
parsing 'proc_ps.log'
warning: no parent for pid '2' with ppid '0'
warning: no parent for pid '4040' with ppid '0'
parsing 'proc_stat.log'
merged 0 logger processes
pruned 528 process, 0 exploders, 14 threads, and 1 runs
False
bootchart written to 'bootchart.png'