#include <Elementary.h>
#include <bundle_internal.h>
#include <vconf.h>
+#include <sys/prctl.h>
#include "launchpad_common.h"
#include "launchpad.h"
#include "key.h"
+#ifndef PR_TASK_PERF_USER_TRACE
+#define PR_TASK_PERF_USER_TRACE 666
+#endif
+
#define KEY_LOADER_TYPE "loader_type"
#define LOADER_TYPE_COMMON "common-loader"
#define LOADER_TYPE_HW "hw-loader"
char old_cwd[PATH_MAX];
bool restore = false;
char *libdir = NULL;
+ char hwc_message[MAX_LOCAL_BUFSZ];
SECURE_LOGD("[candidate] Launch real application (%s)",
argv[LOADER_ARG_PATH]);
restore = true;
do_dlopen:
+ snprintf(hwc_message, sizeof(hwc_message), "%d|lib loading start", getpid());
+ prctl(PR_TASK_PERF_USER_TRACE, hwc_message, strlen(hwc_message));
handle = dlopen(argv[LOADER_ARG_PATH],
RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE);
if (handle == NULL) {
goto do_exec;
}
+ snprintf(hwc_message, sizeof(hwc_message), "%d|lib loading end", getpid());
+ prctl(PR_TASK_PERF_USER_TRACE, hwc_message, strlen(hwc_message));
dlerror();
if (restore && chdir(old_cwd))