lkml.org 
[lkml]   [2023]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
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
From
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 <ravi.bangoria@amd.com>
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 <ravi.bangoria@amd.com>
---
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;

--
2.40.1
\
 
 \ /
  Last update: 2023-06-02 07:31    [W:0.278 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site