aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/pmu.c
diff options
context:
space:
mode:
authorGravatar Arnaldo Carvalho de Melo <acme@redhat.com> 2023-08-04 10:06:38 -0300
committerGravatar Arnaldo Carvalho de Melo <acme@redhat.com> 2023-08-04 10:06:38 -0300
commitbf1842996aaa726bf3d108b41f366b88680acbe6 (patch)
treee00bac5f0191e8e6dc8be26f2efda8c073051e9e /tools/perf/util/pmu.c
parentperf hists browser: Fix the number of entries for 'e' key (diff)
parentMerge tag 'perf-tools-fixes-for-v6.5-2-2023-08-03' of git://git.kernel.org/pu... (diff)
downloadlinux-bf1842996aaa726bf3d108b41f366b88680acbe6.tar.gz
linux-bf1842996aaa726bf3d108b41f366b88680acbe6.tar.bz2
linux-bf1842996aaa726bf3d108b41f366b88680acbe6.zip
Merge remote-tracking branch 'torvalds/master' into perf-tools-next
To pick up the fixes that were just merged from perf-tools/perf-tools for v6.5. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.c')
-rw-r--r--tools/perf/util/pmu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index b6654b9f55d2..d5406effc169 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1440,6 +1440,17 @@ void perf_pmu__del_formats(struct list_head *formats)
}
}
+bool perf_pmu__has_format(const struct perf_pmu *pmu, const char *name)
+{
+ struct perf_pmu_format *format;
+
+ list_for_each_entry(format, &pmu->format, list) {
+ if (!strcmp(format->name, name))
+ return true;
+ }
+ return false;
+}
+
bool is_pmu_core(const char *name)
{
return !strcmp(name, "cpu") || !strcmp(name, "cpum_cf") || is_sysfs_pmu_core(name);