From 5a34d6ea43d28f3b5d27bf6dd5b9fa31ec033531 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Fri, 10 Mar 2017 08:44:14 -0800 Subject: 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 --- logd/LogBufferElement.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'logd/LogBufferElement.h') 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); }; -- cgit v1.2.3