xref: /aosp_15_r20/external/bcc/libbpf-tools/biostacks.h (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2 #ifndef __BIOSTACKS_H
3 #define __BIOSTACKS_H
4 
5 #define DISK_NAME_LEN	32
6 #define TASK_COMM_LEN	16
7 #define MAX_SLOTS	20
8 #define MAX_STACK	20
9 
10 #define MINORBITS	20
11 #define MINORMASK	((1U << MINORBITS) - 1)
12 
13 #define MKDEV(ma, mi)	(((ma) << MINORBITS) | (mi))
14 
15 struct rqinfo {
16 	__u32 pid;
17 	int kern_stack_size;
18 	__u64 kern_stack[MAX_STACK];
19 	char comm[TASK_COMM_LEN];
20 	__u32 dev;
21 };
22 
23 struct hist {
24 	__u32 slots[MAX_SLOTS];
25 };
26 
27 #endif /* __BIOSTACKS_H */
28