xref: /linux/tools/perf/util/tp_pmu.h (revision f4f346c3465949ebba80c6cc52cd8d2eeaa545fd)
1d002aab8SIan Rogers /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2d002aab8SIan Rogers #ifndef __TP_PMU_H
3d002aab8SIan Rogers #define __TP_PMU_H
4d002aab8SIan Rogers 
5*45b6e281SIan Rogers #include "pmu.h"
6*45b6e281SIan Rogers 
7d002aab8SIan Rogers typedef int (*tp_sys_callback)(void *state, const char *sys_name);
8d002aab8SIan Rogers typedef int (*tp_event_callback)(void *state, const char *sys_name, const char *evt_name);
9d002aab8SIan Rogers 
10d002aab8SIan Rogers int tp_pmu__id(const char *sys, const char *name);
11d002aab8SIan Rogers int tp_pmu__for_each_tp_event(const char *sys, void *state, tp_event_callback cb);
12d002aab8SIan Rogers int tp_pmu__for_each_tp_sys(void *state, tp_sys_callback cb);
13d002aab8SIan Rogers 
14*45b6e281SIan Rogers bool perf_pmu__is_tracepoint(const struct perf_pmu *pmu);
15*45b6e281SIan Rogers int tp_pmu__for_each_event(struct perf_pmu *pmu, void *state, pmu_event_callback cb);
16*45b6e281SIan Rogers size_t tp_pmu__num_events(struct perf_pmu *pmu);
17*45b6e281SIan Rogers bool tp_pmu__have_event(struct perf_pmu *pmu, const char *name);
18*45b6e281SIan Rogers 
19d002aab8SIan Rogers #endif /* __TP_PMU_H */
20