summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKichan Kwon <k_c.kwon@samsung.com>2016-11-04 15:15:21 +0900
committerKichan Kwon <k_c.kwon@samsung.com>2016-11-07 13:55:10 +0900
commit0e3cd7effc4d56a6d6d53fc2ef4a5a60f406769a (patch)
tree3d5e8e8855dee096d4e47210832c7818a23eb8cc
parentaeb60a2637e7274a65941d958148df2aaf97b6b6 (diff)
downloadresourced-0e3cd7effc4d56a6d6d53fc2ef4a5a60f406769a.tar.gz
resourced-0e3cd7effc4d56a6d6d53fc2ef4a5a60f406769a.tar.bz2
resourced-0e3cd7effc4d56a6d6d53fc2ef4a5a60f406769a.zip
proc-stat : remove duplicated macro
- Size converting macro is supported by resourced util Change-Id: I56365f759de498894c914e0b1f2943a83a9532a6 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
-rw-r--r--src/proc-stat/proc-usage-stats-helper.c5
-rw-r--r--src/proc-stat/proc-usage-stats.c3
2 files changed, 1 insertions, 7 deletions
diff --git a/src/proc-stat/proc-usage-stats-helper.c b/src/proc-stat/proc-usage-stats-helper.c
index 86a564a3..94137605 100644
--- a/src/proc-stat/proc-usage-stats-helper.c
+++ b/src/proc-stat/proc-usage-stats-helper.c
@@ -32,9 +32,6 @@
#include "macro.h"
#include "trace.h"
-#define BtoKiB(bytes) (bytes >> 10)
-#define kBtoKiB(kbytes) (int)(((long long)kbytes * 1024)/1000)
-
#define TASK_NAME_BASE "runtime_info_%s_usage"
static int proc_get_virtual_mem_size(int pid, int *vsize)
@@ -60,7 +57,7 @@ static int proc_get_virtual_mem_size(int pid, int *vsize)
}
fclose(proc_stat);
- *vsize = BtoKiB(vsz);
+ *vsize = BYTE_TO_KBYTE(vsz);
return RESOURCED_ERROR_NONE;
error:
diff --git a/src/proc-stat/proc-usage-stats.c b/src/proc-stat/proc-usage-stats.c
index 81fe16da..4aca16cd 100644
--- a/src/proc-stat/proc-usage-stats.c
+++ b/src/proc-stat/proc-usage-stats.c
@@ -57,9 +57,6 @@
#include "trace.h"
#include "edbus-handler.h"
-#define BtoKiB(bytes) (bytes >> 10)
-#define kBtoKiB(kbytes) (int)(((long long)kbytes * 1024)/1000)
-
#define PROCESS_MEMORY_USAGE_METHOD "ProcMemoryUsage"
#define PROCESS_CPU_USAGE_METHOD "ProcCpuUsage"