diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-04-20 07:26:27 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-04-30 15:25:12 -0700 |
commit | 95108f18443f22440653bf1648c969816ca852dd (patch) | |
tree | 8a6879a1b8bd502885abaf2797d3f9d7d2872ba5 /logd/LogBufferElement.h | |
parent | 5a9d33ee1cc2acd776193eef479fabfefcdaf865 (diff) | |
download | system_core-95108f18443f22440653bf1648c969816ca852dd.zip system_core-95108f18443f22440653bf1648c969816ca852dd.tar.gz system_core-95108f18443f22440653bf1648c969816ca852dd.tar.bz2 |
logd: improve details on chatty records
(Cherry pick from commit 21fb7e0b753b2251369bfaa1c6f6a09e58e64437)
- Report applications UID, TID/PID by name.
- change wording to have an accurate connotation
- drop privilege check since filtered upstream
Bug: 19608965
Bug: 20334069
Bug: 20370119
Change-Id: I2b1c26580b4c2de293874214ff5ae745546f3cca
Diffstat (limited to 'logd/LogBufferElement.h')
-rw-r--r-- | logd/LogBufferElement.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/logd/LogBufferElement.h b/logd/LogBufferElement.h index 7b6456d..059c031 100644 --- a/logd/LogBufferElement.h +++ b/logd/LogBufferElement.h @@ -28,15 +28,19 @@ namespace android { // Furnished in main.cpp. Caller must own and free returned value -// This function is designed for a single caller and is NOT thread-safe char *uidToName(uid_t uid); +// Furnished in LogStatistics.cpp. Caller must own and free returned value +char *pidToName(pid_t pid); + } static inline bool worstUidEnabledForLogid(log_id_t id) { return (id != LOG_ID_CRASH) && (id != LOG_ID_EVENTS); } +class LogBuffer; + class LogBufferElement { const log_id_t mLogId; const uid_t mUid; @@ -52,7 +56,8 @@ class LogBufferElement { static atomic_int_fast64_t sequence; // assumption: mMsg == NULL - size_t populateDroppedMessage(char *&buffer, bool privileged); + size_t populateDroppedMessage(char *&buffer, + LogBuffer *parent); public: LogBufferElement(log_id_t log_id, log_time realtime, @@ -78,7 +83,7 @@ public: log_time getRealTime(void) const { return mRealTime; } static const uint64_t FLUSH_ERROR; - uint64_t flushTo(SocketClient *writer); + uint64_t flushTo(SocketClient *writer, LogBuffer *parent); }; #endif |