Remove the monotonic option for logging
This has been around for ~5 years but there has been roughly no
adoption, so remove this as we clean up the logging code.
Future efforts may track the monotonic timestamp in all cases.
Test: logging unit tests
Change-Id: I55ed565669f923988e741f6b384141bba893630d
diff --git a/logd/LogReader.cpp b/logd/LogReader.cpp
index 4702de5..a590cef 100644
--- a/logd/LogReader.cpp
+++ b/logd/LogReader.cpp
@@ -150,9 +150,8 @@
// Convert realtime to sequence number
if (start != log_time::EPOCH) {
bool start_time_set = false;
- bool is_monotonic = logbuf().isMonotonic() && android::isMonotonic(start);
uint64_t last = sequence;
- auto log_find_start = [pid, logMask, start, is_monotonic, &sequence, &start_time_set,
+ auto log_find_start = [pid, logMask, start, &sequence, &start_time_set,
&last](const LogBufferElement* element) -> int {
if (pid && pid != element->getPid()) {
return 0;
@@ -164,15 +163,13 @@
sequence = element->getSequence();
start_time_set = true;
return -1;
- } else if (!is_monotonic || android::isMonotonic(element->getRealTime())) {
+ } else {
if (start < element->getRealTime()) {
sequence = last;
start_time_set = true;
return -1;
}
last = element->getSequence();
- } else {
- last = element->getSequence();
}
return 0;
};