xref: /linux/tools/perf/util/bpf_skel/lock_data.h (revision 46ff24efe04ac96a129dd01138640c3447a525e1)
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 /* Data structures shared between BPF and tools. */
3 #ifndef UTIL_BPF_SKEL_LOCK_DATA_H
4 #define UTIL_BPF_SKEL_LOCK_DATA_H
5 
6 struct contention_key {
7 	u32 stack_id;
8 	u32 pid;
9 	u64 lock_addr;
10 };
11 
12 #define TASK_COMM_LEN  16
13 
14 struct contention_task_data {
15 	char comm[TASK_COMM_LEN];
16 };
17 
18 struct contention_data {
19 	u64 total_time;
20 	u64 min_time;
21 	u64 max_time;
22 	u32 count;
23 	u32 flags;
24 };
25 
26 enum lock_aggr_mode {
27 	LOCK_AGGR_ADDR = 0,
28 	LOCK_AGGR_TASK,
29 	LOCK_AGGR_CALLER,
30 };
31 
32 #endif /* UTIL_BPF_SKEL_LOCK_DATA_H */
33