提交 c71dd42d 编写于 作者: I Ingo Molnar

tracing: fix warnings in kernel/trace/trace_sched_switch.c

these warnings:

  kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_register’:
  kernel/trace/trace_sched_switch.c:96: warning: passing argument 1 of ‘register_trace_sched_wakeup_new’ from incompatible pointer type
  kernel/trace/trace_sched_switch.c:112: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type
  kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_unregister’:
  kernel/trace/trace_sched_switch.c:121: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type

Trigger because sched_wakeup_new tracepoints need the same trace
signature as sched_wakeup - which was changed recently.

Fix it.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3bddb9a3
...@@ -21,8 +21,8 @@ DECLARE_TRACE(sched_wakeup, ...@@ -21,8 +21,8 @@ DECLARE_TRACE(sched_wakeup,
TPARGS(rq, p)); TPARGS(rq, p));
DECLARE_TRACE(sched_wakeup_new, DECLARE_TRACE(sched_wakeup_new,
TPPROTO(struct rq *rq, struct task_struct *p), TPPROTO(struct rq *rq, struct task_struct *p, int success),
TPARGS(rq, p)); TPARGS(rq, p, success));
DECLARE_TRACE(sched_switch, DECLARE_TRACE(sched_switch,
TPPROTO(struct rq *rq, struct task_struct *prev, TPPROTO(struct rq *rq, struct task_struct *prev,
......
...@@ -2457,7 +2457,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) ...@@ -2457,7 +2457,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
p->sched_class->task_new(rq, p); p->sched_class->task_new(rq, p);
inc_nr_running(rq); inc_nr_running(rq);
} }
trace_sched_wakeup_new(rq, p); trace_sched_wakeup_new(rq, p, 1);
check_preempt_curr(rq, p, 0); check_preempt_curr(rq, p, 0);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (p->sched_class->task_wake_up) if (p->sched_class->task_wake_up)
......
...@@ -247,3 +247,4 @@ __init static int init_sched_switch_trace(void) ...@@ -247,3 +247,4 @@ __init static int init_sched_switch_trace(void)
return register_tracer(&sched_switch_trace); return register_tracer(&sched_switch_trace);
} }
device_initcall(init_sched_switch_trace); device_initcall(init_sched_switch_trace);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册