From fbdb2aceab7317aa44bc8f301a93eb49e17b2bce Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 2 Mar 2015 14:47:19 -0800 Subject: Pull up increaseSamplingN and kSamplingNforLowRamDevice from FastMixerDumpState to FastThreadDumpState, and remove unused parameter from FastMixerDumpState constructor. Change-Id: Ib8937b106622a8da28a6ef6043de4528ae82cb05 --- services/audioflinger/FastMixerDumpState.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'services/audioflinger/FastMixerDumpState.cpp') diff --git a/services/audioflinger/FastMixerDumpState.cpp b/services/audioflinger/FastMixerDumpState.cpp index 148c0f7..87eaacb 100644 --- a/services/audioflinger/FastMixerDumpState.cpp +++ b/services/audioflinger/FastMixerDumpState.cpp @@ -30,39 +30,14 @@ namespace android { -FastMixerDumpState::FastMixerDumpState( -#ifdef FAST_THREAD_STATISTICS - uint32_t samplingN -#endif - ) : FastThreadDumpState(), +FastMixerDumpState::FastMixerDumpState() : FastThreadDumpState(), mWriteSequence(0), mFramesWritten(0), mNumTracks(0), mWriteErrors(0), mSampleRate(0), mFrameCount(0), mTrackMask(0) { -#ifdef FAST_THREAD_STATISTICS - increaseSamplingN(samplingN); -#endif } -#ifdef FAST_THREAD_STATISTICS -void FastMixerDumpState::increaseSamplingN(uint32_t samplingN) -{ - if (samplingN <= mSamplingN || samplingN > kSamplingN || roundup(samplingN) != samplingN) { - return; - } - uint32_t additional = samplingN - mSamplingN; - // sample arrays aren't accessed atomically with respect to the bounds, - // so clearing reduces chance for dumpsys to read random uninitialized samples - memset(&mMonotonicNs[mSamplingN], 0, sizeof(mMonotonicNs[0]) * additional); - memset(&mLoadNs[mSamplingN], 0, sizeof(mLoadNs[0]) * additional); -#ifdef CPU_FREQUENCY_STATISTICS - memset(&mCpukHz[mSamplingN], 0, sizeof(mCpukHz[0]) * additional); -#endif - mSamplingN = samplingN; -} -#endif - FastMixerDumpState::~FastMixerDumpState() { } -- cgit v1.1