2 #define TRACE_SYSTEM oom
4 #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ)
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
),
17 __array( char, comm
, TASK_COMM_LEN
)
18 __field( short, oom_score_adj
)
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
,
35 unsigned long reclaimable
,
36 unsigned long available
,
37 unsigned long min_wmark
,
38 int no_progress_loops
,
41 TP_ARGS(zoneref
, order
, reclaimable
, available
, min_wmark
, no_progress_loops
, wmark_check
),
45 __field( int, zone_idx
)
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
)
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
),
68 __entry
->reclaimable
, __entry
->available
, __entry
->min_wmark
,
69 __entry
->no_progress_loops
,
73 TRACE_EVENT(mark_victim
,
86 TP_printk("pid=%d", __entry
->pid
)
89 TRACE_EVENT(wake_reaper
,
102 TP_printk("pid=%d", __entry
->pid
)
105 TRACE_EVENT(start_task_reaping
,
118 TP_printk("pid=%d", __entry
->pid
)
121 TRACE_EVENT(finish_task_reaping
,
134 TP_printk("pid=%d", __entry
->pid
)
137 TRACE_EVENT(skip_task_reaping
,
150 TP_printk("pid=%d", __entry
->pid
)
153 #ifdef CONFIG_COMPACTION
154 TRACE_EVENT(compact_retry
,
157 enum compact_priority priority
,
158 enum compact_result result
,
163 TP_ARGS(order
, priority
, result
, retries
, max_retries
, ret
),
167 __field( int, priority
)
168 __field( int, result
)
169 __field( int, retries
)
170 __field( int, max_retries
)
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
;
183 TP_printk("order=%d priority=%s compaction_result=%s retries=%d max_retries=%d should_retry=%d",
185 __print_symbolic(__entry
->priority
, COMPACTION_PRIORITY
),
186 __print_symbolic(__entry
->result
, COMPACTION_FEEDBACK
),
187 __entry
->retries
, __entry
->max_retries
,
190 #endif /* CONFIG_COMPACTION */
193 /* This part must be outside protection */
194 #include <trace/define_trace.h>