From: YoungHun Kim Date: Wed, 24 Jul 2024 03:06:15 +0000 (+0900) Subject: Update to log the cpu and memory information X-Git-Tag: accepted/tizen/unified/20240726.010948^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1b2afa2bc8d077d5d753036255d3ce6ff40d88b;p=platform%2Fcore%2Fmultimedia%2Fmmsvc-core.git Update to log the cpu and memory information - Disable it at TV product Change-Id: I1ef953f9392f407e4d90f0aa79335a7167127f69 --- diff --git a/packaging/mused.spec b/packaging/mused.spec index 73aaec15..2454f0d6 100644 --- a/packaging/mused.spec +++ b/packaging/mused.spec @@ -1,6 +1,6 @@ Name: mused Summary: A multimedia daemon -Version: 0.3.187 +Version: 0.3.188 Release: 0 Group: System/Libraries License: Apache-2.0 @@ -92,7 +92,7 @@ export LDFLAGS+=" -lgcov " %if ("%{_vd_cfg_product_type}" == "AUDIO") || ("%{_vd_cfg_product_type}" == "TV") || ("%{_vd_cfg_product_type}" == "LFD") || ("%{_vd_cfg_product_type}" == "HTV") || ("%{_vd_cfg_product_type}" == "AV") || ("%{_vd_cfg_product_type}" == "IWB") || ("%{_vd_cfg_product_type}" == "WALL") %cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_REGISTER_VIP=1 -DMUSE_TTRACE_ENABLE=1 -DMUSE_LWIPC_ENABLE=1 -DMUSE_BOOST_ENABLE=1 %else -export CFLAGS+=" -DMUSE_USE_POWER_OFF_STATE_CHANGE -DMUSE_USE_WATCHDOG" +export CFLAGS+=" -DMUSE_USE_POWER_OFF_STATE_CHANGE -DMUSE_USE_WATCHDOG -DMUSE_PUBLIC" %cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_GTESTS_BUILD=%{?gtests:1}%{!?gtests:0} -DMUSE_STORAGE_ENABLE=1 %endif %endif diff --git a/server/src/muse_server_private.c b/server/src/muse_server_private.c index e1811a2b..bb591da2 100644 --- a/server/src/muse_server_private.c +++ b/server/src/muse_server_private.c @@ -1170,7 +1170,7 @@ int ms_deinit(void) void ms_check_cpu_memory(void) { int used_pss, memory_threshold, cpu_usage, cpu_threshold; -#ifndef MUSE_LITE +#ifdef MUSE_PUBLIC char err_msg[MUSE_MSG_LEN_MAX] = {'\0',}; #endif ms_connection_t *connection = NULL; @@ -1190,14 +1190,12 @@ void ms_check_cpu_memory(void) used_pss = ms_system_get_memory_usage(muse_server->pid); cpu_usage = muse_core_get_process_cpu_usage(muse_server->pid); - LOGW("[%d] Proportional set size %d (KByte) (CPU %d %%)", muse_server->pid, used_pss, cpu_usage); - memory_threshold = ms_config_get_memory_threshold(); cpu_threshold = ms_config_get_cpu_threshold(); LOGW("[%d] Proportional set size %d ( > %d ? ) KB (CPU %d %%)", muse_server->pid, used_pss, memory_threshold, cpu_usage); -#ifndef MUSE_LITE +#ifdef MUSE_PUBLIC if (used_pss >= memory_threshold) { ms_log_process_info(muse_server->pid);