summaryrefslogtreecommitdiffstats
path: root/logd/LogBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r--logd/LogBuffer.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index cbbb2ce..b8a54b9 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -36,11 +36,11 @@ class LogBuffer {
LogStatistics stats;
-#ifdef USERDEBUG_BUILD
+ bool dgram_qlen_statistics;
+
PruneList mPrune;
unsigned long mMaxSize[LOG_ID_MAX];
-#endif
public:
LastLogTimes &mTimes;
@@ -57,18 +57,23 @@ 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
+ void enableDgramQlenStatistics() {
+ stats.enableDgramQlenStatistics();
+ dgram_qlen_statistics = true;
+ }
+
int initPrune(char *cp) { return mPrune.init(cp); }
// *strp uses malloc, use free to release.
void formatPrune(char **strp) { mPrune.format(strp); }
-#endif
+
+ // helper
+ char *pidToName(pid_t pid) { return stats.pidToName(pid); }
+ uid_t pidToUid(pid_t pid) { return stats.pidToUid(pid); }
private:
void maybePrune(log_id_t id);