Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux/fpc-iii.git] / include / trace / events / oom.h
blob26a11e4a2c361d21e550ea500df01ec3e10d791a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM oom
5 #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_OOM_H
7 #include <linux/tracepoint.h>
8 #include <trace/events/mmflags.h>
10 TRACE_EVENT(oom_score_adj_update,
12 TP_PROTO(struct task_struct *task),
14 TP_ARGS(task),
16 TP_STRUCT__entry(
17 __field( pid_t, pid)
18 __array( char, comm, TASK_COMM_LEN )
19 __field( short, oom_score_adj)
22 TP_fast_assign(
23 __entry->pid = task->pid;
24 memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
25 __entry->oom_score_adj = task->signal->oom_score_adj;
28 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
29 __entry->pid, __entry->comm, __entry->oom_score_adj)
32 TRACE_EVENT(reclaim_retry_zone,
34 TP_PROTO(struct zoneref *zoneref,
35 int order,
36 unsigned long reclaimable,
37 unsigned long available,
38 unsigned long min_wmark,
39 int no_progress_loops,
40 bool wmark_check),
42 TP_ARGS(zoneref, order, reclaimable, available, min_wmark, no_progress_loops, wmark_check),
44 TP_STRUCT__entry(
45 __field( int, node)
46 __field( int, zone_idx)
47 __field( int, order)
48 __field( unsigned long, reclaimable)
49 __field( unsigned long, available)
50 __field( unsigned long, min_wmark)
51 __field( int, no_progress_loops)
52 __field( bool, wmark_check)
55 TP_fast_assign(
56 __entry->node = zone_to_nid(zoneref->zone);
57 __entry->zone_idx = zoneref->zone_idx;
58 __entry->order = order;
59 __entry->reclaimable = reclaimable;
60 __entry->available = available;
61 __entry->min_wmark = min_wmark;
62 __entry->no_progress_loops = no_progress_loops;
63 __entry->wmark_check = wmark_check;
66 TP_printk("node=%d zone=%-8s order=%d reclaimable=%lu available=%lu min_wmark=%lu no_progress_loops=%d wmark_check=%d",
67 __entry->node, __print_symbolic(__entry->zone_idx, ZONE_TYPE),
68 __entry->order,
69 __entry->reclaimable, __entry->available, __entry->min_wmark,
70 __entry->no_progress_loops,
71 __entry->wmark_check)
74 TRACE_EVENT(mark_victim,
75 TP_PROTO(int pid),
77 TP_ARGS(pid),
79 TP_STRUCT__entry(
80 __field(int, pid)
83 TP_fast_assign(
84 __entry->pid = pid;
87 TP_printk("pid=%d", __entry->pid)
90 TRACE_EVENT(wake_reaper,
91 TP_PROTO(int pid),
93 TP_ARGS(pid),
95 TP_STRUCT__entry(
96 __field(int, pid)
99 TP_fast_assign(
100 __entry->pid = pid;
103 TP_printk("pid=%d", __entry->pid)
106 TRACE_EVENT(start_task_reaping,
107 TP_PROTO(int pid),
109 TP_ARGS(pid),
111 TP_STRUCT__entry(
112 __field(int, pid)
115 TP_fast_assign(
116 __entry->pid = pid;
119 TP_printk("pid=%d", __entry->pid)
122 TRACE_EVENT(finish_task_reaping,
123 TP_PROTO(int pid),
125 TP_ARGS(pid),
127 TP_STRUCT__entry(
128 __field(int, pid)
131 TP_fast_assign(
132 __entry->pid = pid;
135 TP_printk("pid=%d", __entry->pid)
138 TRACE_EVENT(skip_task_reaping,
139 TP_PROTO(int pid),
141 TP_ARGS(pid),
143 TP_STRUCT__entry(
144 __field(int, pid)
147 TP_fast_assign(
148 __entry->pid = pid;
151 TP_printk("pid=%d", __entry->pid)
154 #ifdef CONFIG_COMPACTION
155 TRACE_EVENT(compact_retry,
157 TP_PROTO(int order,
158 enum compact_priority priority,
159 enum compact_result result,
160 int retries,
161 int max_retries,
162 bool ret),
164 TP_ARGS(order, priority, result, retries, max_retries, ret),
166 TP_STRUCT__entry(
167 __field( int, order)
168 __field( int, priority)
169 __field( int, result)
170 __field( int, retries)
171 __field( int, max_retries)
172 __field( bool, ret)
175 TP_fast_assign(
176 __entry->order = order;
177 __entry->priority = priority;
178 __entry->result = compact_result_to_feedback(result);
179 __entry->retries = retries;
180 __entry->max_retries = max_retries;
181 __entry->ret = ret;
184 TP_printk("order=%d priority=%s compaction_result=%s retries=%d max_retries=%d should_retry=%d",
185 __entry->order,
186 __print_symbolic(__entry->priority, COMPACTION_PRIORITY),
187 __print_symbolic(__entry->result, COMPACTION_FEEDBACK),
188 __entry->retries, __entry->max_retries,
189 __entry->ret)
191 #endif /* CONFIG_COMPACTION */
192 #endif
194 /* This part must be outside protection */
195 #include <trace/define_trace.h>