From patchwork Fri Jun 2 05:29:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravi Bangoria X-Patchwork-Id: 13264716 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91779C7EE2A for ; Fri, 2 Jun 2023 05:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:From:Cc: References:To:Subject:Date:Message-ID:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5hGgLWJaRlvOdPbttxmvMLPy2ds2gUVswDUYEaWLpfw=; b=cI3FchdLW7VUbN TCF0I3zEcvgQR0AKt8knxe6vz3ejGUu/HqAMZJ3iwewgFOGdBkKISlpo+uBTln1M9StU0jgcEGTU1 GVuCqc6xGmWsfniso/KSkxvrvxPW8/9P8Q7cdrmb0L4YpY7Ba7x9+e8RhTRoaga3bXBkU1WWi/3SY 6cyq3MrA1TcJPUVGcuejHjuM+G85ZGbaLDm2u05GYFy7Yu+f+sTmG2g79r3MqFubilVlZdB7YU6n5 9acSncCaNcHHz0g9qBgIoVnG5OuhI8/2vIejHqyTPc3oS52KDtvL1ORFAYMgYGsK2FBQR0IbO8Siq DVg1uYArBputldRPDcfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4xNG-005mgG-0T; Fri, 02 Jun 2023 05:30:54 +0000 Received: from mail-co1nam11on2060b.outbound.protection.outlook.com ([2a01:111:f400:7eab::60b] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4xND-005mf2-0M for linux-arm-kernel@lists.infradead.org; Fri, 02 Jun 2023 05:30:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CJkY4iYx+S+ou7mZFfayIoBW5old8TM2TLFQwH9KAN2lb7rqMOFe5E7IjWOeQHhz3qv6E+j1y3G9jcAkOoH0fP8i0Z3nc0cLuu+cJxAqy5VAaWyHGntqdPQWpvksUCvrrJYsG/7dlYIyx+L3oHJhSLglO2LcxBwIbS6NCKmvzv20Idi1EU6s4RWYaH4zOtspttLKd79Fi3lGTrgED7qMzASX+XUFGDm9oLmNNrQBdo75yDtHFIKCGk0m022bsGSjtz5EaWTSP0tw30yC/SzEWvQDrwpqTqwLp5NKDwWg8igywrm2VYltrTCYDRIjw6ejHBk+QEyk/sUBfie7zbbDwA== 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=AO02Te0byOtwNzL9COuG3dUT7OfVBL5a7L/slCpYP/E=; b=AGngxEyCwmmSUgdFrLtMAlkLVGrJdgEN0e+iG2kbw7RDiDpiO9t0e4wlv0EKUOwtw3oM5gSveRH5beh7wBaeiQ+sVwrrpfGHhndARno8kBAplWbG1bc+S4ZALYxhH8+3QrRGhVYNa/Cn+G6Ytga6BRskJ3/qbDL2ceaaRN6RIGapYIq0SV1V6R0Qae2U5AQLo2maj6C7pSHMFtIayrwAWFwPDgs+bWiadndicylCsNe/Dy6b/rWiLsGTUxMlvBrrnjKXwDflTi36iTmdduJPX2LgEoPz0aSQlQITstvaTdqV5cNBUbIJRA86z+XkdEH0EMJNwzfALjeEJ8dmpBkRkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AO02Te0byOtwNzL9COuG3dUT7OfVBL5a7L/slCpYP/E=; b=WH4TLiCBoQfvmAJz+5gLmPF8Vlzr3cYn5A6QPiEhq9WJu+j0abAKD9Eg2GWSWTtbxJtBsKPqbolDnhIQtQHi2OzQ+y/iVLvy3KXklVZfnvSM5JCPJBm0IikJSnmU9A2GrdBLrGt2k51c6fNjUCKhvTB20Mjd9Dk/eHE19Hws2s4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS0PR12MB6584.namprd12.prod.outlook.com (2603:10b6:8:d0::6) by CY8PR12MB8409.namprd12.prod.outlook.com (2603:10b6:930:7f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Fri, 2 Jun 2023 05:30:41 +0000 Received: from DS0PR12MB6584.namprd12.prod.outlook.com ([fe80::9c51:cf05:a2d3:4061]) by DS0PR12MB6584.namprd12.prod.outlook.com ([fe80::9c51:cf05:a2d3:4061%6]) with mapi id 15.20.6455.020; Fri, 2 Jun 2023 05:30:41 +0000 Message-ID: Date: Fri, 2 Jun 2023 10:59:55 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: [PATCH] perf test amd: Fix build failure with amd-ibs-via-core-pmu.c -- Was: Re: [PATCH v5 27/34] perf pmu: Separate pmu and pmus Content-Language: en-US To: Ian Rogers , Arnaldo Carvalho de Melo , Stephen Rothwell References: <20230527072210.2900565-1-irogers@google.com> <20230527072210.2900565-28-irogers@google.com> Cc: Suzuki K Poulose , Mike Leach , Leo Yan , John Garry , Will Deacon , James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kajol Jain , Jing Zhang , Kan Liang , Zhengjun Xing , Madhavan Srinivasan , Athira Rajeev , Ming Wang , Huacai Chen , Sandipan Das , Dmitrii Dolgov <9erthalion6@gmail.com>, Sean Christopherson , Ali Saidi , Rob Herring , Thomas Richter , Kang Minchul , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org From: Ravi Bangoria In-Reply-To: <20230527072210.2900565-28-irogers@google.com> X-ClientProxiedBy: PN3PR01CA0052.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:98::17) To DS0PR12MB6584.namprd12.prod.outlook.com (2603:10b6:8:d0::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB6584:EE_|CY8PR12MB8409:EE_ X-MS-Office365-Filtering-Correlation-Id: 13215103-9478-4609-0f02-08db632a80e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4qYd9qkbMXC9Eg7ulO98rd/WFUi93SK6fn0ypUho7TdQLV8aC4waQ1KeCmZ1fKkzIVj9QmmYyPN5tWfoH72bWkhzF81sEvAE1UQBFUXMPC2jiFbFvFpQqa+YUm5geWD94SuTpd67lboDd/kiief1zDjKXo/YJmxeBk0yCZWLG/S4ssEmMzCcp2Js8vknlj40VtEWBzsacqFBKEJs2eyK8MUvX/DLcLj0I/MlxgTZsXeSfXgHQAahcN3qbYb5IoVTCvqi4H0rj0jslRpTCJa0X2OuEVWgTU2X7LNjaGBcf+WHWLu/hhCMbr5y4wpkzkNJ1jweCqBoR66I7Bo9u7Jni8BFPKgQsPfw37CMDoHeuuO19ZELAst9Q/7tgjqrXcmq+l5ej8Hmmx9piRaTB/orj71JYeRUjkpfx+vZX+Hjx1JfF+5lJGGUR1vK2dJaWN/P1lh4s2j+mAIXdxrRZ0U+SerN/bsQ0tTCy2hnb2polKbfeGYShSeIRZRwnz9UFlw75KLgbt4mz28mLKtz1iT0PRP8/kHODZWJqODKm5O4gosrQ1WGF9wYnY2u2Ab5fZ5kDujORBOnYkpbIzxds85Cc6JeGmbD1PvgjsZZd0l2WpA03uLc5E8oOY/gTjtvpIaOn/w0PH/5BZ6LC7PlNTrJ6Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6584.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(136003)(366004)(376002)(396003)(451199021)(478600001)(6512007)(2616005)(6506007)(26005)(53546011)(36756003)(186003)(83380400001)(6486002)(41300700001)(6666004)(966005)(38100700002)(4326008)(66556008)(66476007)(66946007)(316002)(44832011)(7416002)(7406005)(86362001)(31696002)(2906002)(5660300002)(8936002)(8676002)(31686004)(54906003)(110136005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LsgrINz2MeYq4rQDC9AApPgjnxaM?= =?utf-8?q?0DXoU5hpIjheH0WiksJr+mKQvh9C0eUEREpv6/VF6wUDh/1K+9Qcg7j2ABvY17eh1?= =?utf-8?q?Y0TsK9bas95APpVhbMCF2m4xCdjLJ5w1L5lS3xi0wp8UiQcqqBz9+tUUMxwu2fYNk?= =?utf-8?q?AqkiVMO4A4r1beDIUiUVfdQKmzosrlm2nmfaK7MgTXOdgDAZMZAe3NPFAdnOu5Naj?= =?utf-8?q?5I/0eWvv6dr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f3ATTTEOSDkdAMoJzLakxc2irmpuciZUJ4zdpiGikgqGVJf1Zh2ZysGysq/94Vxw?= =?utf-8?q?7vQvOhG9zNJqLbMVtQUT/e74R7Gar9f2zp3Fq+R3u68xn1k650YtYaHMk2cteV2hG?= =?utf-8?q?omwCmTyYVFwWs6gvQiy0FlNVn2nEc/xSuD/JOGIVxA3CYLWi+BDkEbKNgD1Mc4mWk?= =?utf-8?q?kDCZZyauDulNEA/nM+t8hR2pdXGf4TLgdKazXmXDoHxIvXBGG5qgXy569iUmUV2PO?= =?utf-8?q?dDRmtf0jua15evcFqvo89vE3TFP/RgB326oG3ufn6E0r23HNHfb28qbVv5I6WYG/f?= =?utf-8?q?9PNkieWiLzEI81v2zSZa8ecFQhgzFk7P1hhN687FQlvM0H5lvbB81IqSQXmrXe68l?= =?utf-8?q?xgAENRyv3IsFsHo7lfTWdJBq8wPJWFwYkNY7bYC0MO5iD3V0mP6FME2oU9DXafQBY?= =?utf-8?q?05en242ALfBr?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13215103-9478-4609-0f02-08db632a80e7 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6584.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 05:30:41.0551 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CEH8ykFSdZSs6ozhVvvkSHGw8Yp2kiuKCym9hWHQUi6muYGMPicvtfn0NVyLPZREQ5trMkWref6CBTxmLcPSOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8409 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230601_223051_154763_E5C68F36 X-CRM114-Status: GOOD ( 17.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27-May-23 12:52 PM, Ian Rogers wrote: > Separate and hide the pmus list in pmus.[ch]. Move pmus functionality > out of pmu.[ch] into pmus.[ch] renaming pmus functions which were > prefixed perf_pmu__ to perf_pmus__. I'm seeing perf tool build failures on linux-next because a patch[1] went in via Peter's tree needed some changes done by this patch. [1]: https://lore.kernel.org/lkml/168372562075.404.10852387134590654382.tip-bot2@tip-bot2 Below patch fixes the issue. From c041b94df00baea024b64d4b19e37ee827484e74 Mon Sep 17 00:00:00 2001 From: Ravi Bangoria Date: Thu, 1 Jun 2023 15:23:22 +0530 Subject: [PATCH] perf test amd: Fix build failure with amd-ibs-via-core-pmu.c Since amd-ibs-via-core-pmu.c was applied via Peter's tree, some of the changes came via Arnaldo's tree did not reflected in this file, which is causing build failures. arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: error: ‘pmus’ undeclared (first use in this function) 47 | if (list_empty(&pmus)) | ^~~~ arch/x86/tests/amd-ibs-via-core-pmu.c:48:17: error: implicit declaration of function ‘perf_pmu__scan’; did you mean perf_pmus__scan’? [-Werror=implicit-function-declaration] 48 | perf_pmu__scan(NULL); | ^~~~~~~~~~~~~~ | perf_pmus__scan arch/x86/tests/amd-ibs-via-core-pmu.c:50:19: error: implicit declaration of function ‘perf_pmu__find’; did you mean perf_pmus__find’? [-Werror=implicit-function-declaration] 50 | ibs_pmu = perf_pmu__find("ibs_op"); | ^~~~~~~~~~~~~~ | perf_pmus__find Fix those. Fixes: 1eaf496ed386 ("perf pmu: Separate pmu and pmus") Signed-off-by: Ravi Bangoria --- tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c b/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c index 2902798ca5c1..1e08b2455725 100644 --- a/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c +++ b/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c @@ -44,10 +44,10 @@ int test__amd_ibs_via_core_pmu(struct test_suite *test __maybe_unused, int ret = TEST_OK; int fd, i; - if (list_empty(&pmus)) - perf_pmu__scan(NULL); + /* No way to know whether pmus list is already populated or not. */ + perf_pmus__scan(NULL); - ibs_pmu = perf_pmu__find("ibs_op"); + ibs_pmu = perf_pmus__find("ibs_op"); if (!ibs_pmu) return TEST_SKIP;