Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3715559rdb; Wed, 13 Sep 2023 23:39:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuQIsDZbB3Udye13nhA/xDb9oMVZTHR3lU7IGtDeHov//81x/XOYQsq0G4GlLJNpBdzgfo X-Received: by 2002:a05:6358:4327:b0:132:d32d:d929 with SMTP id r39-20020a056358432700b00132d32dd929mr5405517rwc.20.1694673574389; Wed, 13 Sep 2023 23:39:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694673574; cv=pass; d=google.com; s=arc-20160816; b=jRlrC19YFxDfcdGyJyjCkk0CZqvy2Nj0IKC2dz1440qQPJikG220bPFq1YWJzB8oRp nMW+xTQEdbbN2bQ13YcLM2EeP20PgYpoj47I0f0UMjbldU6BxX/V+DB8DS79wXnCq2Q0 MK90k2SSnTnjMilONKClxi+GtzFAxAxuP3xAaIaiga7C1H8dWe20RIdF9Fx2hTS0Pj+H AWiXjTBqra27Hrk3W0b4bHZPiPn/hijn4Wb9AURnbm0523ywkHgjBxO2TElFtL7YEyYQ CezNESP6NPZ4+9aYYkh//YFYDK6004qNKHpbxcBWrzwuj+Nv3mNmly/0KV2Rd3CniroI RMKQ== 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=2UUYW/2X6H+0PywFb+BQ5OCaYXegNEaWDLan2IfY7ic=; fh=Y2NfqhXUmv1hQtUloD+SJB9zJ56uxyML3TSaGKj0GuE=; b=0+ajitMDQx1I+K47Kc6C9QJKuJLbiJfDN9BJ31xfSXcs0415ivbwgl1Ae7WbsaAPBh t5JFz+3qqDBvWOquEUyYnSpurEXHN3aVDJwmBdRkcbJk6Rr84x7ZBemCmQ48FKSxdeQz wX/NfQixgntdqlBwlHQWKHM/eGZ//zE7TlhGVvZ/oWI+53GLNRUWG/m3PRX8X/LPS5kQ n976SVu4rShoUD5gGFNpWu0Wufkfnd8pai/L2lrhVf6bMK7ZzW9EKiHhd00SRv0mBKie EE/l8dI3lauOvfiBUA56LVllKyV1yx7XikRTHc0WcS+gQyuiq/9nWgLQgwSiqWHzdGvz Cj4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=v9JrMNji; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gMerAVrX; 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 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x71-20020a63864a000000b00565e87d86ffsi886253pgd.52.2023.09.13.23.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 23:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=v9JrMNji; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gMerAVrX; 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 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 103A380740F4; Wed, 13 Sep 2023 23:39:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235215AbjINGj3 (ORCPT + 99 others); Thu, 14 Sep 2023 02:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232171AbjINGj2 (ORCPT ); Thu, 14 Sep 2023 02:39:28 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE17CCD; Wed, 13 Sep 2023 23:39:24 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38E5cJT1005599; Thu, 14 Sep 2023 06:38:34 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=2UUYW/2X6H+0PywFb+BQ5OCaYXegNEaWDLan2IfY7ic=; b=v9JrMNjiFMtbQB3LacshPeoCbY7BGlmsMbegu+5Gek7oTt2shKENEEHSbiw/xl0YNO05 7iY4WJyFvwnSuQghhbvX5IWVTEbRA+mAJ0NVCs+a3izFu9Mta5Vp1Wot43YbhckqbKPW 7/pTNV+zMMmObUcRsQUZQF+s0FytORQLccoX+QznW+yss+lxFIi5yyOcjRA4IzyY5T2F 3n9qjmQUi6g4p2UugTL0tiYn1qGU7FVPwJfxzNJ0C8mZC5HRWH5HEmGZGOXfZzcJr0rT s8wB6tLd9YuhdsjROPmL6XAAXG2+DI8COBGAUN5uV+fAQgWqKBXKc+Hf4uk0bPCOdHwZ NQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t2y9kv9ca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2023 06:38:34 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38E67pac004332; Thu, 14 Sep 2023 06:38:33 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3t0f591bk1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2023 06:38:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0JM2hwOSts9yfgTf4uiQw26mIYtARz9HjHrnj9P2DLXhDttvhHZe976ymfGKi54TCCBlZUG1ovL2dcogTIglTgQRr8IahfuVSfrMlONwusGZzBf8X+PH1WyiI8HAoEtX3kiDZKloCXRzQT2x2D2qK5+1SrtHY6v2LCTnT+5ZfO7wej2CxboVpnqeSwH5UiJzaBxRkv4lUMAp/4YJU8DsislI1NbwSIFVphlUGQkZZOeT+iQI8gEh2/flraH/roVizqX9Bh4prLIr1eb9YxnGSDn4br7S0Ge+7Rys0xYyp5h1YDUnX4eDRxO1fUM+shhrPCsI0ee8LZR7jjcorxvDw== 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=2UUYW/2X6H+0PywFb+BQ5OCaYXegNEaWDLan2IfY7ic=; b=VC64eHWyrW3F/Q7ES5iUWiAiag6CKd+whdH1tvAnHGzTNWI0eYVHbahqI+J6XbJWIemEHJGp2FYxEdU4Ia3FVFxDzCTnTDLN6otHU64VklvimI12ERp3rHpHE8xplpy6WCQKOjF19JZVvS8gFxPVmjbYWKuhA22l36rU3+OYQYHTDxRbBoy6m+veLki1WJytDnt3XKrqg+ySXv9t7CdNvijIIB9q7y85fVmadBXVst6sq8+eXR+5nEL3yskiov4fthWukKZrcdtv28szKuy1n3ZKqQZAtJQsS4XEdOIlFitGY1dCv7PVcnt4dXk0IJFr1ZBNDG2TbxpIyvOFRtSrvQ== 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=2UUYW/2X6H+0PywFb+BQ5OCaYXegNEaWDLan2IfY7ic=; b=gMerAVrXOzHLdxpjYIUb8MZ7tidLINYNS3b4jrxEhiQHH29VagbZTlO+xLFC9zuXcB7dXJong3NUWX8mM1024PrrYo3CjR2vf6b+alkor1bgAFZ5XOFMqAS67xAt3IDvs4Clz0jUyuUezEpYh/cqeaGTG6rEwLKXV4l/6jfHvxw= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by MN2PR10MB4256.namprd10.prod.outlook.com (2603:10b6:208:1db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.31; Thu, 14 Sep 2023 06:38:31 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce%7]) with mapi id 15.20.6792.019; Thu, 14 Sep 2023 06:38:30 +0000 Message-ID: Date: Thu, 14 Sep 2023 07:38:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH v3 1/3] perf pmu: Move pmu__find_core_pmu() to pmus.c To: James Clark , linux-perf-users@vger.kernel.org, irogers@google.com, acme@kernel.org Cc: Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Haixin Yu , Jing Zhang , Eduard Zingerman , Ravi Bangoria , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230913153355.138331-1-james.clark@arm.com> <20230913153355.138331-2-james.clark@arm.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: <20230913153355.138331-2-james.clark@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0327.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:390::10) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|MN2PR10MB4256:EE_ X-MS-Office365-Filtering-Correlation-Id: e1f59c27-2b9a-488d-8bed-08dbb4ed35b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K2bbDmwdSIvEjSm4mWtBNqf9UuhkPASiyui+nGOCLulmQmZZE8qEts6NbPhA1SF2od2xnMbQuYaMX1hv0sW1+pRr9dfi5R+K/vJdou+i1Pe5rHtt2GQYoXRAK4LaLGSucsNzUsfthWQ41j7p2owuY6u8g4GdWabUkY6P84TMD971Pezf1d4pun8zKOKKaKNcDiDKOEzwYa0cz98rqEdm9AmUPgSJ6fwaZBF/lEDi1tyWxrL9bPhIRqM4o8LSkR2JpC7ja6HSUoais4qXRKRyZdxAE/IlMfkr1f8GxBA56rreAThJMsTZMxvpTWVg2CilyUHuJbblSKFM1rbzjOnVKWOrEU+yw/lk6JEfq/o0ks00zFm2NvUWLl74i9oAiznkoPAQhE1ICZlvXNl/AAxAQ6tYSTIOH2/WhKVd5/qX2PXJ2LSXtMAa4ssmPfo9DsYz0GA7pRC2gnatbJjRRHwyCWiqKfjfQ42+RHIFteHNZowUfvjl5iacxR0Eqb1yx/bsdg39UU/SfBH367GRqipcaIuPXaPGGTX/Z1IzRplgBGI0ZDlxGRcKadnl2Pap660ibXK3r3DC6wnYnkp5PY98F0D+p1mtQ8UyaszhrBKCbHQjD2vDUQ0lvAix/J5YXctp2lTOTvzpK+xtwpLtjaxw3cWHHchwy7iTl0yhEunCUmqD3DSvie3lpGQY0Nm8Jj4t 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:(13230031)(366004)(396003)(376002)(136003)(39860400002)(346002)(451199024)(1800799009)(186009)(31686004)(36916002)(53546011)(6506007)(6666004)(6486002)(38100700002)(86362001)(31696002)(83380400001)(36756003)(2906002)(6512007)(7416002)(478600001)(26005)(66476007)(2616005)(8676002)(8936002)(4326008)(54906003)(41300700001)(5660300002)(66946007)(66556008)(316002)(101420200003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T0dlZWhyOG9aVXFYdWRFZithdWpJTnhhTmxuZWxjSDAvTUVPU3l5TjZXaFdT?= =?utf-8?B?T3J2aU1rUHgwbUdOZ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aW5SR2pCdXN5RXRtbjdxZWNoSW8rTzda?= =?utf-8?B?THNQOGptRlZlbTY5dzNPU0dxYWZzMURvNTFZWk1JcXJ2UmNrUDdiNGkrN1du?= =?utf-8?B?djEvQWpycEU0QlRJbENLQlg4eEJhVUFZN1gzQTY5ajUxd3Vhbm03OXdLc1Jw?= =?utf-8?B?Qlg0QT09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1f59c27-2b9a-488d-8bed-08dbb4ed35b1 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2023 06:38:30.6812 (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: 9aZDG20UwEfchIYSwnHOtImuWMb5WDzGIvOpbCDDvGvgK/0GjR1TcdEkEbBAXjUK8k/0RDTF/yU17tX+UflEIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4256 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-14_03,2023-09-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309140058 X-Proofpoint-GUID: fPCMNZBCkly69R17CkTGLhlSS01_PmhO X-Proofpoint-ORIG-GUID: fPCMNZBCkly69R17CkTGLhlSS01_PmhO Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 23:39:30 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email On 13/09/2023 16:33, James Clark wrote: > pmu__find_core_pmu() more logically belongs in pmus.c because it > iterates over all PMUs, so move it to pmus.c > > At the same time rename it to perf_pmus__find_core_pmu() to match the > naming convention in this file. > > list_prepare_entry() can't be used in perf_pmus__scan_core() anymore now > that it's called from the same compilation unit. This is with -O2 > (specifically -O1 -ftree-vrp -finline-functions > -finline-small-functions) which allow the bounds of the array > access to be determined at compile time. list_prepare_entry() subtracts > the offset of the 'list' member in struct perf_pmu from &core_pmus, > which isn't a struct perf_pmu. The compiler sees that pmu results in > &core_pmus - 8 and refuses to compile. At runtime this works because > list_for_each_entry_continue() always adds the offset back again before > dereferencing ->next, but it's technically undefined behavior. With > -fsanitize=undefined an additional warning is generated. > > Using list_first_entry_or_null() to get the first entry here avoids > doing &core_pmus - 8 but has the same result and fixes both the compile > warning and the undefined behavior warning. There are other uses of > list_prepare_entry() in pmus.c, but the compiler doesn't seem to be > able to see that they can also be called with &core_pmus, so I won't > change any at this time. > > Signed-off-by: James Clark > --- Reviewed-by: John Garry