From fa3add33644eb0e0335fefafef41de5e2d3c0b3c Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Thu, 29 Dec 2016 07:26:30 -0800 Subject: [PATCH] logd: report log reader instantiation Helpful instrumentation to determine who is waiting for logger data. Test: manual Bug: 37274132 Bug: 37378309 Change-Id: I14fb1d9d15ae413930121048b770852359f06682 --- logd/LogReader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/logd/LogReader.cpp b/logd/LogReader.cpp index af19279a4..feb105f76 100644 --- a/logd/LogReader.cpp +++ b/logd/LogReader.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -192,6 +193,12 @@ bool LogReader::onDataAvailable(SocketClient* cli) { } } + android::prdebug( + "logdr: UID=%d GID=%d PID=%d %c tail=%lu logMask=%x pid=%d " + "start=%" PRIu64 "ns timeout=%" PRIu64 "ns\n", + cli->getUid(), cli->getGid(), cli->getPid(), nonBlock ? 'n' : 'b', tail, + logMask, (int)pid, sequence.nsec(), timeout); + FlushCommand command(*this, nonBlock, tail, logMask, pid, sequence, timeout); // Set acceptable upper limit to wait for slow reader processing b/27242723