Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26180435rwd; Mon, 3 Jul 2023 06:31:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMlD1abBq3WXW2frPdmZmaJ1usCaz2Da4g3CX2ebKRDUHadqHmlOPUdqLL2+05VpTZTmAD X-Received: by 2002:a17:90a:ea81:b0:262:f99b:a530 with SMTP id h1-20020a17090aea8100b00262f99ba530mr10870078pjz.34.1688391066783; Mon, 03 Jul 2023 06:31:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688391066; cv=pass; d=google.com; s=arc-20160816; b=NdxqNLjUKac6lnLBEg5o17V6qiN6LBm/l7neUNo3PKZdKXUM+Xf7RqgZByYHefNrgw h3GcVSa2ZHDlEsPe+vakIqd2pDoLVwsGFh0Z8jt/HFTM6ekzK7BlSGZNfjMHDdO1MDTT 3aHRKfpgIYr111/ZKZY1anJingaCD9u51haP1WeLJjke+zfpurPMNiCJwe343E1zmXg5 u1SfFaHVGq3EqFaAOWrMuSJDLbCg8u56LyzG47nvmvDnn0WguZ+rvYwNwiwscwpc+aTK vxdQDgaoc0RnhMVxDXO0wqraMAMtMjo0qMosdHLxDXsZRquyVQAv9RkOStJSKcpkjGlq yIeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=RmlWlWDJ9QVgbz0fxC+FOtFIuHq0VIi0amdUYAeMqWg=; fh=gQJd/L0qpDFnR9IAWMWKrRd8PtXxrtbSqDnZILD26sQ=; b=Q2mxKr/FSEISsxxBUIAV4b9qcrFOMLOcTQiOwIA8VOifiLAjRYlNcKzVg1iCNvckSW e9e2FcqS7V/rr0dYYtAqtdF0Ouw2NFJkWo0llxxV+AnxM74u3zo5kvA1J4GfhFwlN3GJ +vTlrUaIdv5coB+Hv8ORFFLR584F4+pHngWFaK9C3/3Okymk7x2t4OMqqevhuUfZfpW8 dqPkNF1K1SRblkd1yUS4HPIV7LDV4gDWQHahoWsZ19D4A6u3pJsuQby//yVqC3E6xVCo y4ELHOON1l4FLmsshBbwBGXSwBxTBegxbsiwJPoJukOfDCzJP5w9mvcjuzWDEW7n3GJX sMxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=pqzY82wA; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ICT8zEt5; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a17090a9f0600b002631de09798si12690216pjp.53.2023.07.03.06.30.48; Mon, 03 Jul 2023 06:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=pqzY82wA; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ICT8zEt5; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbjGCNJx (ORCPT + 99 others); Mon, 3 Jul 2023 09:09:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231299AbjGCNJq (ORCPT ); Mon, 3 Jul 2023 09:09:46 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE78E64; Mon, 3 Jul 2023 06:09:43 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 363Ckbts014532; Mon, 3 Jul 2023 13:09:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=RmlWlWDJ9QVgbz0fxC+FOtFIuHq0VIi0amdUYAeMqWg=; b=pqzY82wAteI4FowAEoGqg6ySM0mqDP92n2xbvc/RKev3w7O6CbRL5VUdR0xyJq9Z0UpD Nanqi+VHPmV6yi1y69zTKI/1sYSZlQqxYB+k2UAt/iAmUDzc1xQZKX7YBQIGZwe6rCY/ 6FbfY5Qe4UiiT2ydcCU6uDA/zid4GhaguFy0bNs8Pcgu0V6R+wO8W5+Lor/Ni8F/dSEX 5HwDy0EZ+WQwrGVoeGB3Sb/nfEecAynDYFPjYUn96+LCMjm2/goc0cUh3fZt1LkJreFw AkC9LcQoyfcka99Qjxvf2LHuuIJm3do0ChzRZCGgjnNgE8E0wk+50T+RyIVUiKpAM99U sA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rjar1an2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jul 2023 13:09:13 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 363BoiKg009663; Mon, 3 Jul 2023 13:09:12 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2106.outbound.protection.outlook.com [104.47.55.106]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rjak92cbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jul 2023 13:09:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+l+veNcSkbCR98J9zizNcf+QfJR4UyBip2axhM9VwMiB1TBhN4YczAKqPKEHwLu6kscn8s3VW6dk/erTAYcHI+dGqhhZq0GqFkYaqN6gtXn23+AVqiYuu9Ve7LAdpikOdbxi1jef43/NS0BihDNPRPyS6UuK/XCEwguh6E9234uzw2rFP7ULFfjOABeVWXYqakn+KYC2TraathsnSfHcly6icsugm5KxtuJs2eIBCO5AyBdr07FSeumpnVU76d/8/XXboh2/oORrN72SUuhsDC0qPFenDz5mAYQGYMEh+5h5X2T5XorSuokOpZpwPJ0hl0FSubLl9PzgBlD1hBqYw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RmlWlWDJ9QVgbz0fxC+FOtFIuHq0VIi0amdUYAeMqWg=; b=RiTpebNYz0tCo7QkraDDGNbQF08K7Mc7YI/lOClsN3fHT89rgNFReoh4ZUHlY8KNmhHJWXcaMnm1r14DdfiMkU9lIwubiQ/5exGolgWSzz1s10FCeEbBbtWtvvUw2IYaTXP4+Y7NqxZudikHRpOocFF20ZuuOaPxUQRlg16+9GD0oH8pHSlufnO7oZXKtFxAU3boR8K2PhotuRdZokHDPGyGVne8+6uqtbQhw7WvHPNv9o3Lt7zJYNl1/TvyyP81TFIhzbVX/kAKafELCzuEtE7Vj3rgASbKHtVkqPD8WbMiPOfucpuUJesU2L+wEs/5mdsS6uRZT7QNvUFcjzt15w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RmlWlWDJ9QVgbz0fxC+FOtFIuHq0VIi0amdUYAeMqWg=; b=ICT8zEt50YgYOdT9uU2gcPbm7fUwYdP35KkDPXmelFRHHW12kJZxeIIJSit+Qd0huSCf5EiTRnnKfj7bQSGPblwNEoJSWMw2KLIFaRmefIGRSTTnJ+jBfmaF9+lcgkRWkmBS622X+Q9OiIkxMKPEMqViByEluNjUJQwWbqxffp4= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CY8PR10MB7339.namprd10.prod.outlook.com (2603:10b6:930:7a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 13:09:10 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::e38:5b81:b87f:c1eb]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::e38:5b81:b87f:c1eb%7]) with mapi id 15.20.6521.023; Mon, 3 Jul 2023 13:09:10 +0000 Message-ID: Date: Mon, 3 Jul 2023 14:09:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH RFC 2/9] perf metrics: Don't iter sys metrics if we already found a CPU match To: Ian Rogers Cc: acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, renyu.zj@linux.alibaba.com, shangxiaojing@huawei.com, zhangshaokun@hisilicon.com, qiangqing.zhang@nxp.com, kjain@linux.ibm.com, kan.liang@linux.intel.com References: <20230628102949.2598096-1-john.g.garry@oracle.com> <20230628102949.2598096-3-john.g.garry@oracle.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO0P265CA0001.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:355::9) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CY8PR10MB7339:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e02f5c0-d1d8-40c4-9485-08db7bc6b098 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZAIpXSQIZIfU9MYKAsra3NUJ61+oGXhMH7YL710jT4CGzrEiGysMTG9ulibbX3dm9qd3aDw5BLL6luyJ4ss4I1jlV705IACBcDwofEadSBR1YivdjMrBFvV9B8vEd1Up+dF+BWuqDjmQg9xVDKhEA9b/KWnLLei4FVmOwW6hZHGwdf//wx05RRa36zs/AlR2bgCLwxIh8/TOGMle74xYklZlD1/Nkxc3xxbjIUOnVaZj/1uVqPDFP1KNChqhBw+KbjXOo7z+hkB/gHmVJZbgSlWJSou9osp2EywaWFfNKPj+wNZv4VkeuNiRpqSGhg8CfXOlt5eyBNbqUtEAhicQUarUx0Px7/MuQzWY4i8Qru9uxxrMxtqLKdTcS5G7cwoPvD//cHTYwqTBnws1eUcrVe8I0ro81XggnQ7rFehrM7syWoQDfGb36meYbI484JjuubzCPUtt90qCtljCkKRCQYOzwQqqVxcteNU8VVpq5Mtal9xjiNJ2QfTBNTeCIi0E6+oWMGrzdpqgUNTZrZCUWj7X1OGtIHgYIVt2PMYulc9reXplwIlGte09P5zzjY6uIj4c3Jxfs697YwQvVHVEPoelA23J1RUxIi1lVr4x+w+5O70/1S3W8Ook7tWtGIgWlenszevpPc3aFF7IC3ZEDw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(396003)(376002)(136003)(346002)(366004)(451199021)(38100700002)(2906002)(6486002)(36916002)(8936002)(8676002)(36756003)(41300700001)(6666004)(7416002)(5660300002)(478600001)(31696002)(53546011)(6916009)(66946007)(186003)(66476007)(6512007)(26005)(86362001)(6506007)(66556008)(4326008)(31686004)(316002)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dUYrYytSL1J5eEFiK3IzbXdHTVUrdWhKWVRtNmJYQktINjBEZnY3RDFKQlp4?= =?utf-8?B?NjBvaXo2ZmV2aHdpQjdLRzlleUt6VGxIcENvMDlmTXJSeTVYdE5rZmxWRzNR?= =?utf-8?B?WWRZdHBUOWY2aUgyRDVRN09qZ3VjL2tzakFUVUFQai9mT29ZcWJuMEM4cURK?= =?utf-8?B?b0crWUlnNC9Xa3dJTU9WZnBqRlp5SmQ0c051dW9hUDkvMGM0eW1XU0tBQk01?= =?utf-8?B?WTFVSThVaERDbjFmWnhiY3VhbkxKeWZ6bU5PWnJuTytIWUdNaC94dHFoN2FO?= =?utf-8?B?ZmNXM1p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-8?B?NU5lNkEramRONThvckxQbVF4Y085OG4vb1pSUzIzekhYU0dtdVBFU25vM3VI?= =?utf-8?B?WHZ2T0RQN1NJaWJ0cDEyanNLNUhDa20rV3JHMlRHTUZoQ0lycExkZm1pSm9s?= =?utf-8?B?Z0VtU2M3UGVmL0w2VGdNWGZMaXVrK1MvdlhhZDQ5eWQwY0w2RDEzYUlpMFND?= =?utf-8?B?eVVkSzRBakJ0UjRtbzJSb2pxaUlUYVJzdnBOblZSZ3ZSemwrbmljZFkzT0JU?= =?utf-8?B?amdMdWVwL2R0cmhwdlRnNFVPbC96TEpYelN5bUJ5aklYSXJIYVZXakRWY2Yr?= =?utf-8?B?Rk55RzFrNXdvODBYYjBGNk5XaXdWWThTQlBjaVNmYkhZeW85RGlJdU1TL2xG?= =?utf-8?B?eFpKbFA5bk5DdGFDNGV0Y1FMc2ZlMmdSNFdCZHZEN1BMZDNnQldDTE5WeHdv?= =?utf-8?B?RWRLd1Q5Q1ZHSGxaQ2hqc0pobDN6c2ZNaVNkZVYxVEwvYUFXa0N1cXgwZkRE?= =?utf-8?B?TDNubjhJeVY1NjMxcXJ3N3g0bUxnY3hic0ZPQzAyckhmTk5lVkZkRVY3RllD?= =?utf-8?B?UGZ2N2dkMzhEZE1QS3k5c2c1UURzZGRPYVRwaS94Q3JuYWdMeUtuWm9KcmFK?= =?utf-8?B?S0tMNFlzYmFoamZYVVg2YTJLZUJkMkpFTW5LL2tMTG1hbTh5Z1QrcGRwZ0Rv?= =?utf-8?B?ZmdreEhVSUtRb08zKzcrcnQ2YmE3MTdEcGZxRDhRPT0=?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e02f5c0-d1d8-40c4-9485-08db7bc6b098 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2023 13:09:10.1899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: g8VHg1nGuk9yqHiYfXdXj6RBcIf1iu2RGd0kZzBa36NltO3eSSECzSiNqD23NU8DGsU2bUndZqXwT2bqiA+e9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB7339 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-03_10,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307030119 X-Proofpoint-ORIG-GUID: JIxZczyvPcyTgQ4lVfDWo9ME_NeDgyWN X-Proofpoint-GUID: JIxZczyvPcyTgQ4lVfDWo9ME_NeDgyWN X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/06/2023 18:41, Ian Rogers wrote: > On Wed, Jun 28, 2023 at 3:30 AM John Garry wrote: >> In metricgroup__add_metric() we still iter the sys metrics if we already >> found a match from the CPU table, which is pretty pointless, so don't >> bother. >> >> Signed-off-by: John Garry >> --- >> tools/perf/util/metricgroup.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c >> index 4389ccd29fe7..8d2ac2513530 100644 >> --- a/tools/perf/util/metricgroup.c >> +++ b/tools/perf/util/metricgroup.c >> @@ -1261,6 +1261,12 @@ static int metricgroup__add_metric(const char *pmu, const char *metric_name, con >> >> has_match = data.has_match; >> } Hi Ian, >> + >> + if (has_match) { >> + ret = 0; >> + goto out; >> + } >> + > I think this can just be: > > if (!has_match) But ret has no initial value > > However, I'm not sure I agree with the intent of the change. We may > have a metric like IPC and want it to apply to all types of CPU, GPU, > etc. If we short-cut here then that won't be possible. A few points to make on this: - Currently we don't have any same-named metrics like this, so not much use in supporting it in the code (yet). - Even if we had some same-named metrics, I am not sure if it even works properly. Do we have any uncore PMU metrics which have same name as CPU metrics? - Further to the previous point, do we really want same-named metrics for different PMUs in the future? I think event / metric names need to be chosen carefully to avoid clash for other PMUs or keywords. For your example, if I did ask for IPC metric, I'd like to be able to just know I'm getting IPC metric for CPUs or some other PMUs, but not both. Thanks, John >