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