logd: use coalesce instead of merge (cleanup)
- switch to coalesce instead of merge in naming of functions
and variables. Confusing since we also to merge-sorts and
other activities in the logger.
- define maxPrune rather than using a number in the code path.
Bug: 24511000
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index d8e0b90..28f4526 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -85,10 +85,13 @@
void unlock() { pthread_mutex_unlock(&mLogElementsLock); }
private:
+
+ static constexpr size_t maxPrune = 256;
+
void maybePrune(log_id_t id);
bool prune(log_id_t id, unsigned long pruneRows, uid_t uid = AID_ROOT);
LogBufferElementCollection::iterator erase(
- LogBufferElementCollection::iterator it, bool engageStats = true);
+ LogBufferElementCollection::iterator it, bool coalesce = false);
};
#endif // _LOGD_LOG_BUFFER_H__