diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-05-15 15:58:17 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-05-20 10:03:11 -0700 |
commit | 94a811ab19006ec6c4d8057f3bf81d79308d28f6 (patch) | |
tree | 1dbd299be1d23da8a231bcbeb72d0a7058cd14d5 /logd/LogBufferElement.h | |
parent | 7eb3abdb3ba500d3acca82b95705f34128251015 (diff) | |
download | system_core-94a811ab19006ec6c4d8057f3bf81d79308d28f6.zip system_core-94a811ab19006ec6c4d8057f3bf81d79308d28f6.tar.gz system_core-94a811ab19006ec6c4d8057f3bf81d79308d28f6.tar.bz2 |
logd: worst-UID only to preserve a day
(cherry pick from commit 833a9b1e38ce65f2cdf3ebd095aaa99a92eb9467)
Do not invoke worst-UID pruning in the face of other
UIDs logs that are more than a day old, switch to
pruning oldest only.
Change-Id: Icf988b8d5458400a660d0f8e9d2df3f9d9a4c2d9
Diffstat (limited to 'logd/LogBufferElement.h')
-rw-r--r-- | logd/LogBufferElement.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/logd/LogBufferElement.h b/logd/LogBufferElement.h index 5dabaac..3dcf9d1 100644 --- a/logd/LogBufferElement.h +++ b/logd/LogBufferElement.h @@ -48,6 +48,11 @@ static inline bool worstUidEnabledForLogid(log_id_t id) { class LogBuffer; +#define EXPIRE_HOUR_THRESHOLD 24 // Only expire chatty UID logs to preserve + // non-chatty UIDs less than this age in hours +#define EXPIRE_THRESHOLD 4 // A smaller expire count is considered too + // chatty for the temporal expire messages + class LogBufferElement { const log_id_t mLogId; const uid_t mUid; |