Loading services/audioflinger/FastCaptureDumpState.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,13 @@ * limitations under the License. */ #define LOG_TAG "FastCaptureDumpState" //define LOG_NDEBUG 0 #include "Configuration.h" #include <utils/Log.h> #include "FastCaptureDumpState.h" #include "FastCaptureState.h" namespace android { Loading @@ -27,4 +33,21 @@ FastCaptureDumpState::~FastCaptureDumpState() { } void FastCaptureDumpState::dump(int fd) const { if (mCommand == FastCaptureState::INITIAL) { dprintf(fd, " FastCapture not initialized\n"); return; } double measuredWarmupMs = (mMeasuredWarmupTs.tv_sec * 1000.0) + (mMeasuredWarmupTs.tv_nsec / 1000000.0); double periodSec = (double) mFrameCount / mSampleRate; dprintf(fd, " FastCapture command=%s readSequence=%u framesRead=%u\n" " readErrors=%u sampleRate=%u frameCount=%zu\n" " measuredWarmup=%.3g ms, warmupCycles=%u period=%.2f ms\n", FastCaptureState::commandToString(mCommand), mReadSequence, mFramesRead, mReadErrors, mSampleRate, mFrameCount, measuredWarmupMs, mWarmupCycles, periodSec * 1e3); } } // android services/audioflinger/FastCaptureDumpState.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ struct FastCaptureDumpState : FastThreadDumpState { FastCaptureDumpState(); /*virtual*/ ~FastCaptureDumpState(); void dump(int fd) const; // should only be called on a stable copy, not the original // FIXME by renaming, could pull up many of these to FastThreadDumpState uint32_t mReadSequence; // incremented before and after each read() uint32_t mFramesRead; // total number of frames read successfully Loading services/audioflinger/FastMixerDumpState.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ void FastMixerDumpState::dump(int fd) const } double measuredWarmupMs = (mMeasuredWarmupTs.tv_sec * 1000.0) + (mMeasuredWarmupTs.tv_nsec / 1000000.0); double mixPeriodSec = (double) mFrameCount / (double) mSampleRate; double mixPeriodSec = (double) mFrameCount / mSampleRate; dprintf(fd, " FastMixer command=%s writeSequence=%u framesWritten=%u\n" " numTracks=%u writeErrors=%u underruns=%u overruns=%u\n" " sampleRate=%u frameCount=%zu measuredWarmup=%.3g ms, warmupCycles=%u\n" Loading services/audioflinger/Threads.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -6163,6 +6163,10 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a } dprintf(fd, " Fast capture thread: %s\n", hasFastCapture() ? "yes" : "no"); dprintf(fd, " Fast track available: %s\n", mFastTrackAvail ? "yes" : "no"); // Make a non-atomic copy of fast capture dump state so it won't change underneath us const FastCaptureDumpState copy(mFastCaptureDumpState); copy.dump(fd); } void AudioFlinger::RecordThread::dumpTracks(int fd, const Vector<String16>& args __unused) Loading Loading
services/audioflinger/FastCaptureDumpState.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -14,7 +14,13 @@ * limitations under the License. */ #define LOG_TAG "FastCaptureDumpState" //define LOG_NDEBUG 0 #include "Configuration.h" #include <utils/Log.h> #include "FastCaptureDumpState.h" #include "FastCaptureState.h" namespace android { Loading @@ -27,4 +33,21 @@ FastCaptureDumpState::~FastCaptureDumpState() { } void FastCaptureDumpState::dump(int fd) const { if (mCommand == FastCaptureState::INITIAL) { dprintf(fd, " FastCapture not initialized\n"); return; } double measuredWarmupMs = (mMeasuredWarmupTs.tv_sec * 1000.0) + (mMeasuredWarmupTs.tv_nsec / 1000000.0); double periodSec = (double) mFrameCount / mSampleRate; dprintf(fd, " FastCapture command=%s readSequence=%u framesRead=%u\n" " readErrors=%u sampleRate=%u frameCount=%zu\n" " measuredWarmup=%.3g ms, warmupCycles=%u period=%.2f ms\n", FastCaptureState::commandToString(mCommand), mReadSequence, mFramesRead, mReadErrors, mSampleRate, mFrameCount, measuredWarmupMs, mWarmupCycles, periodSec * 1e3); } } // android
services/audioflinger/FastCaptureDumpState.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ struct FastCaptureDumpState : FastThreadDumpState { FastCaptureDumpState(); /*virtual*/ ~FastCaptureDumpState(); void dump(int fd) const; // should only be called on a stable copy, not the original // FIXME by renaming, could pull up many of these to FastThreadDumpState uint32_t mReadSequence; // incremented before and after each read() uint32_t mFramesRead; // total number of frames read successfully Loading
services/audioflinger/FastMixerDumpState.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ void FastMixerDumpState::dump(int fd) const } double measuredWarmupMs = (mMeasuredWarmupTs.tv_sec * 1000.0) + (mMeasuredWarmupTs.tv_nsec / 1000000.0); double mixPeriodSec = (double) mFrameCount / (double) mSampleRate; double mixPeriodSec = (double) mFrameCount / mSampleRate; dprintf(fd, " FastMixer command=%s writeSequence=%u framesWritten=%u\n" " numTracks=%u writeErrors=%u underruns=%u overruns=%u\n" " sampleRate=%u frameCount=%zu measuredWarmup=%.3g ms, warmupCycles=%u\n" Loading
services/audioflinger/Threads.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -6163,6 +6163,10 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a } dprintf(fd, " Fast capture thread: %s\n", hasFastCapture() ? "yes" : "no"); dprintf(fd, " Fast track available: %s\n", mFastTrackAvail ? "yes" : "no"); // Make a non-atomic copy of fast capture dump state so it won't change underneath us const FastCaptureDumpState copy(mFastCaptureDumpState); copy.dump(fd); } void AudioFlinger::RecordThread::dumpTracks(int fd, const Vector<String16>& args __unused) Loading