drm/bridge: adv7511: Switch to atomic operations
[drm/drm-misc.git] / tools / perf / util / bpf_skel / lock_data.h
blobde12892f992f8d43e6a05baad516c11492d9545b
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
6 struct tstamp_data {
7 u64 timestamp;
8 u64 lock;
9 u32 flags;
10 s32 stack_id;
13 struct contention_key {
14 s32 stack_id;
15 u32 pid;
16 u64 lock_addr_or_cgroup;
19 #define TASK_COMM_LEN 16
21 struct contention_task_data {
22 char comm[TASK_COMM_LEN];
25 /* default buffer size */
26 #define MAX_ENTRIES 16384
29 * Upper bits of the flags in the contention_data are used to identify
30 * some well-known locks which do not have symbols (non-global locks).
32 #define LCD_F_MMAP_LOCK (1U << 31)
33 #define LCD_F_SIGHAND_LOCK (1U << 30)
35 #define LCB_F_MAX_FLAGS (1U << 7)
37 struct contention_data {
38 u64 total_time;
39 u64 min_time;
40 u64 max_time;
41 u32 count;
42 u32 flags;
45 enum lock_aggr_mode {
46 LOCK_AGGR_ADDR = 0,
47 LOCK_AGGR_TASK,
48 LOCK_AGGR_CALLER,
49 LOCK_AGGR_CGROUP,
52 enum lock_class_sym {
53 LOCK_CLASS_NONE,
54 LOCK_CLASS_RQLOCK,
57 #endif /* UTIL_BPF_SKEL_LOCK_DATA_H */