Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp337573ybj; Thu, 19 Sep 2019 15:19:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqXZ0lCg86650gMXtQiW1pu4RjvIhi+YDh3moyP5N1V5ZACFGJH12FASgppN7tKLP7VnCi X-Received: by 2002:a17:906:1f03:: with SMTP id w3mr16165041ejj.31.1568931565922; Thu, 19 Sep 2019 15:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1568931565; cv=pass; d=google.com; s=arc-20160816; b=LZ2N96F9hCrtViYKaapI/IMPZ3lZtFHJmSLA4sSWTpbqSE5i32wiSWI+h1Qx5uGDuA kewv3h3XRIisYDv5O9ayQrAnwq4U+W//u+xcLkH4ZOV6sABpNZS9fEL3s52O+X4apbna dyUvC5FWhrpG53pQcla+grTShC4pL2EbbrU5eeELtSFFZOWmL8+7cvVeR8dqu2X+EN6l bwcukSI6DJ/aFgst5q+zYZi4pju8JKHNUIlQsSF5RUvHIW3wmzAW7PuecSnDcK+4puix frYKJkCPZKurBYu2+/CvFUc6Vng9HU30qqRUpdTsmGHOsPWKVE4o+KNO0RnaCJfotZsS w6oQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dLughKxE4Pr/pPzV1MEwWvRbCgRkRvKQIyCIsrRipFQ=; b=0PbwhNS2VKKBw4uYSd7rorf0IjhURkMl6FAgTMBo78otYUpUOCkeIfMb0fwl2l9GxW tjPQD6NBUu3cOofxZr4tRiy05kh63DBfSoOBISAytp4geiA5u0FWJ8h/TFge0sEnAvgQ 1IMHC5gybcgmi+1bVUzz763+biP04T4R0amCYeNZiFNHG8PpBpT8eIrwD2zbaaU8dD4I 6BdzfmhGnnU2mjd6fAB9VLd+Z4tGs20CbNffx8PhnY9B1FEtzHPuA8jxU/nQtE3jEnyG am+0/2LSfeAyo5UGK/2NyzduiG1MUBkyHx5xT8zYb5+4kBEdZz4OceFAs85eMRXcO/D2 QMYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=DTJl12YE; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si5157708ejx.56.2019.09.19.15.19.02; Thu, 19 Sep 2019 15:19:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=DTJl12YE; arc=pass (i=1); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389806AbfISUoI (ORCPT + 99 others); Thu, 19 Sep 2019 16:44:08 -0400 Received: from mail-eopbgr770082.outbound.protection.outlook.com ([40.107.77.82]:9696 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387403AbfISUoI (ORCPT ); Thu, 19 Sep 2019 16:44:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f5DltKjnXGQnQ5YtUZ9KKsAv77DYZmUQgGxVJnkOy9QL5EURRGYYXum7brKwYZcSBO23AmaJI9cIhfYIRTDLSzoHEFbog97hR+r2z8j5y8y6K8/vr0tVenm7IHZjlyyj0I29eWDYaPOLDYdFJiZUCRTnu/IPifLsz833y4FhyGU2H+rKIFwpp8VIovSn5WXwOFkmTIJKl9/N2dBVtXz+Zjq+oaVkcTe6OxeHAmtisqJAlK5j7VjaOu4OUF7IBPMWUfe9r89VtWmbc47rGoi2rWyyXjd+bbuGXT7OGSrYWdHA8dAftXLacgxQrejyhJzOYT0CT71n/5C+pJwa64RGzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dLughKxE4Pr/pPzV1MEwWvRbCgRkRvKQIyCIsrRipFQ=; b=mkzItQPzIn92OLpo047De9mJ5X26uC/6Z7jNdbr+hAojgnu0+UbxVPtqZk/UgydRmOEPCYXWJ+LtDpAxdE92DS0aq8y6/8naNQ+byqo4NLSWuOFL84uaTZu9MoDObLcG71IyKZTlhBEO+DBFf6GwiJoiSfYBREPetJUEw9DN5V7sYml9F2GWAfkHCncpzIc3CLwAIv+cilc0tGRUClVslSXxTfkmqHVCgPZxaTFgvU3W9SixridmURXNjML6LKILEdEjW1jVCYVPLAhGZjEzwvCnuK+3MpTqt9Yz24HeSFCqZ3LmQdkqMtSIxXHdsUaHt+x1GFZfpCzn8H8LBBMFSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dLughKxE4Pr/pPzV1MEwWvRbCgRkRvKQIyCIsrRipFQ=; b=DTJl12YEtksXAno/LaLqCCqt52iKlcJHfEAZMo0o/1YrMGwS/3S1tzBnSMZWWTyMVKH6KHidye3a+QyUTCTg0Wjl+mQEKy55mmhlMhbXO6U/n9x/WVe6kfQD8qYdpDT3MMKjyeMlVB6LGHstDnE3aPXWsvFw8uDv21h9catorTg= Received: from MN2PR12CA0029.namprd12.prod.outlook.com (2603:10b6:208:a8::42) by SN1PR12MB2496.namprd12.prod.outlook.com (2603:10b6:802:29::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.17; Thu, 19 Sep 2019 20:44:04 +0000 Received: from CO1NAM03FT044.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by MN2PR12CA0029.outlook.office365.com (2603:10b6:208:a8::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20 via Frontend Transport; Thu, 19 Sep 2019 20:44:04 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT044.mail.protection.outlook.com (10.152.81.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2284.20 via Frontend Transport; Thu, 19 Sep 2019 20:44:03 +0000 Received: from totem.amd.com (10.180.168.240) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.389.1; Thu, 19 Sep 2019 15:43:55 -0500 From: Kim Phillips To: Arnaldo Carvalho de Melo CC: , Janakarajan Natarajan , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Andi Kleen , "Jiri Olsa" , Namhyung Kim , Borislav Petkov , Martin Liska , Luke Mujica , Jin Yao , Kan Liang , , Subject: [PATCH 4/5] perf list: allow plurals for metric, metricgroup Date: Thu, 19 Sep 2019 15:43:05 -0500 Message-ID: <20190919204306.12598-4-kim.phillips@amd.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919204306.12598-1-kim.phillips@amd.com> References: <20190919204306.12598-1-kim.phillips@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(376002)(346002)(39860400002)(136003)(396003)(428003)(189003)(199004)(426003)(51416003)(76176011)(476003)(53416004)(8676002)(86362001)(486006)(6916009)(36756003)(7736002)(186003)(44832011)(48376002)(2616005)(47776003)(5660300002)(3846002)(50466002)(26005)(54906003)(446003)(11346002)(70206006)(1076003)(70586007)(2870700001)(6116002)(81156014)(50226002)(126002)(81166006)(305945005)(4326008)(8936002)(316002)(356004)(2906002)(6666004)(7416002)(478600001)(16526019)(336012)(7696005);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB2496;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ba9ae3c-41e1-4c83-f8a2-08d73d421bdc X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:SN1PR12MB2496; X-MS-TrafficTypeDiagnostic: SN1PR12MB2496: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 016572D96D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: PJzVwaXHR4s26Z404AQP9HGbXfEwcK0BQAPrSFp5P/aGW8OhlVt4B4QhsGXdmSuDbAIE+hjnnJu5nQoKwfvKFQJ8RAW326Ixp2f/3Jyr5x9sRVPy1U7FHEVd9XrDppnWe/dXjbwNGwModzHo8Hqec+wmSvTsW60eH013rqtw2XZv1drklpu3dZtaop0ELOUQEvPUcBSxBtOXVBwzZD1PMwgtA6LmbM4iq9PTlYqDtDIi9xQSvcdIfjjsSg/pzdALy5ikjnY4vPM7Zdxl19j6HDD14ZArZrV4Mm5TdrxJ19dMcRfHOJyMnSi7vEHEUd2Z9M42OE3XTIcLNxKAKCiLI0tythES2AjLKWKwKRJcidwUVvQ4lRcJZXoqyYCWWAtfTMYQsTsZ/3cvXeBek0vzr/i3j97B5k0PtTN1HhAzV38= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2019 20:44:03.8885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba9ae3c-41e1-4c83-f8a2-08d73d421bdc X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2496 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enhance usability by allowing the same plurality used in the output title, for the command line parameter. BEFORE, perf deceitfully acts as if there are no metrics to be had: $ perf list metrics List of pre-defined events (to be used in -e): Metric Groups: $ But singular 'metric' shows a list of metrics: $ perf list metric List of pre-defined events (to be used in -e): Metrics: IPC [Instructions Per Cycle (per logical thread)] UPI [Uops Per Instruction] AFTER, when asking for 'metrics', we actually see the metrics get listed: $ perf list metrics List of pre-defined events (to be used in -e): Metrics: IPC [Instructions Per Cycle (per logical thread)] UPI [Uops Per Instruction] Signed-off-by: Kim Phillips Cc: Janakarajan Natarajan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Borislav Petkov Cc: Martin Liska Cc: Luke Mujica Cc: Jin Yao Cc: Kan Liang Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Fixes: 71b0acce78d1 ("perf list: Add metric groups to perf list") --- tools/perf/builtin-list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index e290f6b348d8..08e62ae9d37e 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c @@ -81,9 +81,9 @@ int cmd_list(int argc, const char **argv) long_desc_flag, details_flag); else if (strcmp(argv[i], "sdt") == 0) print_sdt_events(NULL, NULL, raw_dump); - else if (strcmp(argv[i], "metric") == 0) + else if (strcmp(argv[i], "metric") == 0 || strcmp(argv[i], "metrics") == 0) metricgroup__print(true, false, NULL, raw_dump, details_flag); - else if (strcmp(argv[i], "metricgroup") == 0) + else if (strcmp(argv[i], "metricgroup") == 0 || strcmp(argv[i], "metricgroups") == 0) metricgroup__print(false, true, NULL, raw_dump, details_flag); else if ((sep = strchr(argv[i], ':')) != NULL) { int sep_idx; -- 2.23.0