tracepoint: trace_sched_migrate_task(): remove parameter
A message that is not in the archive (sent off-list or not yet received): [email protected]
Commit-ID: de1d7286060430e79a1d50ad6e5fee8fe863c5f6 Gitweb: http://git.kernel.org/tip/de1d7286060430e79a1d50ad6e5fee8fe863c5f6 Author: Mathieu Desnoyers <[email protected]> AuthorDate: Tue, 5 May 2009 16:49:59 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 6 May 2009 12:15:51 +0200
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 <[email protected]>
[ 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 <[email protected]>
Cc Li Zefan <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- include/trace/events/sched.h | 6 +++--- kernel/sched.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
include/trace/events/sched.h +3 -3
@@ -180,9 +180,9 @@ TRACE_EVENT(sched_switch,*/ TRACE_EVENT(sched_migrate_task, - TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu), + TP_PROTO(struct task_struct *p, int dest_cpu), - TP_ARGS(p, orig_cpu, dest_cpu), + TP_ARGS(p, dest_cpu), TP_STRUCT__entry( __array( char, comm, TASK_COMM_LEN )
@@ -196,7 +196,7 @@ TRACE_EVENT(sched_migrate_task,memcpy (__entry->comm, p->comm,TASK_COMM_LEN ); __entry->pid = p->pid; __entry->prio = p->prio; - __entry->orig_cpu = orig_cpu; + __entry->orig_cpu =task_cpu (p); __entry->dest_cpu = dest_cpu; ),
kernel/sched.c +1 -1
@@ -1954,7 +1954,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu) clock_offset = old_rq->clock - new_rq->clock; -trace_sched_migrate_task (p,task_cpu (p), new_cpu); +trace_sched_migrate_task (p, new_cpu);#ifdef CONFIG_SCHEDSTATS if (p->se.wait_start)