-
Notifications
You must be signed in to change notification settings - Fork 12
/
tp_struct.h
161 lines (127 loc) · 5 KB
/
tp_struct.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#ifndef __TP_STRUCT_H
#define __TP_STRUCT_H
#include <linux/list.h>
#include <linux/const.h>
#include <linux/compiler.h>
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
#define TP_RAW_SIZE(type) \
(ALIGN(sizeof(type)+sizeof(u32), sizeof(u64)) - sizeof(u32))
#define COMMON_HEADER \
unsigned short common_type;/* offset:0; size:2; signed:0; */ \
unsigned char common_flags;/* offset:2; size:1; signed:0; */ \
unsigned char common_preempt_count;/* offset:3; size:1; signed:0; */ \
int common_pid;/* offset:4; size:4; signed:1; */
struct trace_entry {
COMMON_HEADER
};
/* taken from kernel/trace/trace.h */
struct kprobe_trace_entry_head {
struct trace_entry ent;
unsigned long ip;
};
struct kretprobe_trace_entry_head {
struct trace_entry ent;
unsigned long func;
unsigned long ret_ip;
};
/* taken from kernel/trace/trace_uprobe.c */
struct uprobe_trace_entry_head {
struct trace_entry ent;
unsigned long vaddr[];
};
struct sched_wakeup {
COMMON_HEADER
char comm[16];// offset:8; size:16; signed:1;
pid_t pid;// offset:24; size:4; signed:1;
int prio;// offset:28; size:4; signed:1;
int success;// offset:32; size:4; signed:1;
int target_cpu;// offset:36; size:4; signed:1;
};
/*
* upstream
* 58b9987 sched/tracing: Remove the redundant 'success' in the sched tracepoint
**/
struct sched_wakeup_no_success {
COMMON_HEADER
char comm[16];// offset:8; size:16; signed:1;
pid_t pid;// offset:24; size:4; signed:1;
int prio;// offset:28; size:4; signed:1;
int target_cpu;// offset:32; size:4; signed:1;
};
struct sched_switch {
COMMON_HEADER
char prev_comm[16];// offset:8; size:16; signed:1;
pid_t prev_pid;// offset:24; size:4; signed:1;
int prev_prio;// offset:28; size:4; signed:1;
long prev_state;// offset:32; size:8; signed:1;
char next_comm[16];// offset:40; size:16; signed:1;
pid_t next_pid;// offset:56; size:4; signed:1;
int next_prio;// offset:60; size:4; signed:1;
};
struct sched_migrate_task {
COMMON_HEADER
char comm[16];// offset:8; size:16; signed:1;
pid_t pid;// offset:24; size:4; signed:1;
int prio;// offset:28; size:4; signed:1;
int orig_cpu;// offset:32; size:4; signed:1;
int dest_cpu;// offset:36; size:4; signed:1;
};
struct sched_stat_runtime {
COMMON_HEADER
char comm[16]; // offset:8; size:16; signed:1;
pid_t pid; // offset:24; size:4; signed:1;
u64 runtime; // offset:32; size:8; signed:0;
u64 vruntime; // offset:40; size:8; signed:0;
};
struct sched_process_free {
COMMON_HEADER
char comm[16];// offset:8; size:16; signed:1;
pid_t pid;// offset:24; size:4; signed:1;
int prio;// offset:28; size:4; signed:1;
};
struct sched_process_fork {
COMMON_HEADER
char parent_comm[16];// offset:8; size:16; signed:1;
pid_t parent_pid;// offset:24; size:4; signed:1;
char child_comm[16];// offset:28; size:16; signed:1;
pid_t child_pid;// offset:44; size:4; signed:1;
};
struct sched_process_exec {
COMMON_HEADER
short filename_offset, filename_len;//__data_loc char[] filename; offset:8; size:4; signed:1;
pid_t pid;// offset:12; size:4; signed:1;
pid_t old_pid;// offset:16; size:4; signed:1;
};
struct task_newtask {
COMMON_HEADER
pid_t pid;// offset:8; size:4; signed:1;
char comm[16];// offset:12; size:16; signed:1;
unsigned long clone_flags;// offset:32; size:8; signed:0;
short oom_score_adj;// offset:40; size:2; signed:1;
};
struct task_rename {
COMMON_HEADER
pid_t pid;// offset:8; size:4; signed:1;
char oldcomm[16];// offset:12; size:16; signed:1;
char newcomm[16];// offset:28; size:16; signed:1;
short oom_score_adj;// offset:44; size:2; signed:1;
};
#if defined(__i386__) || defined(__x86_64__)
struct kvm_pvclock_update {
COMMON_HEADER
unsigned int vcpu_id;// offset:8; size:4; signed:0;
__u32 version;// offset:12; size:4; signed:0;
__u64 tsc_timestamp;// offset:16; size:8; signed:0;
__u64 system_time;// offset:24; size:8; signed:0;
__u32 tsc_to_system_mul;// offset:32; size:4; signed:0;
__s8 tsc_shift;// offset:36; size:1; signed:1;
__u8 flags;// offset:37; size:1; signed:0;
};
struct kvm_write_tsc_offset {
COMMON_HEADER
unsigned int vcpu_id;// offset:8; size:4; signed:0;
__u64 previous_tsc_offset;// offset:16; size:8; signed:0;
__u64 next_tsc_offset;// offset:24; size:8; signed:0;
};
#endif
#endif