Merge "Revert "logd: iterator corruption paranoia""
This commit is contained in:
commit
acf0bebcf9
1 changed files with 0 additions and 14 deletions
|
|
@ -1072,22 +1072,9 @@ uint64_t LogBuffer::flushTo(SocketClient* reader, uint64_t start, pid_t* lastTid
|
|||
|
||||
uint64_t curr = start;
|
||||
|
||||
LogBufferElement* lastElement = nullptr; // iterator corruption paranoia
|
||||
static const size_t maxSkip = 4194304; // maximum entries to skip
|
||||
size_t skip = maxSkip;
|
||||
for (; it != mLogElements.end(); ++it) {
|
||||
LogBufferElement* element = *it;
|
||||
|
||||
if (!--skip) {
|
||||
android::prdebug("reader.per: too many elements skipped");
|
||||
break;
|
||||
}
|
||||
if (element == lastElement) {
|
||||
android::prdebug("reader.per: identical elements");
|
||||
break;
|
||||
}
|
||||
lastElement = element;
|
||||
|
||||
if (!privileged && (element->getUid() != uid)) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1128,7 +1115,6 @@ uint64_t LogBuffer::flushTo(SocketClient* reader, uint64_t start, pid_t* lastTid
|
|||
return curr;
|
||||
}
|
||||
|
||||
skip = maxSkip;
|
||||
rdlock();
|
||||
}
|
||||
unlock();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue