Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191415
b: refs/heads/master
c: 27a9da6
h: refs/heads/master
i:
  191413: d1d2b18
  191411: deaf848
  191407: 567cf02
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 7, 2010
1 parent 3307301 commit a582f00
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48652ced1533c3372f996a0d83b6e73b1f1c9381
refs/heads/master: 27a9da6538ee18046d7bff8e36a9f783542c54c3
32 changes: 10 additions & 22 deletions trunk/include/trace/events/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ TRACE_EVENT(sched_kthread_stop_ret,

/*
* Tracepoint for waiting on task to unschedule:
*
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
TRACE_EVENT(sched_wait_task,

TP_PROTO(struct rq *rq, struct task_struct *p),
TP_PROTO(struct task_struct *p),

TP_ARGS(rq, p),
TP_ARGS(p),

TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
Expand All @@ -79,15 +76,12 @@ TRACE_EVENT(sched_wait_task,

/*
* Tracepoint for waking up a task:
*
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
DECLARE_EVENT_CLASS(sched_wakeup_template,

TP_PROTO(struct rq *rq, struct task_struct *p, int success),
TP_PROTO(struct task_struct *p, int success),

TP_ARGS(rq, p, success),
TP_ARGS(p, success),

TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
Expand All @@ -111,31 +105,25 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
);

DEFINE_EVENT(sched_wakeup_template, sched_wakeup,
TP_PROTO(struct rq *rq, struct task_struct *p, int success),
TP_ARGS(rq, p, success));
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success));

/*
* Tracepoint for waking up a new task:
*
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new,
TP_PROTO(struct rq *rq, struct task_struct *p, int success),
TP_ARGS(rq, p, success));
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success));

/*
* Tracepoint for task switches, performed by the scheduler:
*
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
TRACE_EVENT(sched_switch,

TP_PROTO(struct rq *rq, struct task_struct *prev,
TP_PROTO(struct task_struct *prev,
struct task_struct *next),

TP_ARGS(rq, prev, next),
TP_ARGS(prev, next),

TP_STRUCT__entry(
__array( char, prev_comm, TASK_COMM_LEN )
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,7 +2168,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
* just go back and repeat.
*/
rq = task_rq_lock(p, &flags);
trace_sched_wait_task(rq, p);
trace_sched_wait_task(p);
running = task_running(rq, p);
on_rq = p->se.on_rq;
ncsw = 0;
Expand Down Expand Up @@ -2439,7 +2439,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
success = 1;

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

p->state = TASK_RUNNING;
Expand Down Expand Up @@ -2613,7 +2613,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)

rq = task_rq_lock(p, &flags);
activate_task(rq, p, 0);
trace_sched_wakeup_new(rq, p, 1);
trace_sched_wakeup_new(p, 1);
check_preempt_curr(rq, p, WF_FORK);
#ifdef CONFIG_SMP
if (p->sched_class->task_woken)
Expand Down Expand Up @@ -2833,7 +2833,7 @@ context_switch(struct rq *rq, struct task_struct *prev,
struct mm_struct *mm, *oldmm;

prepare_task_switch(rq, prev, next);
trace_sched_switch(rq, prev, next);
trace_sched_switch(prev, next);
mm = next->mm;
oldmm = prev->active_mm;
/*
Expand Down
3 changes: 1 addition & 2 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3212,8 +3212,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
}

static void
ftrace_graph_probe_sched_switch(struct rq *__rq, struct task_struct *prev,
struct task_struct *next)
ftrace_graph_probe_sched_switch(struct task_struct *prev, struct task_struct *next)
{
unsigned long long timestamp;
int index;
Expand Down
5 changes: 2 additions & 3 deletions trunk/kernel/trace/trace_sched_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
}

static void
probe_sched_switch(struct rq *__rq, struct task_struct *prev,
struct task_struct *next)
probe_sched_switch(struct task_struct *prev, struct task_struct *next)
{
struct trace_array_cpu *data;
unsigned long flags;
Expand Down Expand Up @@ -109,7 +108,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
}

static void
probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success)
probe_sched_wakeup(struct task_struct *wakee, int success)
{
struct trace_array_cpu *data;
unsigned long flags;
Expand Down
5 changes: 2 additions & 3 deletions trunk/kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ static void probe_wakeup_migrate_task(struct task_struct *task, int cpu)
}

static void notrace
probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next)
probe_wakeup_sched_switch(struct task_struct *prev, struct task_struct *next)
{
struct trace_array_cpu *data;
cycle_t T0, T1, delta;
Expand Down Expand Up @@ -200,7 +199,7 @@ static void wakeup_reset(struct trace_array *tr)
}

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

0 comments on commit a582f00

Please sign in to comment.