diff options
author | Glenn Kasten <gkasten@google.com> | 2015-03-02 14:47:19 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2015-03-03 08:50:40 -0800 |
commit | fbdb2aceab7317aa44bc8f301a93eb49e17b2bce (patch) | |
tree | 97defd36379d3d4770dbd02dbacf046084889761 /services/audioflinger/FastMixerDumpState.cpp | |
parent | 63238efb0d674758902918e3cdaac322126484b7 (diff) | |
download | frameworks_av-fbdb2aceab7317aa44bc8f301a93eb49e17b2bce.zip frameworks_av-fbdb2aceab7317aa44bc8f301a93eb49e17b2bce.tar.gz frameworks_av-fbdb2aceab7317aa44bc8f301a93eb49e17b2bce.tar.bz2 |
Pull up increaseSamplingN and kSamplingNforLowRamDevice
from FastMixerDumpState to FastThreadDumpState, and remove unused parameter
from FastMixerDumpState constructor.
Change-Id: Ib8937b106622a8da28a6ef6043de4528ae82cb05
Diffstat (limited to 'services/audioflinger/FastMixerDumpState.cpp')
-rw-r--r-- | services/audioflinger/FastMixerDumpState.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
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() { } |