xref: /aosp_15_r20/external/bcc/libbpf-tools/biotop.h (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2 #ifndef __BIOTOP_H
3 #define __BIOTOP_H
4 
5 #define REQ_OP_BITS 8
6 #define REQ_OP_MASK ((1 << REQ_OP_BITS) - 1)
7 
8 #define TASK_COMM_LEN 16
9 
10 /* for saving the timestamp and __data_len of each request */
11 struct start_req_t {
12 	__u64 ts;
13 	__u64 data_len;
14 };
15 
16 /* for saving process info by request */
17 struct who_t {
18 	__u32 pid;
19 	char name[TASK_COMM_LEN];
20 };
21 
22 /* the key for the output summary */
23 struct info_t {
24 	__u32 pid;
25 	int rwflag;
26 	int major;
27 	int minor;
28 	char name[TASK_COMM_LEN];
29 };
30 
31 /* the value of the output summary */
32 struct val_t {
33 	__u64 bytes;
34 	__u64 us;
35 	__u32 io;
36 };
37 
38 #endif /* __BIOTOP_H */
39