summaryrefslogtreecommitdiff
path: root/logd/SerializedLogChunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'logd/SerializedLogChunk.h')
-rw-r--r--logd/SerializedLogChunk.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/logd/SerializedLogChunk.h b/logd/SerializedLogChunk.h
index 50bae638c6..0991eacb6b 100644
--- a/logd/SerializedLogChunk.h
+++ b/logd/SerializedLogChunk.h
@@ -30,9 +30,7 @@ class SerializedLogChunk {
void Compress();
void IncReaderRefCount();
- // Decrease the reader ref count and compress the log if appropriate. `compress` should only be
- // set to false in the case that the log buffer will be deleted afterwards.
- void DecReaderRefCount(bool compress);
+ void DecReaderRefCount();
// Must have no readers referencing this. Return true if there are no logs left in this chunk.
bool ClearUidLogs(uid_t uid, log_id_t log_id, LogStatistics* stats);
@@ -50,8 +48,9 @@ class SerializedLogChunk {
void FinishWriting() {
writer_active_ = false;
+ Compress();
if (reader_ref_count_ == 0) {
- Compress();
+ contents_.Resize(0);
}
}