summaryrefslogtreecommitdiffstats
path: root/logd/LogBuffer.h
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-09-03 16:08:50 -0700
committerMark Salyzyn <salyzyn@google.com>2015-09-04 14:32:46 +0000
commit4ee37bc91e55371399435eaa020813fdb7b898ac (patch)
tree0e6280c730c89f914ca02fd4baea0adb73e6286c /logd/LogBuffer.h
parentd9a06afb19156b61ee85c975a292d884bba09c7f (diff)
downloadsystem_core-4ee37bc91e55371399435eaa020813fdb7b898ac.zip
system_core-4ee37bc91e55371399435eaa020813fdb7b898ac.tar.gz
system_core-4ee37bc91e55371399435eaa020813fdb7b898ac.tar.bz2
logd: worst uid record watermark part four
(cherry pick from commit 831aa297307a038705bc771281ffd53266484b4a) With part deux we caused an apparent regression by not checking for stale recorded iterators. This checking was on-purpose bypassesed when leading prune entries were to be deleted without touching the statistics engine due to an in-place merge. Part deux had us leaving iterators we were not focussed on untouched which in turn because they were left behind, had a much higher likelihood of being deleted without touching the statistics engine. Perform the check every delete. Bug: 23789348 Bug: 23490267 Change-Id: Idc6cc23d1f9e3b6cd9a083139a0de59479fbfe08
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r--logd/LogBuffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index e94598c..4769a6c 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -87,7 +87,8 @@ public:
private:
void maybePrune(log_id_t id);
void prune(log_id_t id, unsigned long pruneRows, uid_t uid = AID_ROOT);
- LogBufferElementCollection::iterator erase(LogBufferElementCollection::iterator it);
+ LogBufferElementCollection::iterator erase(
+ LogBufferElementCollection::iterator it, bool engageStats = true);
};
#endif // _LOGD_LOG_BUFFER_H__