History log of /packages/services/Car/tools/bootanalyze/bootanalyze.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8f193c19ec079ae4868be9ed03a55b684bd55b82 05-Aug-2017 Keun-young Park <keunyoung@google.com> bootanalyze: add shutdown events

- will capture logcat if Timeout event happens during shutdown.
- -m option can be used to capture shutdown event taking over certain time like
-m ShutdownBtDuration=2.0,ShutdownStorageManagerSerivceDuration=3.0,ShutdownInitFsShutdown=5.0
- Duration for interval with items with Xyz and XyzDone
- Shutdown time is counted from the point where shutdown starts.

bug: 64568026
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 2 -m ShutdownBtDuration=5.0,ShutdownStorageManagerSerivceDuration=5.0
Change-Id: I32919c665c74e9a57308264ecc7cbde93106134c
/packages/services/Car/tools/bootanalyze/bootanalyze.py
c9d80ac4dcd5d23559ab373693e1e4bfffc245a9 05-Jun-2017 Keun-young Park <keunyoung@google.com> bootanalyze: fix errata am: 40c290051f
am: 7c582428d6

Change-Id: Ic076085687dd6869808b09cf0fdd82fe19957a77
40c290051f1627c9a8ec51c3462732ce67a29c6e 05-Jun-2017 Keun-young Park <keunyoung@google.com> bootanalyze: fix errata

- args used for testing purpose not removed and broke bootchart capturing

bug: 38271495
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 20 -f -e 15 -w 30 -v -b
Change-Id: Ie836822bfdec569700d0ae7df7aa8d2a29abcaa9
/packages/services/Car/tools/bootanalyze/bootanalyze.py
f10b854e85238d7d6b088a730176a917e771223f 02-Jun-2017 Keun-young Park <keunyoung@google.com> Merge "add bootchart and systrace support to bootanalyze" into oc-dev am: eb7f3e3364
am: ed67aff7c8

Change-Id: I77c86c375dc8fee0763d186566c4667b588c9798
cf4d0283be897e271dc9ad566b04d7a2ed8be44d 31-May-2017 Keun-young Park <keunyoung@google.com> add bootchart and systrace support to bootanalyze

- necessary to analyze boot performance issue
- -b for enabling bootchart
- -y for enabling systrace

bug: 38271495
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 20 -f -e 15 -w 30 -v -y, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 20 -f -e 15 -w 30 -v -b

Change-Id: Ic5324568dc6e14a92ff88c9bce2cae4631340ce6
/packages/services/Car/tools/bootanalyze/bootanalyze.py
b352c00d4cbc28e71b41076d5610d96eb23ae40a 31-May-2017 Bryan Eyler <bryaneyler@google.com> Fix bootanalyze reading of dmesg

Only read when there's output to be read.

Bug 36644379

Change-Id: Ia37c2a96b1a888cc5401e32c3838c680e4134c54
/packages/services/Car/tools/bootanalyze/bootanalyze.py
e9f0063cc2d972ae06dc9d68adaee34797309e24 23-May-2017 Keun-young Park <keunyoung@google.com> handle duplicate events properly

- The same pattern can be matched multiple times and this led into
wrong results.
- Rename to _(\d) when the same name already exists.

bug: 37962756
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 16 -w 30 -v
Change-Id: Ie60fad6e74c08f0062760ec5ff7f799ed5019460
(cherry picked from commit eb14fdee32dede74b6a818ac6a5b003f690e944f)
/packages/services/Car/tools/bootanalyze/bootanalyze.py
eb14fdee32dede74b6a818ac6a5b003f690e944f 23-May-2017 Keun-young Park <keunyoung@google.com> handle duplicate events properly

- The same pattern can be matched multiple times and this led into
wrong results.
- Rename to _(\d) when the same name already exists.

bug: 37962756
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 16 -w 30 -v
Change-Id: Ie60fad6e74c08f0062760ec5ff7f799ed5019460
/packages/services/Car/tools/bootanalyze/bootanalyze.py
32866e9d6c0e0806b457db584bcbe1dffa1401ce 15-May-2017 Keun-young Park <keunyoung@google.com> add bootloader time to bootanalyze

bug: 38271495
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 16 -w 30 -v

Change-Id: I3253bdbe533e28499b725c4eb2283b141e545790
/packages/services/Car/tools/bootanalyze/bootanalyze.py
a44dc6c080a8ccfc2a59ce37441383b73ed28d03 25-Apr-2017 Keun-young Park <keunyoung@google.com> bootanalyze: add timing event for kernel with bugreport capturing for time events

- add timing event capture for kernel: from int and ueventd log. only
collect up to zygote start as it is less meaningful after that,
- add -m option which allows capturing bugreport when some time event
exceeds specified time. For example, to capture bugreport
for zygoteInit taking more than 6 secs, -m zygoteInit=6000
- This helps tracking specific component starting late.
- Added number of runs in summary section to distinguish items with
less number of occurrence. Item with full number of occurrence will
not display the number.
- Fixed wrong unit for ro.boot.init.*. It is stored in ms unit.

bug: 37752410
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 3 -f -e 16 -w 30 -v -m zygoteInit=5700

Change-Id: Ie5566c81d694e119ad5c8a243fa71d9016703a49
/packages/services/Car/tools/bootanalyze/bootanalyze.py
1fab398d67592e6ade33687591809eee718e46a0 15-Apr-2017 Keun-young Park <keunyoung@google.com> bootanalyze: handle all valid fs_stat properly

- Any bits in 0x17 are valid. Capture bugreport for bits outside them.

bug: 32246772
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 16 -w 30 -m WaitForDisplay=1000
Change-Id: I379b7c0d202bdfb094bc16353901e4884c1bb264
/packages/services/Car/tools/bootanalyze/bootanalyze.py
8c4436484e2f4c68474722351bf7ac06e17faf92 06-Apr-2017 Keun-young Park <keunyoung@google.com> switch back to svc power reboot by default

- adb reboot cuts some shutdown sequence from system server and
gives issue like modem not shutdown properly.
- need to specify -a to use adb reboot.
- also fix broken svc power reboot path as adb is kept longer
than before and waiting for device after reboot command returns
immediately while shutdown is not done yet.
- add -v option to toggle selinux to be permissive before reboot.
This helps init to use lsof to list all files.

bug: 36984129
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 20 -w 40 -v

Change-Id: I9a3871941b71700f80a5b22d965687ac17f66ccb
(cherry picked from commit 24d4399574f847467d1939a1bbf233945d23a0ee)
/packages/services/Car/tools/bootanalyze/bootanalyze.py
b7ee7cc06fbc0a0117cd3ca3f7d4ffb6c16f2c56 29-Mar-2017 Bryan Eyler <bryaneyler@google.com> Add writing utility invocation to bootanalyze.

Adds a flag for invoking StressFS utility before shutdown.
Updates WritingService to handle no data in intent.

Bug 36444880

Change-Id: Ied6f4f538648b19d8ffda79f0eb57e65e7347bf7
(cherry picked from commit ed0e5e38a2a3a1f5e73ea01f4b227512f6c41e41)
/packages/services/Car/tools/bootanalyze/bootanalyze.py
cea1c7343a745138378353baa5c4227ec5280dbe 22-Mar-2017 Keun-young Park <keunyoung@google.com> bootanalyze: do timeout when there is no logcat input

- timeout (-w option) did not work when a new log is not
available and the script can be stuck forever.
- use poll to timeout on read

bug: 36526636
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 15 -w 50
Change-Id: I95208651582a43be5f4692a8499ad78b9c204256
/packages/services/Car/tools/bootanalyze/bootanalyze.py
6dfb4760ac6301f2c687627e6c555e3efee7e10f 13-Mar-2017 Keun-young Park <keunyoung@google.com> collect fs_stat from bootanalyze and change reboot

- -f Will wait until fs_stat is collected.
- -f also captures bugreport if fs_stat is not 0x5 (clean shutdown) or
0x15 (quota enabled + clean shutdown)
- -f also uses adb reboot for reboot. This can be a kind of stress test
to file system shutdown flow.
- added wait time out with -w. By default, it is 200 secs. This is for
the case where necessary logs are lost and bootanalyze stuck waiting
for log.
- change -e option to add the result to average instead of throwing it
away.

bug: 35329915
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -f -e 15 -w 50

Change-Id: If92a3f3a9f190bff12031bc110f12aeed33d620c
/packages/services/Car/tools/bootanalyze/bootanalyze.py
7b71b4d583946133d3690edb3200741d24cf1e28 13-Feb-2017 Keun-young Park <keunyoung@google.com> bootanalyze: add launcher launch time

- wait until launcher is started
- monitor kernel log first as too much wait in logcat can drop some kernel logs

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: Ic558636d6aaed4425ba81a583a0eaa55c990f813
/packages/services/Car/tools/bootanalyze/bootanalyze.py
5617561f73205323d9c369aada7b69e01f1c2ecd 07-Feb-2017 Keun-young Park <keunyoung@google.com> bootanalyze: handle timing from async threads

- Capture tag SystemServerTimingAsync as well.
- Wrap timing events from TimingAsync with "(" + ")" as in
(WebViewFactoryPreparation)

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10

Change-Id: Ic4da13b6eaeab6ed07e56d138d44947a3d3f3ed8
/packages/services/Car/tools/bootanalyze/bootanalyze.py
da874db6cc08aeb90d7ba29a16cc9058cf3ddea6 31-Jan-2017 Keun-young Park <keunyoung@google.com> bootanalyze: add component monitoring

- allow capturing bugreport if individual timing component
takes more than specified time.
ex) -m StartAudioService=300,StartWindowManagerService=500
will capture bugreport if StartAudioService takes more than 300ms
or if StartWindowManagerService takes more than 500ms.

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 3 -e 16 -m StartAudioService=300,StartWindowManagerService=500
Change-Id: I3d7976b6d4b4c9a664f21d96db16a236eef07eae
/packages/services/Car/tools/bootanalyze/bootanalyze.py
9aae8c917fd95607a92a951f96034e75b6cdb53a 31-Jan-2017 Keun-young Park <keunyoung@google.com> bootanalyze: sort timing points with averaged value

- it was sorted with 1st value and was confusing.

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10

Change-Id: Id06e4e6887184183762b712b08057fa38385f9af
/packages/services/Car/tools/bootanalyze/bootanalyze.py
179f666dcedf3d34bd906b6c2390efeb7b8e2207 28-Jan-2017 Keun-young Park <keunyoung@google.com> fix wrong time offset adjustment

- Always picking the closest bigger time for getting delta can go wrong
if time changes in the middle.
- If the close bigger time is giving negative time, use the one right
before it instead.

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: Ice44e4839aa9e8d5222e8aa73eb2f7b4329d4757
/packages/services/Car/tools/bootanalyze/bootanalyze.py
ab8c1fb3422fd8a469e5ff15b7234193049a6124 26-Jan-2017 Wei Wang <wvw@google.com> bootanalyze: fix reboot command

Bug: 33210752
Test: manual
Change-Id: Ib80a10a86893c4b37273ad86b46d5222f2d05b18
/packages/services/Car/tools/bootanalyze/bootanalyze.py
e03be6aecf04fce8af839c0662943fa6b2ec3788 24-Jan-2017 Wei Wang <wvw@google.com> bootanalyze: fix reboot into recovery

Framework merged a feature to detect reboot loop which will force device into recovery
This CL changed the reboot command to let framework know shutdown

Bug: 33210752
Test: manual

Change-Id: I1fc7aea95ca8eb2b3722ebf7dc4f65e22f501f2a
/packages/services/Car/tools/bootanalyze/bootanalyze.py
6bd6796aee8ac3110367bd09a5e5e4d3dfd7d881 12-Jan-2017 Wei Wang <wvw@google.com> bootanalyze: fix ignore option

Bug: 33210752
Test: manual
Change-Id: I2ece81aacb44c6e5c40e3e80e80863f8c8aaf04c
/packages/services/Car/tools/bootanalyze/bootanalyze.py
ea4583f9d998fdc297589b58e9fc0e81d56c909b 03-Jan-2017 Keun-young Park <keunyoung@google.com> bootanalyze: change bugreport file name format

- bugreport-bootuptoolong-[date]-[time].zip

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -e 15.5
Change-Id: I4c28e90ddcbdb6e5fa024e9879eb4ff6ec620aea
/packages/services/Car/tools/bootanalyze/bootanalyze.py
9e1dd6a92d3eac8ed222c336ebdbd15ee15c2f54 22-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: show ro.boottime first

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: I15139d07116a854697954fd1bf6a29ebd2b7a4fe
/packages/services/Car/tools/bootanalyze/bootanalyze.py
e3accfdbf6aefdd23c7208a24fd16905d5c797b7 20-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: add ro.boottime.* to collection

- ro.boottime.init.*: time taken for the step
- other ro.boottime.*: time for the step

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: I452daa1edd06d21e1754266f7dc9c86dad3f423d
/packages/services/Car/tools/bootanalyze/bootanalyze.py
9b2ac7173641b92d755b364ec0d4893e513dbfad 16-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: improve timing information

- add print in time order with warning for delta from prev step if > 5ms
- for sorted order, only print big items

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: I14e0bc0e2ca2c45400e0c48ef2d4428663e297a5
/packages/services/Car/tools/bootanalyze/bootanalyze.py
883d06aac495ce3f6720ab1e6c79c056602ce2c6 15-Dec-2016 Wei Wang <wvw@google.com> Fix bootanalyze script stability

Fix occationaly reboot stuck of bootanaylze by wait for deive
Fix index overflow in diffs

Test: Run script bootanalyze.py
Bug: 33210752
Change-Id: Iac020d3b659f9f18a9f50961bdb35ed4491320c6
/packages/services/Car/tools/bootanalyze/bootanalyze.py
ae5174816988bd607cf20c12db7d3e91c9d35772 15-Dec-2016 Keun-young Park <keunyoung@google.com> fix multiple secondary in bootanalyze

- append to the list passed from arg intead of setting a new list

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: Ie226532a83c821456a51b2a352a3c8eab6ccd708
/packages/services/Car/tools/bootanalyze/bootanalyze.py
b430509ad6a35357acf8fea87bebb8bc8b41d8ec 14-Dec-2016 Keun-young Park <keunyoung@google.com> bootanlyze: fix occasional wrong calculation of bootup time

- kernel bootcomplete and logcat bootcomplete sometimes had big gap
and assumption of both being close were not correct.
- always collect kernel boot complete from logcat and use it.
- also use bootanim end as interim diff indicator if it is available.

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: I4ce55ee3a0d818ee951710bad77a5368640aa47b
/packages/services/Car/tools/bootanalyze/bootanalyze.py
15f805ef438a3eb6679179b87c26c09e72ed55f7 08-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: distinguish zygote secondary

- zygote has both 32bit and 64 versions running and only last
event was captured.
- for zygote, check pid and add "-secondary" for secondary zygote.

bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: Ib9b0ee9a294a8b321f58deaa8e42cfd8a6e2cd0d
/packages/services/Car/tools/bootanalyze/bootanalyze.py
c27316d59099920a96c21fd9ac281d4b3ac4f96a 07-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: add errortime

- ex) -e 15.0, if bootup is taking longer than this time,
reject it as error and capture bugreport.
- bugreport has format of bugreport-bootuptoolong-%s_%s.zip % (bootup time, datetime)

Bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -e 15.0
Change-Id: I4b64dd8c15299a5225174f6f7d0eef81f0a126da
/packages/services/Car/tools/bootanalyze/bootanalyze.py
1524bc0a7117b41e8812dfbf6d7739f6207371f5 06-Dec-2016 Keun-young Park <keunyoung@google.com> handle BootAnim ending too early or no BootAnim case

- If BootAnim ends too early and if there is no time correction
log, use kernel bootcomplete to correct time (small error
happens as kernel bootcomplete is not the same as system boot complete but
it is small.)
- If BootAnimEnd happens after time adjust, use it for second delta.
- remove stop_event from config. Use BootComplete and BootComplete_kernel
for stop event always.

Bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10
Change-Id: I43679063d96493bdd7375036bb5b530e081de7da
/packages/services/Car/tools/bootanalyze/bootanalyze.py
2740409b7f3da9bc949928808571eb5b60d2e991 03-Dec-2016 Wei Wang <wvw@google.com> bootanalyze: add optinal serial argument to support testing more than one devices

Bug: 33210752
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 10 -p 5VT7N15817000492

Change-Id: Ib755de08e322ef08e352e695596ea79dd140bd3c
/packages/services/Car/tools/bootanalyze/bootanalyze.py
e17b25bb57316414721099aa3f70e3a492904cb4 01-Dec-2016 Keun-young Park <keunyoung@google.com> bootanalyze: fix misbehavior for time

- In some devices, time is changed in the middle and time correct is not
available.
- BIG_TIME check does not work when time is not around EPOCH.
- Use two diffs: kernel time and boot animation time. Try both and use adjusted time with
less change.
- If both times are not avaiable, give up.
- sort for average as order can be swapped from 1st one

bug: 33210752
Test: manual script run, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 2
Change-Id: Ib09546f49311b94fae580e19c2968e984da7df5b
/packages/services/Car/tools/bootanalyze/bootanalyze.py
efb8605a55946ed5bcd0577f3f44f286c94a0fe2 29-Nov-2016 Keun-young Park <keunyoung@google.com> bootanalyze: su root instead of adb root

bug: 33210752
Test: manual script run, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 2
Change-Id: If2bb28fa397f20f4c0544eaf565821bad7b4d761
/packages/services/Car/tools/bootanalyze/bootanalyze.py
126d88d8278483e135f308bab23b624a786f0fa7 29-Nov-2016 Keun-young Park <keunyoung@google.com> run dmesg with adb root

- some device requires root to access kernel dmesg

bug: 33210752
Test: manual script run, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 2
Change-Id: I7c428471e1b0e571665ce225b92310bbce6ee797
/packages/services/Car/tools/bootanalyze/bootanalyze.py
49dcaf23106b283d8a4e1a543aefa2e5f57100f1 31-Oct-2016 Vitalii Tomkiv <vitalit@google.com> add SystemServerTiming measurement to bootalanyze script

bug:32375402
Test: manual run and check results of the script
Change-Id: I023d8f265b637f4233c140cbc8ee000bba6d0227
/packages/services/Car/tools/bootanalyze/bootanalyze.py
abc9233c5099cdbf5827fdb07d8024ee67877049 20-Sep-2016 Vitalii Tomkiv <vitalit@google.com> Add multiple runs to bootanalyze tool.

This change adds new flag to bootanalyze tool to run mutliple
measurements and providing AVG value.

Test: manually tested
Change-Id: I2e3232707f1d129eaa0c81cba84fab8fd974ddf8
/packages/services/Car/tools/bootanalyze/bootanalyze.py
d704edd2a457adb594f160437f64b2d913a9eeb4 14-Jul-2016 Vitalii Tomkiv <vitalit@google.com> Refactor bootanalyze to capture logcat logs through PIPE.

This chnage ensures ALL logcat events are analyzed and included in
report.
This change also introdices config file, that detaches implementation
from configuration of the tool. Config can be safley changes/created on
per-product bases.

Change-Id: Ia85123db6582f1f9c92bbe79144a54422405b12c
/packages/services/Car/tools/bootanalyze/bootanalyze.py
ed4c98cb350e3fb7d274012694dc4c20a849b0f3 29-Apr-2016 Vitalii Tomkiv <vitalit@google.com> Add boot log analyzing tool, to get key metrics.

Bug: 27849529
Change-Id: I4ef5331e99e9a1ee38b3673626b362cb20706f92
/packages/services/Car/tools/bootanalyze/bootanalyze.py