blob: 1e974983757eb2e9974d0ac619ff8b8b27a491d5 [file] [log] [blame]
KAMEZAWA Hiroyuki43d2b112012-01-10 15:08:09 -08001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM oom
3
4#if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_OOM_H
6#include <linux/tracepoint.h>
7
8TRACE_EVENT(oom_score_adj_update,
9
10 TP_PROTO(struct task_struct *task),
11
12 TP_ARGS(task),
13
14 TP_STRUCT__entry(
15 __field( pid_t, pid)
16 __array( char, comm, TASK_COMM_LEN )
David Rientjesa9c58b902012-12-11 16:02:54 -080017 __field( short, oom_score_adj)
KAMEZAWA Hiroyuki43d2b112012-01-10 15:08:09 -080018 ),
19
20 TP_fast_assign(
21 __entry->pid = task->pid;
22 memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
23 __entry->oom_score_adj = task->signal->oom_score_adj;
24 ),
25
David Rientjesa9c58b902012-12-11 16:02:54 -080026 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
KAMEZAWA Hiroyuki43d2b112012-01-10 15:08:09 -080027 __entry->pid, __entry->comm, __entry->oom_score_adj)
28);
29
30#endif
31
32/* This part must be outside protection */
33#include <trace/define_trace.h>