diff options
author | Steve Kondik <steve@cyngn.com> | 2015-12-07 16:29:46 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-12-07 16:29:46 -0800 |
commit | b1e86e2d1fc315a3b108c28a5ff6bc649ea584d5 (patch) | |
tree | f19b4590cd850cba130840fdff8988ed97a40497 /logd | |
parent | 33ecd3756347ef2663e500949ab4b33392086fbc (diff) | |
parent | a6116961338548409b14076eefbef211afc8c3fe (diff) | |
download | system_core-b1e86e2d1fc315a3b108c28a5ff6bc649ea584d5.zip system_core-b1e86e2d1fc315a3b108c28a5ff6bc649ea584d5.tar.gz system_core-b1e86e2d1fc315a3b108c28a5ff6bc649ea584d5.tar.bz2 |
Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/system/core into HEAD
Android 6.0.1 release 3
Change-Id: I8b65c0223e3444360432abd871a9d8f007831ba0
Diffstat (limited to 'logd')
-rw-r--r-- | logd/LogBuffer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp index 559fa2e..d72a78c 100644 --- a/logd/LogBuffer.cpp +++ b/logd/LogBuffer.cpp @@ -435,7 +435,10 @@ void LogBuffer::prune(log_id_t id, unsigned long pruneRows, uid_t caller_uid) { worst_sizes = sorted[0]->getSizes(); // Calculate threshold as 12.5% of available storage size_t threshold = log_buffer_size(id) / 8; - if (worst_sizes > threshold) { + if ((worst_sizes > threshold) + // Allow time horizon to extend roughly tenfold, assume + // average entry length is 100 characters. + && (worst_sizes > (10 * sorted[0]->getDropped()))) { worst = sorted[0]->getKey(); second_worst_sizes = sorted[1]->getSizes(); if (second_worst_sizes < threshold) { |