summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-hun Kim <sfoon.kim@samsung.com>2023-12-21 16:56:16 +0900
committerSung-hun Kim <sfoon.kim@samsung.com>2023-12-21 16:58:12 +0900
commit815c53d70f709776bbe1bea5809e0db451936a3e (patch)
tree96c38b174b900902b11cdde4d5542adcd5aa0e3d
parentde66f0da2a333df764a55ca30d51a1ab81e73d7d (diff)
downloadmemps-tizen.tar.gz
memps-tizen.tar.bz2
memps-tizen.zip
Change-Id: I391fa55a186b80f02fe63484fdbb5c1fd1633fb5 Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
-rw-r--r--memps.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/memps.c b/memps.c
index b2a3e3d..cc1bff0 100644
--- a/memps.c
+++ b/memps.c
@@ -1373,6 +1373,7 @@ static int show_map_new(int pid)
unsigned private_dirty = 0;
unsigned private_clean = 0;
unsigned pss = 0;
+ unsigned swap = 0;
unsigned long start = 0;
unsigned long end = 0;
unsigned private_clean_total = 0;
@@ -1391,24 +1392,24 @@ static int show_map_new(int pid)
if (!sum) {
if (sizeof(unsigned long) == 4) {
/* for 32-bit address */
- printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS "
+ printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS SWAP "
"ADDR(start-end) "
"OBJECT NAME\n");
- printf("-------- -------- -------- -------- -------- "
+ printf("-------- -------- -------- -------- -------- -------- "
"----------------- "
"------------------------------\n");
} else {
/* for 64-bit address */
- printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS "
+ printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS SWAP "
"ADDR(start-end) "
"OBJECT NAME\n");
- printf("-------- -------- -------- -------- -------- "
+ printf("-------- -------- -------- -------- -------- -------- "
"--------------------------------- "
"------------------------------\n");
}
} else {
- printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS\n");
- printf("-------- -------- -------- -------- --------\n");
+ printf(" S(CODE) S(DATA) P(CODE) P(DATA) PSS SWAP\n");
+ printf("-------- -------- -------- -------- -------- --------\n");
}
for (mi = milist; mi;) {
shared_clean += mi->shared_clean;
@@ -1416,6 +1417,7 @@ static int show_map_new(int pid)
private_clean += mi->private_clean;
private_dirty += mi->private_dirty;
pss += mi->pss;
+ swap += mi->swap;
shared_clean_total += mi->shared_clean;
shared_dirty_total += mi->shared_dirty;
@@ -1443,15 +1445,15 @@ static int show_map_new(int pid)
if (!sum) {
if (sizeof(unsigned long) == 4) {
/* for 32-bit address */
- printf("%8d %8d %8d %8d %8d %08lx-%08lx %s\n",
+ printf("%8d %8d %8d %8d %8d %8d %08lx-%08lx %s\n",
shared_clean, shared_dirty,
- private_clean, private_dirty, mi->pss,
+ private_clean, private_dirty, mi->pss, mi->swap,
start, end, mi->name);
} else {
/* for 64-bit address */
- printf("%8d %8d %8d %8d %8d %016lx-%016lx %s\n",
+ printf("%8d %8d %8d %8d %8d %8d %016lx-%016lx %s\n",
shared_clean, shared_dirty,
- private_clean, private_dirty, mi->pss,
+ private_clean, private_dirty, mi->pss, mi->swap,
start, end, mi->name);
}
}
@@ -1468,12 +1470,13 @@ static int show_map_new(int pid)
temp = NULL;
}
if (sum) {
- printf("%8d %8d %8d %8d %8d\n",
+ printf("%8d %8d %8d %8d %8d %8d\n",
shared_clean_total,
shared_dirty_total,
private_clean_total,
private_dirty_total,
- pss);
+ pss,
+ swap);
}
return 1;