aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-12-11 19:02:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 20:22:27 -0500
commita9c58b907dbc6821533dfc295b63caf111ff1f16 (patch)
treee50714c48de89400a02a8e92ef4e240c5206bbcc /include/trace
parentfa264375175a382621c5344a6508e02ec4d1c3c0 (diff)
mm, oom: change type of oom_score_adj to short
The maximum oom_score_adj is 1000 and the minimum oom_score_adj is -1000, so this range can be represented by the signed short type with no functional change. The extra space this frees up in struct signal_struct will be used for per-thread oom kill flags in the next patch. Signed-off-by: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/oom.h4
-rw-r--r--include/trace/events/task.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/trace/events/oom.h b/include/trace/events/oom.h
index dd4ba3b92002..1e974983757e 100644
--- a/include/trace/events/oom.h
+++ b/include/trace/events/oom.h
@@ -14,7 +14,7 @@ TRACE_EVENT(oom_score_adj_update,
14 TP_STRUCT__entry( 14 TP_STRUCT__entry(
15 __field( pid_t, pid) 15 __field( pid_t, pid)
16 __array( char, comm, TASK_COMM_LEN ) 16 __array( char, comm, TASK_COMM_LEN )
17 __field( int, oom_score_adj) 17 __field( short, oom_score_adj)
18 ), 18 ),
19 19
20 TP_fast_assign( 20 TP_fast_assign(
@@ -23,7 +23,7 @@ TRACE_EVENT(oom_score_adj_update,
23 __entry->oom_score_adj = task->signal->oom_score_adj; 23 __entry->oom_score_adj = task->signal->oom_score_adj;
24 ), 24 ),
25 25
26 TP_printk("pid=%d comm=%s oom_score_adj=%d", 26 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
27 __entry->pid, __entry->comm, __entry->oom_score_adj) 27 __entry->pid, __entry->comm, __entry->oom_score_adj)
28); 28);
29 29
diff --git a/include/trace/events/task.h b/include/trace/events/task.h
index b53add02e929..102a646e1996 100644
--- a/include/trace/events/task.h
+++ b/include/trace/events/task.h
@@ -15,7 +15,7 @@ TRACE_EVENT(task_newtask,
15 __field( pid_t, pid) 15 __field( pid_t, pid)
16 __array( char, comm, TASK_COMM_LEN) 16 __array( char, comm, TASK_COMM_LEN)
17 __field( unsigned long, clone_flags) 17 __field( unsigned long, clone_flags)
18 __field( int, oom_score_adj) 18 __field( short, oom_score_adj)
19 ), 19 ),
20 20
21 TP_fast_assign( 21 TP_fast_assign(
@@ -25,7 +25,7 @@ TRACE_EVENT(task_newtask,
25 __entry->oom_score_adj = task->signal->oom_score_adj; 25 __entry->oom_score_adj = task->signal->oom_score_adj;
26 ), 26 ),
27 27
28 TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%d", 28 TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%hd",
29 __entry->pid, __entry->comm, 29 __entry->pid, __entry->comm,
30 __entry->clone_flags, __entry->oom_score_adj) 30 __entry->clone_flags, __entry->oom_score_adj)
31); 31);
@@ -40,7 +40,7 @@ TRACE_EVENT(task_rename,
40 __field( pid_t, pid) 40 __field( pid_t, pid)
41 __array( char, oldcomm, TASK_COMM_LEN) 41 __array( char, oldcomm, TASK_COMM_LEN)
42 __array( char, newcomm, TASK_COMM_LEN) 42 __array( char, newcomm, TASK_COMM_LEN)
43 __field( int, oom_score_adj) 43 __field( short, oom_score_adj)
44 ), 44 ),
45 45
46 TP_fast_assign( 46 TP_fast_assign(
@@ -50,7 +50,7 @@ TRACE_EVENT(task_rename,
50 __entry->oom_score_adj = task->signal->oom_score_adj; 50 __entry->oom_score_adj = task->signal->oom_score_adj;
51 ), 51 ),
52 52
53 TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%d", 53 TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%hd",
54 __entry->pid, __entry->oldcomm, 54 __entry->pid, __entry->oldcomm,
55 __entry->newcomm, __entry->oom_score_adj) 55 __entry->newcomm, __entry->oom_score_adj)
56); 56);