From d4e5c32af7a396e66cc1b460c3550308d9115d2a Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Tue, 24 Feb 2015 08:28:07 -0800 Subject: [PATCH] init: grab-bootchart.sh: run bootchart and display results - KISS as all options are now passed to adb for better or worse - runs bootchart and immediately displays the results Bug: 19485335 Bug: 18390773 Change-Id: Id32930031371d0368e605810f0c998232a1d4f16 --- init/grab-bootchart.sh | 9 ++++++--- init/readme.txt | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/init/grab-bootchart.sh b/init/grab-bootchart.sh index 7fe890436..5715862dc 100755 --- a/init/grab-bootchart.sh +++ b/init/grab-bootchart.sh @@ -3,6 +3,8 @@ # this script is used to retrieve the bootchart log generated # by init when compiled with INIT_BOOTCHART=true. # +# All options are passed to adb, for better or for worse. +# # for all details, see //device/system/init/README.BOOTCHART # TMPDIR=/tmp/android-bootchart @@ -15,8 +17,9 @@ TARBALL=bootchart.tgz FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct" for f in $FILES; do - adb pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null + adb "${@}" pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null done (cd $TMPDIR && tar -czf $TARBALL $FILES) -cp -f $TMPDIR/$TARBALL ./$TARBALL -echo "look at $TARBALL" +bootchart ${TMPDIR}/${TARBALL} +gnome-open ${TARBALL%.tgz}.png +echo "Clean up ${TMPDIR}/ & ./${TARBALL%.tgz}.png when done" diff --git a/init/readme.txt b/init/readme.txt index 32eb4abbc..9c2422019 100644 --- a/init/readme.txt +++ b/init/readme.txt @@ -313,9 +313,8 @@ retrieve them and create a bootchart.tgz file that can be used with the bootchart command-line utility: sudo apt-get install pybootchartgui + ANDROID_SERIAL= $ANDROID_BUILD_TOP/system/core/init/grab-bootchart.sh - bootchart ./bootchart.tgz - gnome-open bootchart.png Debugging init