aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2009-05-05 04:49:59 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-06 06:15:51 -0400
commitde1d7286060430e79a1d50ad6e5fee8fe863c5f6 (patch)
tree0d3ebef66d5d4634bc1d4fee501a8a309e5aa874
parent20c8928abe70e204bd077ab6cfe23002d7788983 (diff)
tracepoint: trace_sched_migrate_task(): remove parameter
The orig_cpu parameter in trace_sched_migrate_task() is not necessary, it can be got by using task_cpu(p) in the probe. [ Impact: micro-optimization ] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> [ modified from Mathieu's patch. The original patch is at: http://marc.info/?l=linux-kernel&m=123791201716239&w=2 ] Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: zhaolei@cn.fujitsu.com Cc: laijs@cn.fujitsu.com LKML-Reference: <49FFFDB7.1050402@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/trace/events/sched.h6
-rw-r--r--kernel/sched.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index ffa1cab586b9..dd4033cf5b09 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -180,9 +180,9 @@ TRACE_EVENT(sched_switch,
180 */ 180 */
181TRACE_EVENT(sched_migrate_task, 181TRACE_EVENT(sched_migrate_task,
182 182
183 TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu), 183 TP_PROTO(struct task_struct *p, int dest_cpu),
184 184
185 TP_ARGS(p, orig_cpu, dest_cpu), 185 TP_ARGS(p, dest_cpu),
186 186
187 TP_STRUCT__entry( 187 TP_STRUCT__entry(
188 __array( char, comm, TASK_COMM_LEN ) 188 __array( char, comm, TASK_COMM_LEN )
@@ -196,7 +196,7 @@ TRACE_EVENT(sched_migrate_task,
196 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 196 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
197 __entry->pid = p->pid; 197 __entry->pid = p->pid;
198 __entry->prio = p->prio; 198 __entry->prio = p->prio;
199 __entry->orig_cpu = orig_cpu; 199 __entry->orig_cpu = task_cpu(p);
200 __entry->dest_cpu = dest_cpu; 200 __entry->dest_cpu = dest_cpu;
201 ), 201 ),
202 202
diff --git a/kernel/sched.c b/kernel/sched.c
index 9f7ffd00b6ea..9cdedbd181ce 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1954,7 +1954,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
1954 1954
1955 clock_offset = old_rq->clock - new_rq->clock; 1955 clock_offset = old_rq->clock - new_rq->clock;
1956 1956
1957 trace_sched_migrate_task(p, task_cpu(p), new_cpu); 1957 trace_sched_migrate_task(p, new_cpu);
1958 1958
1959#ifdef CONFIG_SCHEDSTATS 1959#ifdef CONFIG_SCHEDSTATS
1960 if (p->se.wait_start) 1960 if (p->se.wait_start)