]>
Commit | Line | Data |
---|---|---|
45178a92 SL |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef __PERF_BPF_EVENT_H | |
3 | #define __PERF_BPF_EVENT_H | |
4 | ||
5 | #include <linux/compiler.h> | |
e4378f0c | 6 | #include <linux/rbtree.h> |
7b612e29 | 7 | #include "event.h" |
45178a92 SL |
8 | |
9 | struct machine; | |
10 | union perf_event; | |
11 | struct perf_sample; | |
7b612e29 | 12 | struct record_opts; |
45178a92 | 13 | |
e4378f0c SL |
14 | struct bpf_prog_info_node { |
15 | struct bpf_prog_info_linear *info_linear; | |
16 | struct rb_node rb_node; | |
17 | }; | |
18 | ||
45178a92 SL |
19 | #ifdef HAVE_LIBBPF_SUPPORT |
20 | int machine__process_bpf_event(struct machine *machine, union perf_event *event, | |
21 | struct perf_sample *sample); | |
7b612e29 | 22 | |
e5416950 | 23 | int perf_event__synthesize_bpf_events(struct perf_session *session, |
7b612e29 SL |
24 | perf_event__handler_t process, |
25 | struct machine *machine, | |
26 | struct record_opts *opts); | |
45178a92 SL |
27 | #else |
28 | static inline int machine__process_bpf_event(struct machine *machine __maybe_unused, | |
29 | union perf_event *event __maybe_unused, | |
30 | struct perf_sample *sample __maybe_unused) | |
31 | { | |
32 | return 0; | |
33 | } | |
7b612e29 | 34 | |
e5416950 | 35 | static inline int perf_event__synthesize_bpf_events(struct perf_session *session __maybe_unused, |
7b612e29 SL |
36 | perf_event__handler_t process __maybe_unused, |
37 | struct machine *machine __maybe_unused, | |
38 | struct record_opts *opts __maybe_unused) | |
39 | { | |
40 | return 0; | |
41 | } | |
45178a92 SL |
42 | #endif // HAVE_LIBBPF_SUPPORT |
43 | #endif |