Removing noisy logging
The wtflog can be triggered even when everything is working as expected, so it is not useful in its current state. Some issues that were caught should have been fixed by making the timerfd_read non-blocking. Test: N/A Bug: 78560047 Change-Id: Ide4c4baef2104ee3c12f26e2c3208b7ffc6abdf7
This commit is contained in:
@@ -3020,46 +3020,10 @@ class AlarmManagerService extends SystemService {
|
||||
DateFormat.format(pattern, info.getTriggerTime()).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* If the last time AlarmThread woke up precedes any due wakeup or non-wakeup alarm that we set
|
||||
* by more than half a minute, log a wtf.
|
||||
*/
|
||||
private void validateLastAlarmExpiredLocked(long nowElapsed) {
|
||||
final StringBuilder errorMsg = new StringBuilder();
|
||||
boolean stuck = false;
|
||||
if (mNextNonWakeup < (nowElapsed - 10_000) && mLastWakeup < mNextNonWakeup) {
|
||||
stuck = true;
|
||||
errorMsg.append("[mNextNonWakeup=");
|
||||
TimeUtils.formatDuration(mNextNonWakeup - nowElapsed, errorMsg);
|
||||
errorMsg.append(" set at ");
|
||||
TimeUtils.formatDuration(mNextNonWakeUpSetAt - nowElapsed, errorMsg);
|
||||
errorMsg.append(", mLastWakeup=");
|
||||
TimeUtils.formatDuration(mLastWakeup - nowElapsed, errorMsg);
|
||||
errorMsg.append(", timerfd_gettime=" + mInjector.getNextAlarm(ELAPSED_REALTIME));
|
||||
errorMsg.append("];");
|
||||
}
|
||||
if (mNextWakeup < (nowElapsed - 10_000) && mLastWakeup < mNextWakeup) {
|
||||
stuck = true;
|
||||
errorMsg.append("[mNextWakeup=");
|
||||
TimeUtils.formatDuration(mNextWakeup - nowElapsed, errorMsg);
|
||||
errorMsg.append(" set at ");
|
||||
TimeUtils.formatDuration(mNextWakeUpSetAt - nowElapsed, errorMsg);
|
||||
errorMsg.append(", mLastWakeup=");
|
||||
TimeUtils.formatDuration(mLastWakeup - nowElapsed, errorMsg);
|
||||
errorMsg.append(", timerfd_gettime="
|
||||
+ mInjector.getNextAlarm(ELAPSED_REALTIME_WAKEUP));
|
||||
errorMsg.append("];");
|
||||
}
|
||||
if (stuck) {
|
||||
Slog.wtf(TAG, "Alarm delivery stuck: " + errorMsg.toString());
|
||||
}
|
||||
}
|
||||
|
||||
void rescheduleKernelAlarmsLocked() {
|
||||
// Schedule the next upcoming wakeup alarm. If there is a deliverable batch
|
||||
// prior to that which contains no wakeups, we schedule that as well.
|
||||
final long nowElapsed = mInjector.getElapsedRealtime();
|
||||
validateLastAlarmExpiredLocked(nowElapsed);
|
||||
long nextNonWakeup = 0;
|
||||
if (mAlarmBatches.size() > 0) {
|
||||
final Batch firstWakeup = findFirstWakeupBatchLocked();
|
||||
|
||||
Reference in New Issue
Block a user