Giter VIP home page Giter VIP logo

init's Introduction

This version of init contains code to perform "bootcharting", i.e. generating log
files that can be later processed by the tools provided by www.bootchart.org.

To activate it, you need to define build 'init' with the INIT_BOOTCHART environment
variable defined to 'true', for example:

    touch system/init/init.c
    m INIT_BOOTCHART=true

On the emulator, use the new -bootchart <timeout> option to boot with bootcharting
activated for <timeout> seconds.

Otherwise, flash your device, and start it. Then create a file on the /data partition
with a command like the following:

  adb shell 'echo $TIMEOUT > /data/bootchart-start'

Where the value of $TIMEOUT corresponds to the wanted bootcharted period in seconds;
for example, to bootchart for 2 minutes, do:

  adb shell 'echo 120 > /data/bootchart-start'

Reboot your device, bootcharting will begin and stop after the period you gave.
You can also stop the bootcharting at any moment by doing the following:

  adb shell 'echo 1 > /data/bootchart-stop'

Note that /data/bootchart-stop is deleted automatically by init at the end of the
bootcharting. This is not the case of /data/bootchart-start, so don't forget to delete it
when you're done collecting data:

  adb shell rm /data/bootchart-start

The log files are placed in /data/bootchart/. you must run the script tools/grab-bootchart.sh
which will use ADB to retrieve them and create a bootchart.tgz file that can be used with
the bootchart parser/renderer, or even uploaded directly to the form located at:

  http://www.bootchart.org/download.html

NOTE: the bootchart.org webform doesn't seem to work at the moment, you can generate an
      image on your machine by doing the following:

         1/ download the sources from www.bootchart.org
         2/ unpack them
         3/ in the source directory, type 'ant' to build the bootchart program
         4/ type 'java -jar bootchart.jar /path/to/bootchart.tgz

technical note:

this implementation of bootcharting does use the 'bootchartd' script provided by
www.bootchart.org, but a C re-implementation that is directly compiled into our init
program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.