summaryrefslogtreecommitdiffstats
path: root/logd/LogBufferElement.h
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-03-10 08:44:14 -0800
committerMark Salyzyn <salyzyn@google.com>2017-03-16 08:22:00 -0700
commit5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531 (patch)
tree528482f492c2a13a1079e737a510ca6e5fbb70c9 /logd/LogBufferElement.h
parent1d84f0b2afd36c4a6a367761c3d518789a424419 (diff)
downloadsystem_core-5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531.tar.gz
system_core-5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531.tar.bz2
system_core-5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531.zip
logd: drop mSequence from LogBufferElement
Use getRealTime() instead and leverage private liblog log_time comparison and math functions. This saves 8 bytes off each element in the logging database. Test: gTest liblog-unit-tests logd-unit-tests logcat-unit-tests Bug: 35373582 Change-Id: Ia55ef8b95cbb2a841ccb1dae9a24f314735b076a
Diffstat (limited to 'logd/LogBufferElement.h')
-rw-r--r--logd/LogBufferElement.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/logd/LogBufferElement.h b/logd/LogBufferElement.h
index 90756dd4b..814ec8785 100644
--- a/logd/LogBufferElement.h
+++ b/logd/LogBufferElement.h
@@ -40,7 +40,6 @@ class LogBufferElement {
const uint32_t mUid;
const uint32_t mPid;
const uint32_t mTid;
- uint64_t mSequence;
log_time mRealTime;
char* mMsg;
union {
@@ -96,18 +95,12 @@ class LogBufferElement {
const char* getMsg() const {
return mMsg;
}
- uint64_t getSequence(void) const {
- return mSequence;
- }
- static uint64_t getCurrentSequence(void) {
- return sequence.load(memory_order_relaxed);
- }
log_time getRealTime(void) const {
return mRealTime;
}
- static const uint64_t FLUSH_ERROR;
- uint64_t flushTo(SocketClient* writer, LogBuffer* parent, bool privileged,
+ static const log_time FLUSH_ERROR;
+ log_time flushTo(SocketClient* writer, LogBuffer* parent, bool privileged,
bool lastSame);
};