163d2602dbc79133096b3dec7920ee157ff1a88b |
|
10-Apr-2018 |
Yao Chen <yaochen@google.com> |
Handle logd reconnect. When statsd reconnects to logd, statsd will read all logs from buffer again. To prevent us from reprocessing old events, we do the following: 1. At any given moment, record the largest timestamp(T_max) and last timestamp (check point) that we've seen before. 2. When reconnection happens, we look for the check point until we see a new log with a timestamp larger than T_max. -> If we found the CP, resume after the CP. Success -> If we can't find CP, there is definitely log loss. We reset all configs. Note: 1. Logd has an API to read logs after a certain timestamp. But this api is vulnerable to time changes from Settings. So we cannot rely on it. 2. If logd inserts a new log (with older timestamp) before CP, we cannot detect it. It's not possible to detect it without record all timestamps we have seen. Test: statsd_test Bug: 77813113 Change-Id: Ic3fdb47230807606ab11dc994cb162194adb8448
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|
884c8c130fde0d02ada1316f7c27f0f55e7e48b9 |
|
26-Jan-2018 |
Yao Chen <yaochen@google.com> |
Add more statsd's debugging info to dumpsys. + Bugreport will use the non-verbose mode + Reuse the log_msg object in LogReader + Add logd errors to StatsdStats Bug: 72383073 Test: manual + statsd_test Change-Id: Id5a8b103074d034f5ece3c9831c740d44a5df9cd
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|
2ee4371cb73cd23a8615593956de2e4f0cea4a98 |
|
22-Jan-2018 |
Yao Chen <yaochen@google.com> |
Handle return value 0 from android_logger_list_read This fixes the bug that sometimes statsd is running at 99% cpu. Connection to logd can be reset for various reasons, and android_logger_list_read will return 0 when that happens. We didn't handle 0 before, and that leads to reading empty logs and processing them in a infinite loop. Bug: 71833883 Test: manual test by killing logd, forcing return 0. Change-Id: I5a9c89fc58959d6593028a14f70a8fe8d10b40f1
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|
d40053eb8bcb19c7c3b080a36714566bb4e4a748 |
|
10-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Map isolated uid to host uid when processing log event in statsD. Test: added test case for isolated uid in Attribution e2e test. Change-Id: I63d16ebee3e611b1ef0c910e5154cf27766cb330
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|
c4dfae56c10a1dd571baa78c750f2e68c919d74f |
|
18-Oct-2017 |
Joe Onorato <joeo@google.com> |
Introduce a new wrapper for log_msg -- LogEvent It stores all of the parsed fields in a single vector, and provides accessor methods to get at fields by index with their correct type. Test: statsd_test Change-Id: I4fa94e4ce52db3ac87f19b62f9c85398de6e8145
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|
9fc9edf95a308f5884bf541cac81ce1f41aba0ba |
|
16-Oct-2017 |
Joe Onorato <joeo@google.com> |
Clean up how we handle configurations, and other assorted cleanup - Add a ConfigManager class that tracks the configurations that have been passed to us. Configurations are now tracked by tuples of (uid,tag), where the tag is an app-defined string, in case a single uid has multiple configurations. - Move all of the initialization into StatsService. - Get rid of the ability to have multiple LogListeners. Raw events are now pushed directly into StatsService, which can distribute them to the interested parties (and will eventually be able to do the proper locking). - Add Log.h, which sets our LOG_TAG correctly. - Move some of the related files that I expect will grow some into their own subdirectories. Test: statsd_test Test: adb shell cmd stats config ... Test: adb shell dumpsys stats Change-Id: I79487603003d8a842d5bd319741f1ecbf72063d1
/frameworks/base/cmds/statsd/src/logd/LogReader.cpp
|