summaryrefslogtreecommitdiff
path: root/boottime_tools
diff options
context:
space:
mode:
authorKeun young Park <keunyoung@google.com>2021-11-04 11:21:53 -0700
committerKeun young Park <keunyoung@google.com>2021-11-04 11:21:53 -0700
commit7735a98446856eff889c108cd626bb279d616866 (patch)
tree74dde01feb374a09e281a3baac3390018cae5405 /boottime_tools
parentda9bdee8b9334928f5d5f5a886940a2eae2fe254 (diff)
downloadextras-7735a98446856eff889c108cd626bb279d616866.tar.gz
bootznalyze bug fix and minor improvements
- should decode with utf8 for all string from shell command - remove dependency on kernel start time in logcat as boot complete is enough with auto time update disabled. - expand launcher match string Bug: 198205714 Bug: 204450693 Test: ./system/extras/boottime_tools/bootanalyze/bootanalyze.py -c ./system/extras/boottime_tools/bootanalyze/config.yaml -r -n 2 -t -v Change-Id: I25ccc81baa06cadc9390d1f948ecb0fe74302599
Diffstat (limited to 'boottime_tools')
-rwxr-xr-xboottime_tools/bootanalyze/bootanalyze.py11
-rw-r--r--boottime_tools/bootanalyze/config.yaml2
2 files changed, 7 insertions, 6 deletions
diff --git a/boottime_tools/bootanalyze/bootanalyze.py b/boottime_tools/bootanalyze/bootanalyze.py
index c33d97cc..5bed9f29 100755
--- a/boottime_tools/bootanalyze/bootanalyze.py
+++ b/boottime_tools/bootanalyze/bootanalyze.py
@@ -367,11 +367,12 @@ def iterate(args, search_events_pattern, timings_pattern, shutdown_events_patter
v = v + time_correction_delta
debug("correcting event to event[{0}, {1}]".format(k, v))
- if logcat_event_time.get(KERNEL_TIME_KEY) is None:
- print("kernel time not captured in logcat, cannot get time diff")
- return None, None, None, None, None, None
diffs = []
- diffs.append((logcat_event_time[KERNEL_TIME_KEY], logcat_event_time[KERNEL_TIME_KEY]))
+ if logcat_event_time.get(KERNEL_TIME_KEY) is None:
+ print("kernel time not captured in logcat")
+ else:
+ diffs.append((logcat_event_time[KERNEL_TIME_KEY], logcat_event_time[KERNEL_TIME_KEY]))
+
if logcat_event_time.get(BOOT_ANIM_END_TIME_KEY) and dmesg_event_time.get(BOOT_ANIM_END_TIME_KEY):
diffs.append((logcat_event_time[BOOT_ANIM_END_TIME_KEY],\
logcat_event_time[BOOT_ANIM_END_TIME_KEY] -\
@@ -785,7 +786,7 @@ def do_reboot(serial, use_adb_reboot):
# do not update time
run_adb_cmd('shell settings put global auto_time 0')
run_adb_cmd('shell settings put global auto_time_zone 0')
- original_devices = subprocess.check_output("adb devices", shell=True)
+ original_devices = subprocess.check_output("adb devices", shell=True).decode('utf-8', 'ignore')
if use_adb_reboot:
print('Rebooting the device using adb reboot')
run_adb_cmd('reboot')
diff --git a/boottime_tools/bootanalyze/config.yaml b/boottime_tools/bootanalyze/config.yaml
index d6590fdb..83c1bcd8 100644
--- a/boottime_tools/bootanalyze/config.yaml
+++ b/boottime_tools/bootanalyze/config.yaml
@@ -61,7 +61,7 @@ events:
KeyguardShown: KeyguardServiceDelegate.*\*\*\*\* SHOWN CALLED \*\*\*\*
BootComplete: Starting phase 1000
BootComplete_kernel: processing action \(sys\.boot_completed=1\)
- LauncherStart: START.*HOME.*(NexusLauncherActivity|GEL|LensPickerTrampolineActivity|SetupWizard|CarLauncher)
+ LauncherStart: START.*HOME.*(NexusLauncherActivity|GEL|LensPickerTrampolineActivity|SetupWizard|CarLauncher|launcher.*Launcher)
FsStat: fs_stat, partition:userdata stat:(0x\S+)
shutdown_events:
ShutdownStart: ShutdownThread:\sNotifying thread to start shutdown