forked from donjohanliebert/hardware_xiaomi
power: move trace point to libperfmgr.
Test: systrace Bug: 199776250 Change-Id: I9bb4d5a50faa93e7bc638ef723bdc2662fb63b24
This commit is contained in:
parent
42538d39b2
commit
fa2b75f268
@ -133,7 +133,6 @@ void InteractionHandler::PerfLock() {
|
||||
if (!mHintManager->DoHint("INTERACTION")) {
|
||||
ALOGE("%s: do hint INTERACTION failed", __func__);
|
||||
}
|
||||
ATRACE_INT("interaction_lock", 1);
|
||||
}
|
||||
|
||||
void InteractionHandler::PerfRel() {
|
||||
@ -141,7 +140,6 @@ void InteractionHandler::PerfRel() {
|
||||
if (!mHintManager->EndHint("INTERACTION")) {
|
||||
ALOGE("%s: end hint INTERACTION failed", __func__);
|
||||
}
|
||||
ATRACE_INT("interaction_lock", 0);
|
||||
}
|
||||
|
||||
void InteractionHandler::Acquire(int32_t duration) {
|
||||
|
@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL)
|
||||
#define LOG_TAG "powerhal-libperfmgr"
|
||||
|
||||
#include "Power.h"
|
||||
@ -26,10 +25,8 @@
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/strings.h>
|
||||
#include <cutils/properties.h>
|
||||
|
||||
#include <utils/Log.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#include "PowerHintSession.h"
|
||||
#include "PowerSessionManager.h"
|
||||
@ -90,7 +87,6 @@ Power::Power(std::shared_ptr<HintManager> hm)
|
||||
|
||||
ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
|
||||
LOG(DEBUG) << "Power setMode: " << toString(type) << " to: " << enabled;
|
||||
ATRACE_INT(toString(type).c_str(), enabled);
|
||||
PowerSessionManager::getInstance()->updateHintMode(toString(type), enabled);
|
||||
#ifdef MODE_EXT
|
||||
if (setDeviceSpecificMode(type, enabled)) {
|
||||
@ -162,7 +158,6 @@ ndk::ScopedAStatus Power::isModeSupported(Mode type, bool *_aidl_return) {
|
||||
|
||||
ndk::ScopedAStatus Power::setBoost(Boost type, int32_t durationMs) {
|
||||
LOG(DEBUG) << "Power setBoost: " << toString(type) << " duration: " << durationMs;
|
||||
ATRACE_INT(toString(type).c_str(), durationMs);
|
||||
switch (type) {
|
||||
case Boost::INTERACTION:
|
||||
if (mSustainedPerfModeOn) {
|
||||
|
@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL)
|
||||
#define LOG_TAG "android.hardware.power-service.xiaomi.ext-libperfmgr"
|
||||
|
||||
#include "PowerExt.h"
|
||||
@ -29,7 +28,6 @@
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include <utils/Log.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
namespace aidl {
|
||||
namespace google {
|
||||
@ -40,7 +38,6 @@ namespace pixel {
|
||||
|
||||
ndk::ScopedAStatus PowerExt::setMode(const std::string &mode, bool enabled) {
|
||||
LOG(DEBUG) << "PowerExt setMode: " << mode << " to: " << enabled;
|
||||
ATRACE_INT(mode.c_str(), enabled);
|
||||
|
||||
if (enabled) {
|
||||
mHintManager->DoHint(mode);
|
||||
@ -61,7 +58,6 @@ ndk::ScopedAStatus PowerExt::isModeSupported(const std::string &mode, bool *_aid
|
||||
|
||||
ndk::ScopedAStatus PowerExt::setBoost(const std::string &boost, int32_t durationMs) {
|
||||
LOG(DEBUG) << "PowerExt setBoost: " << boost << " duration: " << durationMs;
|
||||
ATRACE_INT(boost.c_str(), durationMs);
|
||||
|
||||
if (durationMs > 0) {
|
||||
mHintManager->DoHint(boost, std::chrono::milliseconds(durationMs));
|
||||
|
Loading…
Reference in New Issue
Block a user