Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 658fc18d authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Pull out FastThreadDumpState"

parents c1b3bc0c 045ee7ea
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -74,9 +74,15 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_MODULE:= libaudioflinger
LOCAL_MODULE:= libaudioflinger
LOCAL_32_BIT_ONLY := true
LOCAL_32_BIT_ONLY := true


LOCAL_SRC_FILES += FastMixer.cpp FastMixerState.cpp AudioWatchdog.cpp
LOCAL_SRC_FILES += \
LOCAL_SRC_FILES += FastThread.cpp FastThreadState.cpp
    AudioWatchdog.cpp        \
LOCAL_SRC_FILES += FastCapture.cpp FastCaptureState.cpp
    FastCapture.cpp          \
    FastCaptureState.cpp     \
    FastMixer.cpp            \
    FastMixerState.cpp       \
    FastThread.cpp           \
    FastThreadDumpState.cpp  \
    FastThreadState.cpp


LOCAL_CFLAGS += -DSTATE_QUEUE_INSTANTIATIONS='"StateQueueInstantiations.cpp"'
LOCAL_CFLAGS += -DSTATE_QUEUE_INSTANTIATIONS='"StateQueueInstantiations.cpp"'


+1 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@
#include "FastThread.h"
#include "FastThread.h"
#include "StateQueue.h"
#include "StateQueue.h"
#include "FastCaptureState.h"
#include "FastCaptureState.h"
#include "FastThreadDumpState.h"


namespace android {
namespace android {


+1 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@
#define ANDROID_AUDIO_FAST_MIXER_DUMP_STATE_H
#define ANDROID_AUDIO_FAST_MIXER_DUMP_STATE_H


#include "Configuration.h"
#include "Configuration.h"
#include "FastThreadDumpState.h"


namespace android {
namespace android {


+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@
#include <utils/Log.h>
#include <utils/Log.h>
#include <utils/Trace.h>
#include <utils/Trace.h>
#include "FastThread.h"
#include "FastThread.h"
#include "FastThreadDumpState.h"


#define FAST_DEFAULT_NS    999999999L   // ~1 sec: default time to sleep
#define FAST_DEFAULT_NS    999999999L   // ~1 sec: default time to sleep
#define FAST_HOT_IDLE_NS     1000000L   // 1 ms: time to sleep while hot idling
#define FAST_HOT_IDLE_NS     1000000L   // 1 ms: time to sleep while hot idling
+37 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "FastThreadDumpState.h"

namespace android {

FastThreadDumpState::FastThreadDumpState() :
    mCommand(FastThreadState::INITIAL), mUnderruns(0), mOverruns(0),
    /* mMeasuredWarmupTs({0, 0}), */
    mWarmupCycles(0)
#ifdef FAST_MIXER_STATISTICS
    , mSamplingN(1), mBounds(0)
#endif
{
    mMeasuredWarmupTs.tv_sec = 0;
    mMeasuredWarmupTs.tv_nsec = 0;
}

FastThreadDumpState::~FastThreadDumpState()
{
}

}   // android
Loading