xref: /openbmc/linux/tools/perf/util/print-events.h (revision 7effbd18)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_PRINT_EVENTS_H
3 #define __PERF_PRINT_EVENTS_H
4 
5 #include <linux/perf_event.h>
6 #include <stdbool.h>
7 
8 struct event_symbol;
9 
10 struct print_callbacks {
11 	void (*print_start)(void *print_state);
12 	void (*print_end)(void *print_state);
13 	void (*print_event)(void *print_state, const char *topic,
14 			const char *pmu_name,
15 			const char *event_name, const char *event_alias,
16 			const char *scale_unit,
17 			bool deprecated, const char *event_type_desc,
18 			const char *desc, const char *long_desc,
19 			const char *encoding_desc);
20 	void (*print_metric)(void *print_state,
21 			const char *group,
22 			const char *name,
23 			const char *desc,
24 			const char *long_desc,
25 			const char *expr,
26 			const char *threshold,
27 			const char *unit);
28 };
29 
30 /** Print all events, the default when no options are specified. */
31 void print_events(const struct print_callbacks *print_cb, void *print_state);
32 int print_hwcache_events(const struct print_callbacks *print_cb, void *print_state);
33 void print_sdt_events(const struct print_callbacks *print_cb, void *print_state);
34 void print_symbol_events(const struct print_callbacks *print_cb, void *print_state,
35 			 unsigned int type, const struct event_symbol *syms,
36 			 unsigned int max);
37 void print_tool_events(const struct print_callbacks *print_cb, void *print_state);
38 void print_tracepoint_events(const struct print_callbacks *print_cb, void *print_state);
39 
40 #endif /* __PERF_PRINT_EVENTS_H */
41