[PATCH v2] perf test amd: Fix build failure with amd-ibs-via-core-pmu.c
Ravi Bangoria
ravi.bangoria at amd.com
Fri Jun 2 21:46:50 PDT 2023
Since amd-ibs-via-core-pmu.c was applied via Peter's tree, some of
the changes came via Arnaldo's tree did not reflect 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 at amd.com>
---
v1->v2:
- Remove unnecessary perf_pmus__scan(NULL) as suggested by Ian.
tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c | 5 +----
1 file changed, 1 insertion(+), 4 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..78b1902f6f59 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,7 @@ 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);
-
- ibs_pmu = perf_pmu__find("ibs_op");
+ ibs_pmu = perf_pmus__find("ibs_op");
if (!ibs_pmu)
return TEST_SKIP;
--
2.40.1
More information about the linux-arm-kernel
mailing list