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/FastThreadDumpState.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services/audioflinger/FastThreadDumpState.h') diff --git a/services/audioflinger/FastThreadDumpState.h b/services/audioflinger/FastThreadDumpState.h index 67468b9..bbca7da 100644 --- a/services/audioflinger/FastThreadDumpState.h +++ b/services/audioflinger/FastThreadDumpState.h @@ -39,6 +39,9 @@ struct FastThreadDumpState { // The sample arrays are virtually allocated based on this compile-time constant, // but are only initialized and used based on the runtime parameter mSamplingN. static const uint32_t kSamplingN = 0x8000; + // Compile-time constant for a "low RAM device", must be a power of 2 <= kSamplingN. + // This value was chosen such that each array uses 1 small page (4 Kbytes). + static const uint32_t kSamplingNforLowRamDevice = 0x400; // Corresponding runtime maximum size of sample arrays, must be a power of 2 <= kSamplingN. uint32_t mSamplingN; // The bounds define the interval of valid samples, and are represented as follows: @@ -52,6 +55,9 @@ struct FastThreadDumpState { #ifdef CPU_FREQUENCY_STATISTICS uint32_t mCpukHz[kSamplingN]; // absolute CPU clock frequency in kHz, bits 0-3 are CPU# #endif + + // Increase sampling window after construction, must be a power of 2 <= kSamplingN + void increaseSamplingN(uint32_t samplingN); #endif }; // struct FastThreadDumpState -- cgit v1.1