Skip to content

Commit

Permalink
sched, trace: update trace_sched_wakeup()
Browse files Browse the repository at this point in the history
Impact: extend the wakeup tracepoint with the info whether the wakeup was real

Add the information needed to distinguish 'real' wakeups from 'false'
wakeups.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 25, 2008
1 parent 0ca59dd commit 468a15b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/trace/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ DECLARE_TRACE(sched_wait_task,
TPARGS(rq, p));

DECLARE_TRACE(sched_wakeup,
TPPROTO(struct rq *rq, struct task_struct *p),
TPARGS(rq, p));
TPPROTO(struct rq *rq, struct task_struct *p, int success),
TPARGS(rq, p, success));

DECLARE_TRACE(sched_wakeup_new,
TPPROTO(struct rq *rq, struct task_struct *p, int success),
Expand Down
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
success = 1;

out_running:
trace_sched_wakeup(rq, p);
trace_sched_wakeup(rq, p, success);
check_preempt_curr(rq, p, sync);

p->state = TASK_RUNNING;
Expand Down
2 changes: 1 addition & 1 deletion kernel/trace/trace_sched_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ probe_sched_switch(struct rq *__rq, struct task_struct *prev,
}

static void
probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee)
probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success)
{
struct trace_array_cpu *data;
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void wakeup_reset(struct trace_array *tr)
}

static void
probe_wakeup(struct rq *rq, struct task_struct *p)
probe_wakeup(struct rq *rq, struct task_struct *p, int success)
{
int cpu = smp_processor_id();
unsigned long flags;
Expand Down

0 comments on commit 468a15b

Please sign in to comment.