diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2019-10-02 10:33:58 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2019-10-02 10:33:58 +0900 |
commit | 82b69308e2c41d197e9033fac8c160547e33e76d (patch) | |
tree | e0ea3c91014c600761f9622245381907508b17e3 | |
parent | 674f01efb4ce29e5491309a54542a9836dd377c8 (diff) | |
download | aul-1-82b69308e2c41d197e9033fac8c160547e33e76d.tar.gz aul-1-82b69308e2c41d197e9033fac8c160547e33e76d.tar.bz2 aul-1-82b69308e2c41d197e9033fac8c160547e33e76d.zip |
Print HW clock log for performance measurement
Change-Id: Ie41ec9866bed85f73f674808cbe5f4762535606c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | tool/app_launcher.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tool/app_launcher.c b/tool/app_launcher.c index ed92691a..0deeb464 100644 --- a/tool/app_launcher.c +++ b/tool/app_launcher.c @@ -26,6 +26,7 @@ #include <gio/gio.h> #include <pkgmgr-info.h> #include <bundle_internal.h> +#include <sys/prctl.h> #include "aul.h" #include "aul_svc.h" @@ -39,6 +40,10 @@ #define APP_TYPE_SERVICE "svcapp" #define INOTIFY_BUF (1024 * ((sizeof(struct inotify_event)) + 16)) +#ifndef PR_TASK_PERF_USER_TRACE +#define PR_TASK_PERF_USER_TRACE 666 +#endif + struct launch_arg { char *appid; bundle *b; @@ -190,6 +195,18 @@ static GOptionEntry opt_entries[] = { } }; +static void __print_hwc_messages(const char *format, ...) +{ + char buf[1024]; + va_list ap; + + va_start(ap, format); + vsnprintf(buf, sizeof(buf), format, ap); + va_end(ap); + + prctl(PR_TASK_PERF_USER_TRACE, buf, strlen(buf)); +} + static GOptionGroup *__get_opt_group(void) { GOptionGroup *group; @@ -793,6 +810,8 @@ int main(int argc, char *argv[]) GError *error = NULL; struct launch_arg *launch_arg; + __print_hwc_messages("%d|main start", getpid()); + context = g_option_context_new(NULL); g_option_context_add_main_entries(context, cmd_entries, NULL); |