From 31b9cbd8f605dc8841b869d6e328d5b1658bb36f Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 21 Jan 2021 12:09:40 +0900 Subject: [PATCH] Add trace logs Change-Id: Ib4cd7c2235a438d99d944d8f8069e2e578030298 Signed-off-by: Hwankyu Jhun --- src/base/appcore_base.c | 8 ++++++++ src/ui_base/appcore_ui_base.c | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/base/appcore_base.c b/src/base/appcore_base.c index 8acee5b..27723d5 100644 --- a/src/base/appcore_base.c +++ b/src/base/appcore_base.c @@ -1137,12 +1137,15 @@ EXPORT_API int appcore_base_init(appcore_base_ops ops, int argc, char **argv, vo __context.suspended_state = false; __context.allowed_bg = false; + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:OPS_INIT"); if (__context.ops.init) __context.ops.init(argc, argv, data); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); if (TIZEN_FEATURE_BACKGROUND_MANAGEMENT) g_idle_add(__init_suspend, NULL); + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:SET_SYSTEM_EVENT"); if (!__context.dirty) { __context.dirty = true; @@ -1153,9 +1156,14 @@ EXPORT_API int appcore_base_init(appcore_base_ops ops, int argc, char **argv, vo } } } + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:VERIFY_LANG"); __verify_language(); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:SET_DEFAULT_EVENTS"); __set_default_events(); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); if (__context.ops.set_i18n) __context.ops.set_i18n(__context.data); diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c index 5dbabc8..c0de057 100644 --- a/src/ui_base/appcore_ui_base.c +++ b/src/ui_base/appcore_ui_base.c @@ -998,13 +998,20 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar char appid[PATH_MAX] = {0, }; int ret; + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:ECORE_WL2_INIT"); if (!ecore_wl2_init()) { _ERR("could not wl2 init"); return -1; } + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:DISPLAY_CONNECT"); ecore_wl2_display_connect(NULL); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); + + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:PLUGIN_INIT"); appcore_ui_plugin_init(&ops, argc, argv, &hint); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); ret = aul_app_get_appid_bypid(getpid(), appid, sizeof(appid)); if (ret != 0) { _ERR("Fail to get appid (%d)", getpid()); @@ -1030,8 +1037,11 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar } } - if (__context.hint & APPCORE_UI_BASE_HINT_WINDOW_ID_CONTROL) + if (__context.hint & APPCORE_UI_BASE_HINT_WINDOW_ID_CONTROL) { + traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:SET_APPID"); __set_app_id(); + traceEnd(TTRACE_TAG_APPLICATION_MANAGER); + } return appcore_base_init(ops.base, argc, argv, data); } -- 2.7.4