diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-04 15:06:38 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-04 15:06:38 +0200 |
commit | bf1842996aaa726bf3d108b41f366b88680acbe6 (patch) | |
tree | e00bac5f0191e8e6dc8be26f2efda8c073051e9e /tools/perf/util/pmu.c | |
parent | perf hists browser: Fix the number of entries for 'e' key (diff) | |
parent | Merge tag 'perf-tools-fixes-for-v6.5-2-2023-08-03' of git://git.kernel.org/pu... (diff) | |
download | linux-bf1842996aaa726bf3d108b41f366b88680acbe6.tar.xz 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.c | 11 |
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); |