xref: /openbmc/linux/tools/perf/util/pmus.h (revision 3ddc8b84)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PMUS_H
3 #define __PMUS_H
4 
5 struct perf_pmu;
6 struct print_callbacks;
7 
8 int pmu_name_len_no_suffix(const char *str, unsigned long *num);
9 
10 void perf_pmus__destroy(void);
11 
12 struct perf_pmu *perf_pmus__find(const char *name);
13 struct perf_pmu *perf_pmus__find_by_type(unsigned int type);
14 
15 struct perf_pmu *perf_pmus__scan(struct perf_pmu *pmu);
16 struct perf_pmu *perf_pmus__scan_core(struct perf_pmu *pmu);
17 
18 const struct perf_pmu *perf_pmus__pmu_for_pmu_filter(const char *str);
19 
20 int perf_pmus__num_mem_pmus(void);
21 void perf_pmus__print_pmu_events(const struct print_callbacks *print_cb, void *print_state);
22 bool perf_pmus__have_event(const char *pname, const char *name);
23 int perf_pmus__num_core_pmus(void);
24 bool perf_pmus__supports_extended_type(void);
25 char *perf_pmus__default_pmu_name(void);
26 
27 #endif /* __PMUS_H */
28