Loading services/audioflinger/FastCapture.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { /*static*/ const FastCaptureState FastCapture::sInitial; FastCapture::FastCapture() : FastThread(), FastCapture::FastCapture() : FastThread("cycleC_ms", "loadC_us"), mInputSource(NULL), mInputSourceGen(0), mPipeSink(NULL), mPipeSinkGen(0), mReadBuffer(NULL), mReadBufferState(-1), mFormat(Format_Invalid), mSampleRate(0), // mDummyDumpState Loading services/audioflinger/FastMixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ namespace android { /*static*/ const FastMixerState FastMixer::sInitial; FastMixer::FastMixer() : FastThread(), FastMixer::FastMixer() : FastThread("cycle_ms", "load_us"), // mFastTrackNames // mGenerations mOutputSink(NULL), Loading services/audioflinger/FastThread.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace android { FastThread::FastThread() : Thread(false /*canCallJava*/), FastThread::FastThread(const char *cycleMs, const char *loadUs) : Thread(false /*canCallJava*/), // re-initialized to &sInitial by subclass constructor mPrevious(NULL), mCurrent(NULL), /* mOldTs({0, 0}), */ Loading Loading @@ -72,11 +72,15 @@ FastThread::FastThread() : Thread(false /*canCallJava*/), frameCount(0), #endif mAttemptedWrite(false) // mCycleMs(cycleMs) // mLoadUs(loadUs) { mOldTs.tv_sec = 0; mOldTs.tv_nsec = 0; mMeasuredWarmupTs.tv_sec = 0; mMeasuredWarmupTs.tv_nsec = 0; strlcpy(mCycleMs, cycleMs, sizeof(mCycleMs)); strlcpy(mLoadUs, loadUs, sizeof(mLoadUs)); } FastThread::~FastThread() Loading Loading @@ -336,8 +340,8 @@ bool FastThread::threadLoop() // this store #4 is not atomic with respect to stores #1, #2, #3 above, but // the newest open & oldest closed halves are atomic with respect to each other mDumpState->mBounds = mBounds; ATRACE_INT("cycle_ms", monotonicNs / 1000000); ATRACE_INT("load_us", loadNs / 1000); ATRACE_INT(mCycleMs, monotonicNs / 1000000); ATRACE_INT(mLoadUs, loadNs / 1000); } #endif } else { Loading services/audioflinger/FastThread.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace android { class FastThread : public Thread { public: FastThread(); FastThread(const char *cycleMs, const char *loadUs); virtual ~FastThread(); private: Loading Loading @@ -88,6 +88,9 @@ protected: FastThreadState::Command mCommand; bool mAttemptedWrite; char mCycleMs[16]; // cycle_ms + suffix char mLoadUs[16]; // load_us + suffix }; // class FastThread } // android Loading services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -6036,7 +6036,7 @@ reacquire_wakelock: // sleep with mutex unlocked if (sleepUs > 0) { ATRACE_BEGIN("sleep"); ATRACE_BEGIN("sleepC"); mWaitWorkCV.waitRelative(mLock, microseconds((nsecs_t)sleepUs)); ATRACE_END(); sleepUs = 0; Loading Loading
services/audioflinger/FastCapture.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { /*static*/ const FastCaptureState FastCapture::sInitial; FastCapture::FastCapture() : FastThread(), FastCapture::FastCapture() : FastThread("cycleC_ms", "loadC_us"), mInputSource(NULL), mInputSourceGen(0), mPipeSink(NULL), mPipeSinkGen(0), mReadBuffer(NULL), mReadBufferState(-1), mFormat(Format_Invalid), mSampleRate(0), // mDummyDumpState Loading
services/audioflinger/FastMixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ namespace android { /*static*/ const FastMixerState FastMixer::sInitial; FastMixer::FastMixer() : FastThread(), FastMixer::FastMixer() : FastThread("cycle_ms", "load_us"), // mFastTrackNames // mGenerations mOutputSink(NULL), Loading
services/audioflinger/FastThread.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace android { FastThread::FastThread() : Thread(false /*canCallJava*/), FastThread::FastThread(const char *cycleMs, const char *loadUs) : Thread(false /*canCallJava*/), // re-initialized to &sInitial by subclass constructor mPrevious(NULL), mCurrent(NULL), /* mOldTs({0, 0}), */ Loading Loading @@ -72,11 +72,15 @@ FastThread::FastThread() : Thread(false /*canCallJava*/), frameCount(0), #endif mAttemptedWrite(false) // mCycleMs(cycleMs) // mLoadUs(loadUs) { mOldTs.tv_sec = 0; mOldTs.tv_nsec = 0; mMeasuredWarmupTs.tv_sec = 0; mMeasuredWarmupTs.tv_nsec = 0; strlcpy(mCycleMs, cycleMs, sizeof(mCycleMs)); strlcpy(mLoadUs, loadUs, sizeof(mLoadUs)); } FastThread::~FastThread() Loading Loading @@ -336,8 +340,8 @@ bool FastThread::threadLoop() // this store #4 is not atomic with respect to stores #1, #2, #3 above, but // the newest open & oldest closed halves are atomic with respect to each other mDumpState->mBounds = mBounds; ATRACE_INT("cycle_ms", monotonicNs / 1000000); ATRACE_INT("load_us", loadNs / 1000); ATRACE_INT(mCycleMs, monotonicNs / 1000000); ATRACE_INT(mLoadUs, loadNs / 1000); } #endif } else { Loading
services/audioflinger/FastThread.h +4 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace android { class FastThread : public Thread { public: FastThread(); FastThread(const char *cycleMs, const char *loadUs); virtual ~FastThread(); private: Loading Loading @@ -88,6 +88,9 @@ protected: FastThreadState::Command mCommand; bool mAttemptedWrite; char mCycleMs[16]; // cycle_ms + suffix char mLoadUs[16]; // load_us + suffix }; // class FastThread } // android Loading
services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -6036,7 +6036,7 @@ reacquire_wakelock: // sleep with mutex unlocked if (sleepUs > 0) { ATRACE_BEGIN("sleep"); ATRACE_BEGIN("sleepC"); mWaitWorkCV.waitRelative(mLock, microseconds((nsecs_t)sleepUs)); ATRACE_END(); sleepUs = 0; Loading