Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / include / trace / events / oom.h
blobc3c19d47ae5e3a6c0616b5206f659a9640986aa5
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM oom
4 #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_OOM_H
6 #include <linux/tracepoint.h>
7 #include <trace/events/mmflags.h>
9 TRACE_EVENT(oom_score_adj_update,
11 TP_PROTO(struct task_struct *task),
13 TP_ARGS(task),
15 TP_STRUCT__entry(
16 __field( pid_t, pid)
17 __array( char, comm, TASK_COMM_LEN )
18 __field( short, oom_score_adj)
21 TP_fast_assign(
22 __entry->pid = task->pid;
23 memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
24 __entry->oom_score_adj = task->signal->oom_score_adj;
27 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
28 __entry->pid, __entry->comm, __entry->oom_score_adj)
31 TRACE_EVENT(reclaim_retry_zone,
33 TP_PROTO(struct zoneref *zoneref,
34 int order,
35 unsigned long reclaimable,
36 unsigned long available,
37 unsigned long min_wmark,
38 int no_progress_loops,
39 bool wmark_check),
41 TP_ARGS(zoneref, order, reclaimable, available, min_wmark, no_progress_loops, wmark_check),
43 TP_STRUCT__entry(
44 __field( int, node)
45 __field( int, zone_idx)
46 __field( int, order)
47 __field( unsigned long, reclaimable)
48 __field( unsigned long, available)
49 __field( unsigned long, min_wmark)
50 __field( int, no_progress_loops)
51 __field( bool, wmark_check)
54 TP_fast_assign(
55 __entry->node = zone_to_nid(zoneref->zone);
56 __entry->zone_idx = zoneref->zone_idx;
57 __entry->order = order;
58 __entry->reclaimable = reclaimable;
59 __entry->available = available;
60 __entry->min_wmark = min_wmark;
61 __entry->no_progress_loops = no_progress_loops;
62 __entry->wmark_check = wmark_check;
65 TP_printk("node=%d zone=%-8s order=%d reclaimable=%lu available=%lu min_wmark=%lu no_progress_loops=%d wmark_check=%d",
66 __entry->node, __print_symbolic(__entry->zone_idx, ZONE_TYPE),
67 __entry->order,
68 __entry->reclaimable, __entry->available, __entry->min_wmark,
69 __entry->no_progress_loops,
70 __entry->wmark_check)
73 TRACE_EVENT(mark_victim,
74 TP_PROTO(int pid),
76 TP_ARGS(pid),
78 TP_STRUCT__entry(
79 __field(int, pid)
82 TP_fast_assign(
83 __entry->pid = pid;
86 TP_printk("pid=%d", __entry->pid)
89 TRACE_EVENT(wake_reaper,
90 TP_PROTO(int pid),
92 TP_ARGS(pid),
94 TP_STRUCT__entry(
95 __field(int, pid)
98 TP_fast_assign(
99 __entry->pid = pid;
102 TP_printk("pid=%d", __entry->pid)
105 TRACE_EVENT(start_task_reaping,
106 TP_PROTO(int pid),
108 TP_ARGS(pid),
110 TP_STRUCT__entry(
111 __field(int, pid)
114 TP_fast_assign(
115 __entry->pid = pid;
118 TP_printk("pid=%d", __entry->pid)
121 TRACE_EVENT(finish_task_reaping,
122 TP_PROTO(int pid),
124 TP_ARGS(pid),
126 TP_STRUCT__entry(
127 __field(int, pid)
130 TP_fast_assign(
131 __entry->pid = pid;
134 TP_printk("pid=%d", __entry->pid)
137 TRACE_EVENT(skip_task_reaping,
138 TP_PROTO(int pid),
140 TP_ARGS(pid),
142 TP_STRUCT__entry(
143 __field(int, pid)
146 TP_fast_assign(
147 __entry->pid = pid;
150 TP_printk("pid=%d", __entry->pid)
153 #ifdef CONFIG_COMPACTION
154 TRACE_EVENT(compact_retry,
156 TP_PROTO(int order,
157 enum compact_priority priority,
158 enum compact_result result,
159 int retries,
160 int max_retries,
161 bool ret),
163 TP_ARGS(order, priority, result, retries, max_retries, ret),
165 TP_STRUCT__entry(
166 __field( int, order)
167 __field( int, priority)
168 __field( int, result)
169 __field( int, retries)
170 __field( int, max_retries)
171 __field( bool, ret)
174 TP_fast_assign(
175 __entry->order = order;
176 __entry->priority = priority;
177 __entry->result = compact_result_to_feedback(result);
178 __entry->retries = retries;
179 __entry->max_retries = max_retries;
180 __entry->ret = ret;
183 TP_printk("order=%d priority=%s compaction_result=%s retries=%d max_retries=%d should_retry=%d",
184 __entry->order,
185 __print_symbolic(__entry->priority, COMPACTION_PRIORITY),
186 __print_symbolic(__entry->result, COMPACTION_FEEDBACK),
187 __entry->retries, __entry->max_retries,
188 __entry->ret)
190 #endif /* CONFIG_COMPACTION */
191 #endif
193 /* This part must be outside protection */
194 #include <trace/define_trace.h>