From: Changyeon Lee Date: Thu, 29 Aug 2019 07:55:50 +0000 (+0900) Subject: tbm_bufmgr: add stdout log before and after load module X-Git-Tag: accepted/tizen/unified/20190902.055241~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F213010%2F3;p=platform%2Fcore%2Fuifw%2Flibtbm.git tbm_bufmgr: add stdout log before and after load module Change-Id: Ida6d84efa25aaf900bd469f092a1dbc461bb372f --- diff --git a/include/tbm_log.h b/include/tbm_log.h index 2d29dd8..9f724cc 100644 --- a/include/tbm_log.h +++ b/include/tbm_log.h @@ -95,6 +95,15 @@ void tbm_log_print_stdout(int level, const char *fmt, ...); (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args); \ } while (0) +#define TBM_STDOUT_INFO(fmt, args...) \ + do { \ + struct timespec ts; \ + clock_gettime(CLOCK_MONOTONIC, &ts); \ + tbm_log_print_stdout(TBM_LOG_LEVEL_INFO, "[%5d.%06d][%d][%s %d]"fmt, \ + (int)ts.tv_sec, (int)ts.tv_nsec / 1000, \ + (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args); \ + } while (0) + #define TBM_NEVER_GET_HERE() TBM_WRN("** NEVER GET HERE **") #define TBM_DEPRECATED(str) \ do { \ diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index c92e0ea..e1be447 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -370,6 +370,7 @@ _tbm_backend_load_module(tbm_bufmgr bufmgr, const char *file) bufmgr->bufmgr_data = bufmgr_data; TBM_DBG("Success to load module(%s)\n", file); + TBM_STDOUT_INFO("Success to load module(%s)", file); return 1; @@ -557,6 +558,7 @@ _tbm_bufmgr_init(int fd, int server) } /* load bufmgr priv from env */ + TBM_STDOUT_INFO("loading backend module"); if (!_tbm_load_module(gBufMgr, gBufMgr->fd)) { TBM_ERR("error : Fail to load bufmgr backend\n"); _tbm_set_last_result(TBM_ERROR_INVALID_OPERATION); @@ -566,6 +568,7 @@ _tbm_bufmgr_init(int fd, int server) return NULL; } + TBM_STDOUT_INFO("loading backend module done"); /* LCOV_EXCL_STOP */ gBufMgr->ref_count = 1;