* [PATCH v1] perf test: Correct hwmon test PMU detection
@ 2024-11-18 5:26 Ian Rogers
2024-11-22 22:17 ` Namhyung Kim
0 siblings, 1 reply; 2+ messages in thread
From: Ian Rogers @ 2024-11-18 5:26 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Kan Liang, linux-perf-users,
linux-kernel
Use name to avoid potential other hwmon PMUs.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/tests/hwmon_pmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c
index 9f44093f18df..1e5f93aaaf5f 100644
--- a/tools/perf/tests/hwmon_pmu.c
+++ b/tools/perf/tests/hwmon_pmu.c
@@ -173,7 +173,8 @@ static int do_test(size_t i, bool with_pmu, bool with_alias)
}
evlist__for_each_entry(evlist, evsel) {
- if (!perf_pmu__is_hwmon(evsel->pmu))
+ if (!evsel->pmu || !evsel->pmu->name ||
+ strcmp(evsel->pmu->name, "hwmon_a_test_hwmon_pmu"))
continue;
if (evsel->core.attr.config != (u64)test_events[i].config) {
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] perf test: Correct hwmon test PMU detection
2024-11-18 5:26 [PATCH v1] perf test: Correct hwmon test PMU detection Ian Rogers
@ 2024-11-22 22:17 ` Namhyung Kim
0 siblings, 0 replies; 2+ messages in thread
From: Namhyung Kim @ 2024-11-22 22:17 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
Kan Liang, linux-perf-users, linux-kernel, Ian Rogers
On Sun, 17 Nov 2024 21:26:38 -0800, Ian Rogers wrote:
> Use name to avoid potential other hwmon PMUs.
>
>
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-22 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-18 5:26 [PATCH v1] perf test: Correct hwmon test PMU detection Ian Rogers
2024-11-22 22:17 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®