The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | This version of init contains code to perform "bootcharting", i.e. generating log |
| 2 | files that can be later processed by the tools provided by www.bootchart.org. |
| 3 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 4 | On the emulator, use the new -bootchart <timeout> option to boot with bootcharting |
| 5 | activated for <timeout> seconds. |
| 6 | |
| 7 | Otherwise, flash your device, and start it. Then create a file on the /data partition |
| 8 | with a command like the following: |
| 9 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 10 | adb shell 'echo $TIMEOUT > /data/bootchart/start' |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 11 | |
| 12 | Where the value of $TIMEOUT corresponds to the wanted bootcharted period in seconds; |
| 13 | for example, to bootchart for 2 minutes, do: |
| 14 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 15 | adb shell 'echo 120 > /data/bootchart/start' |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 16 | |
| 17 | Reboot your device, bootcharting will begin and stop after the period you gave. |
| 18 | You can also stop the bootcharting at any moment by doing the following: |
| 19 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 20 | adb shell 'echo 1 > /data/bootchart/stop' |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 21 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 22 | Note that /data/bootchart/stop is deleted automatically by init at the end of the |
| 23 | bootcharting. This is not the case of /data/bootchart/start, so don't forget to delete it |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 24 | when you're done collecting data: |
| 25 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 26 | adb shell rm /data/bootchart/start |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 27 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 28 | The log files are placed in /data/bootchart/. You must run the script tools/grab-bootchart.sh |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 29 | which will use ADB to retrieve them and create a bootchart.tgz file that can be used with |
| 30 | the bootchart parser/renderer, or even uploaded directly to the form located at: |
| 31 | |
| 32 | http://www.bootchart.org/download.html |
| 33 | |
| 34 | NOTE: the bootchart.org webform doesn't seem to work at the moment, you can generate an |
| 35 | image on your machine by doing the following: |
| 36 | |
| 37 | 1/ download the sources from www.bootchart.org |
| 38 | 2/ unpack them |
| 39 | 3/ in the source directory, type 'ant' to build the bootchart program |
| 40 | 4/ type 'java -jar bootchart.jar /path/to/bootchart.tgz |
| 41 | |
| 42 | technical note: |
| 43 | |
Yongqin Liu | a197ff1 | 2014-12-05 13:45:02 +0800 | [diff] [blame^] | 44 | This implementation of bootcharting does not use the 'bootchartd' script provided by |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 45 | www.bootchart.org, but a C re-implementation that is directly compiled into our init |
| 46 | program. |