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