6b9fd554ad7b91b48e0ca1a2376472004a94e6b9
[platform/kernel/linux-starfive.git] / tools / perf / util / bpf_skel / sample-filter.h
1 #ifndef PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H
2 #define PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H
3
4 #define MAX_FILTERS  32
5
6 /* supported filter operations */
7 enum perf_bpf_filter_op {
8         PBF_OP_EQ,
9         PBF_OP_NEQ,
10         PBF_OP_GT,
11         PBF_OP_GE,
12         PBF_OP_LT,
13         PBF_OP_LE,
14         PBF_OP_AND
15 };
16
17 /* BPF map entry for filtering */
18 struct perf_bpf_filter_entry {
19         enum perf_bpf_filter_op op;
20         __u32 part; /* sub-sample type info when it has multiple values */
21         __u64 flags; /* perf sample type flags */
22         __u64 value;
23 };
24
25 #endif /* PERF_UTIL_BPF_SKEL_SAMPLE_FILTER_H */