cfm-device-monitor: added a few comments.
Added comments to the log lines that are printed when
a monitor reports that a device is malfunctioning is some way.
BUG=b:109866345
TEST=None.
Change-Id: I86d60cbdc4399bba9b842c7d2f9e2ebda2839517
Reviewed-on: https://chromium-review.googlesource.com/1236295
Commit-Ready: Dariusz Marcinkiewicz <darekm@google.com>
Tested-by: Dariusz Marcinkiewicz <darekm@google.com>
Reviewed-by: Zhongze Hu <frankhu@google.com>
diff --git a/apex-monitor/apex_monitor.cc b/apex-monitor/apex_monitor.cc
index c034486..b00db3c 100644
--- a/apex-monitor/apex_monitor.cc
+++ b/apex-monitor/apex_monitor.cc
@@ -60,6 +60,7 @@
// If power not good, power cycle the chip.
if (!power_good_) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Detect Apex " << chip_id_
<< " power failure. Power-cycling chip.";
PostTask(&ApexMonitor::PowerCycleChip);
@@ -68,6 +69,7 @@
// If boot fail, reset the chip.
if (boot_fail_) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Detect Apex " << chip_id_
<< " boot failure. Resetting chip.";
PostTask(&ApexMonitor::ResetChip);
@@ -91,6 +93,7 @@
if (chip_temp_ > kThermalWarningHighCelcius) {
if (!over_temp_) {
over_temp_ = true;
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Apex temperature is too high (> 135C).";
}
}
@@ -119,12 +122,14 @@
PostTask(&ApexMonitor::CheckChipStatus, kResetSleepTimeMs);
return;
}
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Reset failed or didn't recover chip, will power-cycle.";
PostTask(&ApexMonitor::PowerCycleChip);
}
void ApexMonitor::PowerCycleChip() {
if (power_cycle_cnt_ > kApexMaxRebootLimit) {
+ // Please see b/109866345 before modyfing the below line.
LOG(ERROR) << "Exceed max retry limit. Apex chip " << chip_id_
<< " is probably down. Stop monitor thread";
return;
diff --git a/camera-monitor/huddly_monitor.cc b/camera-monitor/huddly_monitor.cc
index 15bb961..8035cb8 100644
--- a/camera-monitor/huddly_monitor.cc
+++ b/camera-monitor/huddly_monitor.cc
@@ -113,6 +113,7 @@
}
if (result) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Detected crashed camera. Rebooted.";
const uint32_t kRebootSleepTimeSeconds = 30;
base::PlatformThread::Sleep(
diff --git a/mimo-monitor/mimo_monitor.cc b/mimo-monitor/mimo_monitor.cc
index 5f3753a..5c33ff2 100644
--- a/mimo-monitor/mimo_monitor.cc
+++ b/mimo-monitor/mimo_monitor.cc
@@ -163,6 +163,7 @@
// Both touch and display fail.
if (!dl_monitor.DisplayStatus() && !sis_monitor.TouchStatus()) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Both touch and display are down. Resetting Mimo.";
ResetDevice(libusb_get_parent(display_device_));
mimo_found_ = false;
@@ -175,6 +176,7 @@
// Touch fails.
if (!sis_monitor.TouchStatus()) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Trying to reset touch panel.";
mimo_found_ = false;
sis_monitor.ResetSiS(touch_device_, kTouchInterface);
@@ -187,6 +189,7 @@
// Display fails.
if (!dl_monitor.DisplayStatus()) {
+ // Please see b/109866345 before modyfing the below line.
LOG(WARNING) << "Trying to reset display.";
mimo_found_ = false;
ResetDevice(display_device_);