marlin: add launch hint to atrace
Adds some tracing for the launch hint in the power HAL.
Test: Build
Bug: 63913311
Change-Id: I94239766ba41aa7bb646a76eda7e58ba59c066fe
diff --git a/power/power-8996.c b/power/power-8996.c
index c0e4397..bc74d58 100644
--- a/power/power-8996.c
+++ b/power/power-8996.c
@@ -36,8 +36,10 @@
#include <dlfcn.h>
#include <stdlib.h>
+#define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL)
#define LOG_TAG "QCOM PowerHAL"
#include <utils/Log.h>
+#include <cutils/trace.h>
#include <hardware/hardware.h>
#include <hardware/power.h>
@@ -259,7 +261,9 @@
{
// boost will timeout in 5s
int duration = 5000;
+ ATRACE_BEGIN("launch");
if (sustained_performance_mode || vr_mode) {
+ ATRACE_END();
return HINT_HANDLED;
}
@@ -269,15 +273,21 @@
if (launch_handle > 0) {
launch_mode = 1;
ALOGV("Activity launch hint handled");
+ ATRACE_INT("launch_lock", 1);
+ ATRACE_END();
return HINT_HANDLED;
} else {
+ ATRACE_END();
return HINT_NONE;
}
} else if (data == NULL && launch_mode == 1) {
release_request(launch_handle);
+ ATRACE_INT("launch_lock", 0);
launch_mode = 0;
+ ATRACE_END();
return HINT_HANDLED;
}
+ ATRACE_END();
return HINT_NONE;
}