Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f89c663 authored by Karuna Wadhera's avatar Karuna Wadhera
Browse files

Bootchart updates

Test: Change was tested when bootcharting aosp/3433145
Change-Id: I8ed2f03b692788565e11ee8169a379f7b387b1b5
parent 79bbceb9
Loading
Loading
Loading
Loading
+3 −16
Original line number Diff line number Diff line
@@ -939,26 +939,13 @@ Init records some boot timing information in system properties.

Bootcharting
------------
This version of init contains code to perform "bootcharting": generating log
files that can be later processed by the tools provided by <http://www.bootchart.org/>.
Bootchart provides CPU and I/O load breakdown of all processes for the whole system.
Refer to the instructions at
 <https://source.android.com/docs/core/perf/boot-times#bootchart>.

On the emulator, use the -bootchart _timeout_ option to boot with bootcharting
activated for _timeout_ seconds.

On a device:

    adb shell 'touch /data/bootchart/enabled'

Don't forget to delete this file when you're done collecting data!

The log files are written to /data/bootchart/. A script is provided to
retrieve them and create a bootchart.tgz file that can be used with the
bootchart command-line utility:

    sudo apt-get install pybootchartgui
    # grab-bootchart.sh uses $ANDROID_SERIAL.
    $ANDROID_BUILD_TOP/system/core/init/grab-bootchart.sh

One thing to watch for is that the bootchart will show init as if it started
running at 0s. You'll have to look at dmesg to work out when the kernel
actually started init.
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ jiffy_to_wallclock = {
def analyze_process_maps(process_map1, process_map2, jiffy_record):
    # List interesting processes here
    processes_of_interest = [
        '/init',
        '/system/bin/init',
        '/system/bin/surfaceflinger',
        '/system/bin/bootanimation',
        'zygote64',