diff options
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r-- | logd/LogBuffer.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h index 1b50a8f..0745e56 100644 --- a/logd/LogBuffer.h +++ b/logd/LogBuffer.h @@ -25,6 +25,8 @@ #include "LogBufferElement.h" #include "LogTimes.h" +#include "LogStatistics.h" +#include "LogWhiteBlackList.h" typedef android::List<LogBufferElement *> LogBufferElementCollection; @@ -32,8 +34,13 @@ class LogBuffer { LogBufferElementCollection mLogElements; pthread_mutex_t mLogElementsLock; - unsigned long mSizes[LOG_ID_MAX]; - unsigned long mElements[LOG_ID_MAX]; + LogStatistics stats; + +#ifdef USERDEBUG_BUILD + PruneList mPrune; + + unsigned long mMaxSize[LOG_ID_MAX]; +#endif public: LastLogTimes &mTimes; @@ -49,7 +56,18 @@ public: void clear(log_id_t id); unsigned long getSize(log_id_t id); +#ifdef USERDEBUG_BUILD + int setSize(log_id_t id, unsigned long size); +#endif unsigned long getSizeUsed(log_id_t id); + // *strp uses malloc, use free to release. + void formatStatistics(char **strp, uid_t uid, unsigned int logMask); + +#ifdef USERDEBUG_BUILD + int initPrune(char *cp) { return mPrune.init(cp); } + // *strp uses malloc, use free to release. + void formatPrune(char **strp) { mPrune.format(strp); } +#endif private: void maybePrune(log_id_t id); @@ -57,4 +75,4 @@ private: }; -#endif +#endif // _LOGD_LOG_BUFFER_H__ |