summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-03-03 10:21:23 -0800
committerMark Salyzyn <salyzyn@google.com>2017-03-16 08:13:43 -0700
commit1d84f0b2afd36c4a6a367761c3d518789a424419 (patch)
tree81c42a66e825109a108c3d5da0e7d32c4ced69b2 /trusty/coverage/coverage_test.cpp
parentb3fde950f22d62c5849f85dd9faad68ca47f6962 (diff)
logd: ensure LogBufferElement mSequence is monotonic
- Improves accuracy of -t/-T '<timestamp>' behavior when out of order arrival of entries messes with mSequence as the list will now have monotonic sequence numbers enforced. - Out of order time entries still remain because of reader requiring the ability to receive newly arrived old entries. - -t/-T '<timestamp>' can still quit backward search prematurely because an old entry lands later in the list. - Adjust insert in place algorithm from two loops of scan placement and then limit against watermark, into one that does all of that plus iteratively swap update the sequence numbers to set monotonicity. Side effect will be that the read lock (which is actually the LogTimes lock) will be held longer while we search for a placement above the youngest LogTimes watermark. We need to hold the read (LogTimes) lock because we may be altering the sequence numbers affecting -t/-T '<timestamp>' search. Test: gTest logd-unit-tests liblog-unit-tests logcat-unit-tests Bug: 35373582 Change-Id: I79a385fc149bac2179128b53d4c8f71e429181ae
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions