aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/bpf_skel/sample-filter.h
blob: 2e96e1ab084ae9af421467cb14a88eafd4c9d90d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H
#define PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H

#define MAX_FILTERS  64

/* supported filter operations */
enum perf_bpf_filter_op {
	PBF_OP_EQ,
	PBF_OP_NEQ,
	PBF_OP_GT,
	PBF_OP_GE,
	PBF_OP_LT,
	PBF_OP_LE,
	PBF_OP_AND,
	PBF_OP_GROUP_BEGIN,
	PBF_OP_GROUP_END,
};

/* BPF map entry for filtering */
struct perf_bpf_filter_entry {
	enum perf_bpf_filter_op op;
	__u32 part; /* sub-sample type info when it has multiple values */
	__u64 flags; /* perf sample type flags */
	__u64 value;
};

#endif /* PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H */