diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-04-17 12:46:12 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2017-04-17 15:10:26 -0700 |
commit | 5836379b2114f47c53485b42ab157104c29b2c4e (patch) | |
tree | 7a1728529511862d750700e7cfdd1a16079f70e7 /logd/LogBuffer.h | |
parent | ffa38cfc1ea33de4ddddb291cc70cc507506b758 (diff) | |
download | system_core-5836379b2114f47c53485b42ab157104c29b2c4e.tar.gz system_core-5836379b2114f47c53485b42ab157104c29b2c4e.tar.bz2 system_core-5836379b2114f47c53485b42ab157104c29b2c4e.zip |
logd: regression in handling watermark boundary.
Deal with a regression introduced in commit
5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531 (logd: drop mSequence from
LogBufferElement) where log_time was compared against nsec() time
miscalculating the watermark boundary. When dealing with logcat
-t/-T, or any tail reading, add a margin to prune to back off by a
period of 3 seconds (pruneMargin).
Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I72ea858e4e7b5fa91741ea84c40d2e7c3c4aa031
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r-- | logd/LogBuffer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h index 19d11cb7f..1272c20f6 100644 --- a/logd/LogBuffer.h +++ b/logd/LogBuffer.h @@ -174,6 +174,7 @@ class LogBuffer { private: static constexpr size_t minPrune = 4; static constexpr size_t maxPrune = 256; + static const log_time pruneMargin; void maybePrune(log_id_t id); bool prune(log_id_t id, unsigned long pruneRows, uid_t uid = AID_ROOT); |