History log of /system/core/logd/LogBufferElement.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7b87365ecf8c08307173537645b85708f59aab78 04-Dec-2015 Mark Salyzyn <salyzyn@google.com> logd: readlog apps get logger_entry_v4

Adds the uid field to outgoing content for readlog applications.
AID_LOG, AID_ROOT and AID_SYSTEM gain access to the information.

Bug: 25996918
Change-Id: I0254303c19d174cbf5e722c38844be5c54410c85
/system/core/logd/LogBufferElement.h
b6bee33182cedea49199eb2252b3f3b442899c6d 08-Sep-2015 Mark Salyzyn <salyzyn@google.com> liblog: logd: support logd.timestamp = monotonic

if ro.logd.timestamp or persist.logd.timestamp are set to the value
monotonic then liblog writer, liblog printing and logd all switch to
recording/printing monotonic time rather than realtime. If reinit
detects a change for presist.logd.timestamp, correct the older entry
timestamps in place.

ToDo: A corner case condition where new log entries in monotonic time
occur before logd reinit detects persist.logd.timestamp, there
will be a few out-of-order entries, but with accurate
timestamps. This problem does not happen for ro.logd.timestamp
as it is set before logd starts.

NB: This offers a nano second time accuracy on all log entries
that may be more suitable for merging with other system
activities, such as systrace, that also use monotonic time. This
feature is for debugging.

Bug: 23668800
Change-Id: Iee6dab7140061b1a6627254921411f61b01aa5c2
/system/core/logd/LogBufferElement.h
ddda212faa81d62f637926680cd8163345120f71 02-Oct-2015 Mark Salyzyn <salyzyn@google.com> logd: optimize code hotspots

Discovered that we had a few libc hotspots. Adjust code to generally
reduce or nullify the number of calls to malloc, free, strlen,
strcmp, strncmp, memcmp & strncasecmp. Total gain looks to be about
3% of logd's processing time. malloc still contributes to 3%, but all
others are now total 0.5%.

Bug: 23685592
Change-Id: Ife721121667969260cdb8b055524ae90f5911278
/system/core/logd/LogBufferElement.h
5ac5c6b19364b5b3061a59db796b2357c95c3b64 28-Aug-2015 Mark Salyzyn <salyzyn@google.com> logd: Add LogUtils.h

Move prototypes from LogBufferElement.h to LogUtils.h

Change-Id: I55e42e17e6c997e35b2b78b87fd2f84f8f393282
/system/core/logd/LogBufferElement.h
047cc0729fd837a03b99db901941c1421ef15f96 04-Jun-2015 Mark Salyzyn <salyzyn@google.com> logd: filters remove leading expire messages and rate

- Cleanup resulting from experience and feedback
- When filtering inside logd, drop any leading expire messages, they
are cluttering up leading edge of tombstones (which filter by pid)
- Increase and introduce EXPIRE_RATELIMIT from 1 to 10 seconds
- Increase EXPIRE_THRESHOLD from 4 to 10 count
- Improve the expire messages from:
logd : uid=1000(system) too chatty comm=com.google.android.phone,
expire 2800 lines
change tag to be more descriptive, and reduce accusatory tone to:
chatty : uid=1000(system) com.google.android.phone expire 2800
lines
- if the UID name forms a prefix for comm name, then drop UID name

Change-Id: Ied7cc04c0ab3ae02167649a0b97378e44ef7b588
/system/core/logd/LogBufferElement.h
833a9b1e38ce65f2cdf3ebd095aaa99a92eb9467 16-May-2015 Mark Salyzyn <salyzyn@google.com> logd: worst-UID only to preserve a day

Do not invoke worst-UID pruning in the face of other
UIDs logs that are more than a day old, switch to
pruning oldest only.

Change-Id: Icf988b8d5458400a660d0f8e9d2df3f9d9a4c2d9
/system/core/logd/LogBufferElement.h
d1371a8b8b55352e19332ba87f4b3ece6db58e1f 13-May-2015 Mark Salyzyn <salyzyn@google.com> Merge "logd: Add TID statistics"
ae4d928d816e30dbe57c2c321b0f0759d0567b3f 15-Oct-2014 Mark Salyzyn <salyzyn@google.com> logd: Add klogd

- Add a klogd to collect the kernel logs and place them into a
new kernel log buffer
- Parse priority, tag and message from the kernel log messages.
- Turn off pruning for worst UID for the kernel log buffer
- Sniff for 'PM: suspend exit', 'PM: suspend enter' and
'Suspended for' messages and correct the internal definition
time correction against monotonic dynamically.
- Discern if we have monotonic or real time (delineation 1980) in
audit messages.
- perform appropriate math to correct the timestamp to be real time
- filter out any external sources of kernel logging

Change-Id: I8d4c7c5ac19f1f3218079ee3a05a50e2ca55f60d
/system/core/logd/LogBufferElement.h
17ed6797df722464eb5cc6dfc3e1e32aec284b70 20-Apr-2015 Mark Salyzyn <salyzyn@google.com> logd: Add TID statistics

Bug: 19608965
Change-Id: Ifbf0b00c48ef12b5970b9f9f217bd1dd8f587f2c
/system/core/logd/LogBufferElement.h
344bff4391dd434dda501e812f18f524290c5a7c 13-Apr-2015 Mark Salyzyn <salyzyn@google.com> logd: Add Tag statistics

- Optional class of statistics for events Tags
- export tagToName from LogBuffer (located in main.cp to address
https://android-review.googlesource.com/#/c/110204)
- Can not handle dropped because getTag() can not work,
will need to be fixed if we start filtering.

Bug: 19608965
Change-Id: I7b90607ca588bf37bab71f19b1570a290e772776
/system/core/logd/LogBufferElement.h
aaf9c1b3b489de6b07b5a1a0ad9b6cbbb9b56782 05-May-2015 Mark Salyzyn <salyzyn@google.com> Merge "logd: class hierarcy for Uid and Pid statistics."
21fb7e0b753b2251369bfaa1c6f6a09e58e64437 20-Apr-2015 Mark Salyzyn <salyzyn@google.com> logd: improve details on chatty records

- 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
/system/core/logd/LogBufferElement.h
81b3eabc49736b89c4f99940f79785074955eaa5 13-Apr-2015 Mark Salyzyn <salyzyn@google.com> logd: class hierarcy for Uid and Pid statistics.

Add EntryBase and EntryBaseDropped base classes for statistical
entries to inherit from. Abstract add(), subtract() and drop()
methods to common LogBufferElement in each for entry policy decisions.
Some move of details out of LogStatistics.cpp and place them into
LogStatistics.h. Add statistical add(), subtract() and
drop() methods to hash table to call entries for policy.

Bug: 19608965
Change-Id: Ib8a33a8fe28871ef165d1632c6546a5c606231e8
/system/core/logd/LogBufferElement.h
ae769238391f7f9fa5c03a436d5f1fd73130e6bd 18-Mar-2015 Mark Salyzyn <salyzyn@google.com> logd: disable worst uid prune for events buffer

There is some usage statistics that would be hurt by pruning by UID,
since _all_ usage statistics come from system_server. In other words
we expect it to be chatty. Until we formulate and evaluate a better
(eg: per-tag?) filtration mechanism, lets hold off pruning by UID.

Bug: 19608965
Change-Id: Iddd45a671e13bdcf3394c20919ad1f2e4ef36616
/system/core/logd/LogBufferElement.h
ab0dcf682867bd7e1fdebfd8d8f9fafaccfad7f6 16-Mar-2015 Mark Salyzyn <salyzyn@google.com> logd: annotate worst-UID pruned entries

- internal dropped entries are associated by prune by worst UID
and are applied by UID and by PID
- track dropped entries by rewriting them in place
- merge similar dropped entries together for same UID(implied),
PID and TID so that blame can more clearly be placed
- allow aging of dropped entries by the general backgound pruning
- report individual dropped entries formatted to reader
- add statistics to track dropped entries by UID, the combination
of statistics and dropped logging can track over-the-top Chattiest
clients.

Bug: 19608965
Change-Id: Ibc68480df0c69c55703270cd70c6b26aea165853
/system/core/logd/LogBufferElement.h
08739ba71fc1f2659149be760405d622e5b68f06 16-Mar-2015 Mark Salyzyn <salyzyn@google.com> logd: uidToName improvement

- read packages.list to acquire package names
- hijack the reinit handler as a privileged worker

Bug: 19608965
Change-Id: If7becb34354d6415e5c387ecea7d4109a15259c9
/system/core/logd/LogBufferElement.h
97c1c2beee2cbd8c67c1cd507367e5b084d853c8 10-Mar-2015 Mark Salyzyn <salyzyn@google.com> logd: optimize statistics

- Go back to basic requirements
- Simplify
- use hash tables to minimize memory impact

Bug: 19608965
Change-Id: If7becb34354d6415e5c387ecea7d4109a15259c8
/system/core/logd/LogBufferElement.h
f7c0f75275d0fde2d8b7614f1501f0ad0cd3a01c 03-Mar-2015 Mark Salyzyn <salyzyn@google.com> logd: replace internal CLOCK_MONOTONIC use with sequence numbers

- switch to simpler and faster internal sequence number, drops
a syscall overhead on 32-bit platforms.
- add ability to break-out of flushTo loop with filter return -1
allowing in reduction in reader overhead.

Change-Id: Ic5cb2b9afa4d9470153971fc9197b07279e2b79d
/system/core/logd/LogBufferElement.h
b992d0d7d34bed62fd16151a68d60d58cc8003ef 21-Mar-2014 Mark Salyzyn <salyzyn@google.com> logd: liblog: Thread IDs missing from logcat -v thread

- stuff caller's thread id into the packet.

Bug: 13568206
Change-Id: I02d0cdf9b1d9e839ff8969f591db42dfe6e4cc95
/system/core/logd/LogBufferElement.h
7e2f83c0bcc3ad8a2840a48be14d302ed79d671c 05-Mar-2014 Mark Salyzyn <salyzyn@google.com> logd: liblog: 64-bit issues

- structure packing
- move towards log_time from struct timespec
- extend log_time to cover differences between
log_time and struct timespec

Change-Id: I106ed0b609917306d170044054b5b32645f2a295
/system/core/logd/LogBufferElement.h
0175b0747a1f55329109e84c9a1322dcb95e2848 26-Feb-2014 Mark Salyzyn <salyzyn@google.com> logd: initial checkin.

* Create a new userspace log daemon for handling logging messages.

Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
Signed-off-by: Nick Kralevich <nnk@google.com>

* Merge conflicts
* rename new syslog daemon to logd to prevent confusion with bionic syslog
* replace racy getGroups call with KISS call to client->getGid()
* Timestamps are filed at logging source
* insert entries into list in timestamp order
* Added LogTimeEntry tail filtration handling
* Added region locking around LogWriter list
* separate threads for each writer
* /dev/socket/logd* permissions

Signed-off-by: Mark Salyzyn <salyzyn@google.com>

(cherry picked from commit 3e76e0a49760c4970b7cda6153e51026af98e4f3)

Author: Nick Kralevich <nnk@google.com>
Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
/system/core/logd/LogBufferElement.h