Merge "Make logd more aggressive when scanning for the position from which to resume logging." into pi-dev

This commit is contained in:
TreeHugger Robot 2018-04-05 18:12:37 +00:00 committed by Android (Google) Code Review
commit 4ae7d5c34e

View file

@ -1115,9 +1115,6 @@ log_time LogBuffer::flushTo(SocketClient* reader, const log_time& start,
// client wants to start from the beginning
it = mLogElements.begin();
} else {
// 3 second limit to continue search for out-of-order entries.
log_time min = start - pruneMargin;
// Cap to 300 iterations we look back for out-of-order entries.
size_t count = 300;
@ -1133,7 +1130,7 @@ log_time LogBuffer::flushTo(SocketClient* reader, const log_time& start,
} else if (element->getRealTime() == start) {
last = ++it;
break;
} else if (!--count || (element->getRealTime() < min)) {
} else if (!--count) {
break;
}
}