diff mbox series

[5/6] tools/vm/page_owner_sort: support sorting by module name

Message ID 20230815125251.2865852-6-tujinjiang@huawei.com (mailing list archive)
State New
Headers show
Series page_owner: support filtering by module | expand

Commit Message

Jinjiang Tu Aug. 15, 2023, 12:52 p.m. UTC
This patch adds new argument (i.e. source) for --sort option,
allows the items sorted by module name.

Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
---
 tools/mm/page_owner_sort.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c
index 35acf6932d78..c2dc0b58a214 100644
--- a/tools/mm/page_owner_sort.c
+++ b/tools/mm/page_owner_sort.c
@@ -679,6 +679,8 @@  static bool parse_sort_args(const char *arg_str)
 			sc.cmps[i] = compare_txt;
 		else if (arg_type == ARG_ALLOCATOR)
 			sc.cmps[i] = compare_allocator;
+		else if (arg_type == ARG_MODULE)
+			sc.cmps[i] = compare_module;
 		else {
 			free_explode(args, size);
 			sc.size = 0;