From patchwork Tue Aug 15 12:52:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjiang Tu X-Patchwork-Id: 13353757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51680C001DB for ; Tue, 15 Aug 2023 11:58:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E49E8D0001; Tue, 15 Aug 2023 07:58:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3418B8D000A; Tue, 15 Aug 2023 07:58:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22FDC8D0008; Tue, 15 Aug 2023 07:58:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 100CE8D0001 for ; Tue, 15 Aug 2023 07:58:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CA48D120B5C for ; Tue, 15 Aug 2023 11:57:59 +0000 (UTC) X-FDA: 81126190278.04.DC0E476 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf16.hostedemail.com (Postfix) with ESMTP id 3B20A180011 for ; Tue, 15 Aug 2023 11:57:56 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of tujinjiang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=tujinjiang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692100677; a=rsa-sha256; cv=none; b=NTNrDtFB1+gUo+gQa6wAEm2lWiiUq0s4+Y84weYNmurS5XNxt9Q27LNbqoKp7ZVGmGKaLu CDti9t5crAoLoIVte2La37hrRvfpHuMYrgr2ZDGkS46StzGiBWm2El9kNmkLqCaDccqLYR tc8GhKzudDf05aQPcEs9pXUt3+YYyBI= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of tujinjiang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=tujinjiang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692100677; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VR2wqDunnk+vkBNof130LBjS77jKWechGovbdZsUFho=; b=YsEsFHwyq48MtDsD4QzX2NZ7La3zvkg9Rv1+cIyHR0baxk9GwClCbIK8uULv52CXpzviQe N91iPQbLkWSsJA0ElH3QlWFFzAo7zc6iYh0De9JZGOGCxAr8NMGVGmHxNCT0GO+t0ZvH1Q kcd0cZTSHAX+vyCXiY5y3R+izKR1yCo= Received: from dggpeml500011.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RQ8nV39tczNmnP; Tue, 15 Aug 2023 19:54:22 +0800 (CST) Received: from huawei.com (10.175.113.32) by dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 15 Aug 2023 19:57:53 +0800 From: Jinjiang Tu To: , , , , CC: Subject: [PATCH 5/6] tools/vm/page_owner_sort: support sorting by module name Date: Tue, 15 Aug 2023 20:52:50 +0800 Message-ID: <20230815125251.2865852-6-tujinjiang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230815125251.2865852-1-tujinjiang@huawei.com> References: <20230815125251.2865852-1-tujinjiang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500011.china.huawei.com (7.185.36.84) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3B20A180011 X-Stat-Signature: 5jsfn54gswibyzkpr1pduhsq3wu4bakk X-Rspam-User: X-HE-Tag: 1692100676-111928 X-HE-Meta: U2FsdGVkX19SAQ0vFUWAiiUrhx2iDRvV0xZ2KA8/wyguSheVwPciXW+UNpk/yu7o9LTZiqB5b4fscHgmoF2ZJXnIdFAsVGKGTb4YPtCmkji8kbBcHhaEJu6qjRJXlrmGjJM209I+EgQYqMx8bfSFxQ8vACv9JGCzu/20r2+VvmR1ljznYzqNfzwDfpQb6bPPKy66emPsJdUdIu0lnYtOriTLBKcyHGfC7GMUD/ZbegHkIdIrVtK2nwZ7nKtNEHBvxZ/E7kdoPGVtCo1gdqtk5fkNdnKK2pC6ufA/hixcgAFlGdmlG8bir1IcZ0SJ3o8w/dd2KlCiE7Pf+PfXXWQcwqjiU8AuLstAGoQQKCKEDRaFgS5F//2ibUUjkd5p+Lu1H5IdJG67dsjABBHP/A/LZY76E1a6+2Lu+UJnzTzqWfh/9iTB/4XakNKYPOQUjuGJjbxIP3E9gjZBZcJE9YHyPxm6xVA7/OcClmXJI3fPQ3VEQVzA5ORl59WzPXxOIFohNum+Sotu1TjRju1DRbv1ABXzWQ3UXO7wc+6KoJyjfyjRXoFvIGS0ZP7Pue+yXtJWCLeiOdBLrI2DhniZBbnrbPcJkOF7aCZscvbGPVkcCo9LhsRb8SEQ2i/pB+92WRMCTmFfEIOkdCC/kkympAVdtE8PBGcUva9xdlaD2HwNuvm+HAbdXiPaqQN2TVgpEBtDCEm8OkuJc4mQL4x1bC/LYK6BU3/Tp9ixsFcMc7QBe73BuT/bXss71RwUny3lHkuECyY/NC9CAc6TwYEcfkwS0G/61wZLDSaV3SE5QzePkP1dp4+OZn2LdStov5e9YzcqzRP1wLEBtW2gezJ3H5j+xSTeBT3qv32P/UlV+0EIB3LPX3h5j70z7TOGgDV9soe0+4zut/5jbeAlR3HI+SoGPK7SSBq4EVEbOTVQ8YRY6bzVaMzbBoROxgMaRQ6qmnhFqDPMC1E4lLnc/xygr2I qHasfpxh piE9u2fSXzxvBkv8QqxPK/JtSxVNJC557MpB9D1bEKuTG51mzB5WzSPtBHZ4WNrFcmLitde3dMUvcStxk9K+wMRTp4kWNVjbCorhD/gTsxMKh4njz8ihiTBPRa9Mhb+ajccV5E9s4twaESzzLYKa856YnDkQHJ/NSHE4lX3RzqInZxZf/vma4gRS9/NKHMOlEXOBn X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patch adds new argument (i.e. source) for --sort option, allows the items sorted by module name. Signed-off-by: Jinjiang Tu --- tools/mm/page_owner_sort.c | 2 ++ 1 file changed, 2 insertions(+) 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;