• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# bootanalyze
2
3The bootanalyze tool helps to profile boot timing.
4
5[TOC]
6
7## Preliminaries
8
9* Need to access "su" on the Device Under Test, e.g. a userdebug build.
10* This only works on Linux with Python 2.7, PyYAML and pybootchartgui.
11
12```
13sudo pip install pyyaml
14sudo apt-get install pybootchartgui
15```
16
17## Examples
18
19* bootanalyze.sh provides an example to analyze boot-times and bootcharts.
20```
21ANDROID_BUILD_TOP="$PWD" \
22CONFIG_YMAL="$ANDROID_BUILD_TOP/system/extras/boottime_tools/bootanalyze/config.yaml" \
23    LOOPS=3 \
24    RESULTS_DIR="$ANDROID_BUILD_TOP/bootAnalyzeResults" \
25    $PWD/system/extras/boottime_tools/bootanalyze/bootanalyze.sh
26```
27
28## config.yaml
29Per specific product modify config.yaml file to include
30events you are looking for. Config should look like:
31
32    stop_event: <logcat log message which will terminate log collection after reboot>
33    events:
34      event1_name: <pattern that matches log message>
35      event2_.....
36
37On some devise clock is showing incorrect time for first couple of seconds after boot.
38To ensure correct adjustment of time, one has to include event in config that will
39be present in dmesg log after clock correction.
40