-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_u.h
67 lines (57 loc) · 1.43 KB
/
common_u.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef __EOOM_H__
#define __EOOM_H__
typedef long long unsigned int u64;
typedef unsigned int u32;
#ifndef MAX_FILENAME_LEN
#define MAX_FILENAME_LEN 32
#endif
#ifndef MAX_COMM_LEN
#define MAX_COMM_LEN 128
#endif
enum oom_info_type
{
OOM_INFO_TYPE_MM = 1,
OOM_INFO_TYPE_NS = 2,
};
struct task_oom_info
{
u32 pid;
char comm[MAX_COMM_LEN];
};
struct task_mm_info
{
long unsigned int task_size;
long unsigned int total_vm;
long unsigned int hiwater_rss;
long unsigned int hiwater_vm;
long unsigned int locked_vm;
long unsigned int data_vm;
long unsigned int exec_vm;
long unsigned int stack_vm;
};
struct task_ns_info
{
long long unsigned int cgroup_id; // cgroup id
unsigned int host_tid; // tid in host pid namespace
unsigned int host_pid; // pid in host pid namespace
unsigned int host_ppid; // ppid in host pid namespace
unsigned int tid; // thread id in userspace
unsigned int pid; // process id in userspace
unsigned int ppid; // parent process id in userspace
unsigned int uid;
unsigned int gid;
unsigned int cgroup_ns_id;
unsigned int ipc_ns_id;
unsigned int net_ns_id;
unsigned int mount_ns_id;
unsigned int pid_ns_id;
unsigned int time_ns_id;
unsigned int user_ns_id;
unsigned int uts_ns_id;
};
struct oom_event_wakeup
{
long long unsigned int tgid;
long long unsigned int pid;
};
#endif