summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-06 01:09:32 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-06 01:09:32 +0000
commit24cdacf479c95cb4a8ae8e8686f40cc7be2e4249 (patch)
tree74dde01feb374a09e281a3baac3390018cae5405
parent209b84fd978a0f2eca799629ac895ae8f25c067e (diff)
parent7735a98446856eff889c108cd626bb279d616866 (diff)
downloadextras-24cdacf479c95cb4a8ae8e8686f40cc7be2e4249.tar.gz
Snap for 7889170 from 7735a98446856eff889c108cd626bb279d616866 to sc-d2-release
Change-Id: Ife9403cf0a62788bc640f7f93f96589fc62d282c
-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