tools/vm/page_owner: filter out pid and timestamp
PATCH 1/1 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 <[email protected]>
--- tools/vm/page_owner_sort.c | 6 ++++++ 1 file changed, 6 insertions(+)
tools/vm/page_owner_sort.c +6 -0
@@ -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); }
Signature · 1 line
2.11.0