Firefox OS/Performance/Boot Sequence Optimization: Difference between revisions

Line 34: Line 34:
</pre>
</pre>


Once init on the device has been replaced with the bootchart-enabled version [[FirefoxOS/Performance/Modifying boot.img|(see process here)]], to enable logging one simply creates a file <code>|/data/bootchart-start|</code> on the device containing an integer representing the number of seconds for which bootchart should collect data, and then reboot the device.
Once init on the device has been replaced with the bootchart-enabled version [[FirefoxOS/Performance/Modifying boot.img|(see process here)]], to begin logging one simply creates a file <code>|/data/bootchart-start|</code> on the device containing an integer representing the number of seconds for which bootchart should collect data, and then reboots the device.
 


Bootchart data is pulled from the device with the <code>system/core/grab-bootchart.sh</code> script, and presented in the form of a bootchart.tgz file. With the data collected one can then generate graphs by invoking:
Bootchart data is pulled from the device with the <code>system/core/grab-bootchart.sh</code> script, and presented in the form of a bootchart.tgz file. With the data collected one can then generate graphs by invoking:
Line 44: Line 43:
Without the <code>|-f eps|</code> parameters, the default is for a PNG to be generated. The SVG format is also supported.
Without the <code>|-f eps|</code> parameters, the default is for a PNG to be generated. The SVG format is also supported.


Note that the charts generated by the stock bootchart.jar do not seem to include disk stats. This is because it does not recognize the <code>mmcblk'''N'''p'''M'''</code> format of partition names, and this can easily be fixed in the bootchart source code ( in particular, at <code>|bootchart-0.9/src/org/bootchart/parser/linux/ProcDiskStatParser.java|</code> ).
Note that the charts generated by the stock bootchart.jar do not seem to include disk stats. This is because it does not recognize the <code>mmcblk'''N'''p'''M'''</code> format of disk partition names, and this can easily be fixed in the bootchart source code (in particular, in <code>|bootchart-0.9/src/org/bootchart/parser/linux/ProcDiskStatParser.java|</code>).
 
Another bootchart related change I made was in regards to how it records collected data. By default the process name is discarded and replaced by the cmdline invokation. This is not very useful considering b2g apps are then all shown as "Plugin-container". I things such that both names are recorded.


Another bootchart related change made was in regards to how it records collected data. By default the process name is discarded and replaced by the 'cmdline' invocation (found in proc/PID/cmdline). This is not very useful considering b2g apps are then all shown as "Plugin-container". Init was [http://people.mozilla.org/~jbailey/bchart.patch modified] such that both names are recorded.


=== Data ===  
=== Data ===  
Confirmed users
125

edits