summaryrefslogtreecommitdiffstats
path: root/logd/LogBuffer.h
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-02-06 14:48:50 -0800
committerMark Salyzyn <salyzyn@google.com>2014-03-12 17:11:01 -0700
commit51a29c8dc445e4fb89860561933e54a231e6ffb4 (patch)
treece031679767c38edc9bbf684cd55e44c9e4bc34d /logd/LogBuffer.h
parentffcbc3f1d49191fe924a2b0237c5d92d0d80af0d (diff)
downloadsystem_core-51a29c8dc445e4fb89860561933e54a231e6ffb4.zip
system_core-51a29c8dc445e4fb89860561933e54a231e6ffb4.tar.gz
system_core-51a29c8dc445e4fb89860561933e54a231e6ffb4.tar.bz2
logd: liblog: logcat: Add Statistics
- logd add statistical collection and formatting - liblog add android_logger_get_statistics call - logcat add -S flag - logcat add -b all Change-Id: I521753b1969ecd4590c956aeeb1557d101059d67
Diffstat (limited to 'logd/LogBuffer.h')
-rw-r--r--logd/LogBuffer.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index 1b50a8f..92dd107 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -25,6 +25,7 @@
#include "LogBufferElement.h"
#include "LogTimes.h"
+#include "LogStatistics.h"
typedef android::List<LogBufferElement *> LogBufferElementCollection;
@@ -32,8 +33,7 @@ class LogBuffer {
LogBufferElementCollection mLogElements;
pthread_mutex_t mLogElementsLock;
- unsigned long mSizes[LOG_ID_MAX];
- unsigned long mElements[LOG_ID_MAX];
+ LogStatistics stats;
public:
LastLogTimes &mTimes;
@@ -50,6 +50,8 @@ public:
void clear(log_id_t id);
unsigned long getSize(log_id_t id);
unsigned long getSizeUsed(log_id_t id);
+ // *strp uses malloc, use free to release.
+ size_t formatStatistics(char **strp, uid_t uid, unsigned int logMask);
private:
void maybePrune(log_id_t id);
@@ -57,4 +59,4 @@ private:
};
-#endif
+#endif // _LOGD_LOG_BUFFER_H__