From f8c7d65a404d22e0020bb5f05210ef15dcd6ff49 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Tue, 9 Mar 2021 16:44:06 +0900 Subject: [PATCH] halapi: Add more information to improve the readability for dlog In order to improve the readability, add more information with library name and usage_count for multi-thread environment. Change-Id: I71b3f68789556ccdf77275ba1932b39b1e7378f5 Signed-off-by: Chanwoo Choi --- src/hal-api-common.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hal-api-common.c b/src/hal-api-common.c index 4bf3dc4..cc2f926 100644 --- a/src/hal-api-common.c +++ b/src/hal-api-common.c @@ -249,11 +249,12 @@ int hal_common_get_backend(enum hal_module module, void **data) goto err_dlclose; } - _I("%s: Get HAL backend: name(%s)/vendor(%s)\n", - info->module_name, backend->name, backend->vendor); - info->usage_count++; + _I("%s: Get HAL backend: name(%s)/vendor(%s)/library(%s)/count(%d)\n", + info->module_name, backend->name, backend->vendor, + library_name, info->usage_count); + G_UNLOCK(hal_common_lock); return TIZEN_ERROR_NONE; @@ -313,8 +314,9 @@ int hal_common_put_backend(enum hal_module module, void *data) } } - _I("%s: Put HAL backend: name(%s)/vendor(%s)\n", - info->module_name, backend->name, backend->vendor); + _I("%s: Put HAL backend: name(%s)/vendor(%s)/library(%s)/count(%d)\n", + info->module_name, backend->name, backend->vendor, + get_backend_library_name(info), info->usage_count); if (handle) dlclose(handle); -- 2.7.4