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 u64 aggr_key; /* can be stack_id, pid or lock addr */ 8 }; 9 10 #define TASK_COMM_LEN 16 11 12 struct contention_task_data { 13 char comm[TASK_COMM_LEN]; 14 }; 15 16 struct contention_data { 17 u64 total_time; 18 u64 min_time; 19 u64 max_time; 20 u32 count; 21 u32 flags; 22 }; 23 24 enum lock_aggr_mode { 25 LOCK_AGGR_ADDR = 0, 26 LOCK_AGGR_TASK, 27 LOCK_AGGR_CALLER, 28 }; 29 30 #endif /* UTIL_BPF_SKEL_LOCK_DATA_H */ 31