]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - tools/perf/util/bpf-event.h
perf bpf: Make synthesize_bpf_events() receive perf_session pointer instead of perf_tool
[thirdparty/kernel/linux.git] / tools / perf / util / bpf-event.h
CommitLineData
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>
7b612e29 6#include "event.h"
45178a92
SL
7
8struct machine;
9union perf_event;
10struct perf_sample;
7b612e29
SL
11struct perf_tool;
12struct record_opts;
45178a92
SL
13
14#ifdef HAVE_LIBBPF_SUPPORT
15int machine__process_bpf_event(struct machine *machine, union perf_event *event,
16 struct perf_sample *sample);
7b612e29 17
e5416950 18int perf_event__synthesize_bpf_events(struct perf_session *session,
7b612e29
SL
19 perf_event__handler_t process,
20 struct machine *machine,
21 struct record_opts *opts);
45178a92
SL
22#else
23static inline int machine__process_bpf_event(struct machine *machine __maybe_unused,
24 union perf_event *event __maybe_unused,
25 struct perf_sample *sample __maybe_unused)
26{
27 return 0;
28}
7b612e29 29
e5416950 30static inline int perf_event__synthesize_bpf_events(struct perf_session *session __maybe_unused,
7b612e29
SL
31 perf_event__handler_t process __maybe_unused,
32 struct machine *machine __maybe_unused,
33 struct record_opts *opts __maybe_unused)
34{
35 return 0;
36}
45178a92
SL
37#endif // HAVE_LIBBPF_SUPPORT
38#endif