diff options
author | Tom Cherry <tomcherry@google.com> | 2020-05-07 14:44:43 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2020-05-11 07:55:52 -0700 |
commit | 64e9016351bf789bfb70b64753449507f5cfc684 (patch) | |
tree | 238b8bd56c578cf311f8eba3cbf888d3a6a23b22 /trusty/coverage/coverage_test.cpp | |
parent | b6b78e9bb4fb3d9d4b06cefdc8cad01b2f15b741 (diff) |
logd: separate LogStatistics from LogBuffer
LogStatistics is intertwined with LogBuffer, even relying on it for
thread safety. This needs to change to have a proper
LogBufferInterface, so this CL separates them. Specifically:
1) Adding a lock to LogStatistics and adding thread annotations to
ensure that data structures are protected appropriately.
2) Moving prune_rows calculation into LogStatistics so it is done
while holding this lock.
3) Using LogStatistics instead of LogBuffer where appropriate.
Note that there should not be a significant performance regression
with this lock, as it will almost always been uncontended. If
anything, it should alleviate pressure from LogBuffer's lock.
Test: logging unit tests
Change-Id: I9d6dde2c96c9f024fa0341711c7bc63379e8e406
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions