[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220215134045.12004-1-songmuchun@bytedance.com>
Date: Tue, 15 Feb 2022 21:40:45 +0800
From: Muchun Song <songmuchun@...edance.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
Muchun Song <songmuchun@...edance.com>
Subject: [PATCH] tools/vm/page_owner: filter out pid and timestamp
Commit 9cc7e96aa846 ("mm/page_owner: record timestamp and pid") introduces
timestamp and pid for page owner. However, it is hard to aggregate the
stack since those are specific (especially timestamp). Filter out those
information when aggregating.
Signed-off-by: Muchun Song <songmuchun@...edance.com>
---
tools/vm/page_owner_sort.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c
index 9ebb84a9c731..fc231749e0a9 100644
--- a/tools/vm/page_owner_sort.c
+++ b/tools/vm/page_owner_sort.c
@@ -45,6 +45,12 @@ int read_block(char *buf, int buf_size, FILE *fin)
return curr - buf;
if (!strncmp(curr, "PFN", 3))
continue;
+ if (!strncmp(curr, "Page allocated via order", 24)) {
+ char *end = strstr(curr, ", pid ");
+
+ if (end)
+ memcpy(end, "\n", 2);
+ }
curr += strlen(curr);
}
--
2.11.0
Powered by blists - more mailing lists