diff options
-rw-r--r-- | include/trace/events/sched.h | 32 | ||||
-rw-r--r-- | kernel/sched.c | 8 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 3 | ||||
-rw-r--r-- | kernel/trace/trace_sched_switch.c | 5 | ||||
-rw-r--r-- | kernel/trace/trace_sched_wakeup.c | 5 |
5 files changed, 19 insertions, 34 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index cfceb0b73e20..4f733ecea46e 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -51,15 +51,12 @@ TRACE_EVENT(sched_kthread_stop_ret, | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Tracepoint for waiting on task to unschedule: | 53 | * Tracepoint for waiting on task to unschedule: |
54 | * | ||
55 | * (NOTE: the 'rq' argument is not used by generic trace events, | ||
56 | * but used by the latency tracer plugin. ) | ||
57 | */ | 54 | */ |
58 | TRACE_EVENT(sched_wait_task, | 55 | TRACE_EVENT(sched_wait_task, |
59 | 56 | ||
60 | TP_PROTO(struct rq *rq, struct task_struct *p), | 57 | TP_PROTO(struct task_struct *p), |
61 | 58 | ||
62 | TP_ARGS(rq, p), | 59 | TP_ARGS(p), |
63 | 60 | ||
64 | TP_STRUCT__entry( | 61 | TP_STRUCT__entry( |
65 | __array( char, comm, TASK_COMM_LEN ) | 62 | __array( char, comm, TASK_COMM_LEN ) |
@@ -79,15 +76,12 @@ TRACE_EVENT(sched_wait_task, | |||
79 | 76 | ||
80 | /* | 77 | /* |
81 | * Tracepoint for waking up a task: | 78 | * Tracepoint for waking up a task: |
82 | * | ||
83 | * (NOTE: the 'rq' argument is not used by generic trace events, | ||
84 | * but used by the latency tracer plugin. ) | ||
85 | */ | 79 | */ |
86 | DECLARE_EVENT_CLASS(sched_wakeup_template, | 80 | DECLARE_EVENT_CLASS(sched_wakeup_template, |
87 | 81 | ||
88 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | 82 | TP_PROTO(struct task_struct *p, int success), |
89 | 83 | ||
90 | TP_ARGS(rq, p, success), | 84 | TP_ARGS(p, success), |
91 | 85 | ||
92 | TP_STRUCT__entry( | 86 | TP_STRUCT__entry( |
93 | __array( char, comm, TASK_COMM_LEN ) | 87 | __array( char, comm, TASK_COMM_LEN ) |
@@ -111,31 +105,25 @@ DECLARE_EVENT_CLASS(sched_wakeup_template, | |||
111 | ); | 105 | ); |
112 | 106 | ||
113 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup, | 107 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup, |
114 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | 108 | TP_PROTO(struct task_struct *p, int success), |
115 | TP_ARGS(rq, p, success)); | 109 | TP_ARGS(p, success)); |
116 | 110 | ||
117 | /* | 111 | /* |
118 | * Tracepoint for waking up a new task: | 112 | * Tracepoint for waking up a new task: |
119 | * | ||
120 | * (NOTE: the 'rq' argument is not used by generic trace events, | ||
121 | * but used by the latency tracer plugin. ) | ||
122 | */ | 113 | */ |
123 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new, | 114 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new, |
124 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | 115 | TP_PROTO(struct task_struct *p, int success), |
125 | TP_ARGS(rq, p, success)); | 116 | TP_ARGS(p, success)); |
126 | 117 | ||
127 | /* | 118 | /* |
128 | * Tracepoint for task switches, performed by the scheduler: | 119 | * Tracepoint for task switches, performed by the scheduler: |
129 | * | ||
130 | * (NOTE: the 'rq' argument is not used by generic trace events, | ||
131 | * but used by the latency tracer plugin. ) | ||
132 | */ | 120 | */ |
133 | TRACE_EVENT(sched_switch, | 121 | TRACE_EVENT(sched_switch, |
134 | 122 | ||
135 | TP_PROTO(struct rq *rq, struct task_struct *prev, | 123 | TP_PROTO(struct task_struct *prev, |
136 | struct task_struct *next), | 124 | struct task_struct *next), |
137 | 125 | ||
138 | TP_ARGS(rq, prev, next), | 126 | TP_ARGS(prev, next), |
139 | 127 | ||
140 | TP_STRUCT__entry( | 128 | TP_STRUCT__entry( |
141 | __array( char, prev_comm, TASK_COMM_LEN ) | 129 | __array( char, prev_comm, TASK_COMM_LEN ) |
diff --git a/kernel/sched.c b/kernel/sched.c index 4956ed092838..11ac0eb0bce7 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2168,7 +2168,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) | |||
2168 | * just go back and repeat. | 2168 | * just go back and repeat. |
2169 | */ | 2169 | */ |
2170 | rq = task_rq_lock(p, &flags); | 2170 | rq = task_rq_lock(p, &flags); |
2171 | trace_sched_wait_task(rq, p); | 2171 | trace_sched_wait_task(p); |
2172 | running = task_running(rq, p); | 2172 | running = task_running(rq, p); |
2173 | on_rq = p->se.on_rq; | 2173 | on_rq = p->se.on_rq; |
2174 | ncsw = 0; | 2174 | ncsw = 0; |
@@ -2439,7 +2439,7 @@ out_activate: | |||
2439 | success = 1; | 2439 | success = 1; |
2440 | 2440 | ||
2441 | out_running: | 2441 | out_running: |
2442 | trace_sched_wakeup(rq, p, success); | 2442 | trace_sched_wakeup(p, success); |
2443 | check_preempt_curr(rq, p, wake_flags); | 2443 | check_preempt_curr(rq, p, wake_flags); |
2444 | 2444 | ||
2445 | p->state = TASK_RUNNING; | 2445 | p->state = TASK_RUNNING; |
@@ -2613,7 +2613,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) | |||
2613 | 2613 | ||
2614 | rq = task_rq_lock(p, &flags); | 2614 | rq = task_rq_lock(p, &flags); |
2615 | activate_task(rq, p, 0); | 2615 | activate_task(rq, p, 0); |
2616 | trace_sched_wakeup_new(rq, p, 1); | 2616 | trace_sched_wakeup_new(p, 1); |
2617 | check_preempt_curr(rq, p, WF_FORK); | 2617 | check_preempt_curr(rq, p, WF_FORK); |
2618 | #ifdef CONFIG_SMP | 2618 | #ifdef CONFIG_SMP |
2619 | if (p->sched_class->task_woken) | 2619 | if (p->sched_class->task_woken) |
@@ -2833,7 +2833,7 @@ context_switch(struct rq *rq, struct task_struct *prev, | |||
2833 | struct mm_struct *mm, *oldmm; | 2833 | struct mm_struct *mm, *oldmm; |
2834 | 2834 | ||
2835 | prepare_task_switch(rq, prev, next); | 2835 | prepare_task_switch(rq, prev, next); |
2836 | trace_sched_switch(rq, prev, next); | 2836 | trace_sched_switch(prev, next); |
2837 | mm = next->mm; | 2837 | mm = next->mm; |
2838 | oldmm = prev->active_mm; | 2838 | oldmm = prev->active_mm; |
2839 | /* | 2839 | /* |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 2404b59b3097..aa3a92b511e2 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -3212,8 +3212,7 @@ free: | |||
3212 | } | 3212 | } |
3213 | 3213 | ||
3214 | static void | 3214 | static void |
3215 | ftrace_graph_probe_sched_switch(struct rq *__rq, struct task_struct *prev, | 3215 | ftrace_graph_probe_sched_switch(struct task_struct *prev, struct task_struct *next) |
3216 | struct task_struct *next) | ||
3217 | { | 3216 | { |
3218 | unsigned long long timestamp; | 3217 | unsigned long long timestamp; |
3219 | int index; | 3218 | int index; |
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c index 5fca0f51fde4..a55fccfede5d 100644 --- a/kernel/trace/trace_sched_switch.c +++ b/kernel/trace/trace_sched_switch.c | |||
@@ -50,8 +50,7 @@ tracing_sched_switch_trace(struct trace_array *tr, | |||
50 | } | 50 | } |
51 | 51 | ||
52 | static void | 52 | static void |
53 | probe_sched_switch(struct rq *__rq, struct task_struct *prev, | 53 | probe_sched_switch(struct task_struct *prev, struct task_struct *next) |
54 | struct task_struct *next) | ||
55 | { | 54 | { |
56 | struct trace_array_cpu *data; | 55 | struct trace_array_cpu *data; |
57 | unsigned long flags; | 56 | unsigned long flags; |
@@ -109,7 +108,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr, | |||
109 | } | 108 | } |
110 | 109 | ||
111 | static void | 110 | static void |
112 | probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success) | 111 | probe_sched_wakeup(struct task_struct *wakee, int success) |
113 | { | 112 | { |
114 | struct trace_array_cpu *data; | 113 | struct trace_array_cpu *data; |
115 | unsigned long flags; | 114 | unsigned long flags; |
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c index 0271742abb8d..8052446ceeaa 100644 --- a/kernel/trace/trace_sched_wakeup.c +++ b/kernel/trace/trace_sched_wakeup.c | |||
@@ -107,8 +107,7 @@ static void probe_wakeup_migrate_task(struct task_struct *task, int cpu) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static void notrace | 109 | static void notrace |
110 | probe_wakeup_sched_switch(struct rq *rq, struct task_struct *prev, | 110 | probe_wakeup_sched_switch(struct task_struct *prev, struct task_struct *next) |
111 | struct task_struct *next) | ||
112 | { | 111 | { |
113 | struct trace_array_cpu *data; | 112 | struct trace_array_cpu *data; |
114 | cycle_t T0, T1, delta; | 113 | cycle_t T0, T1, delta; |
@@ -200,7 +199,7 @@ static void wakeup_reset(struct trace_array *tr) | |||
200 | } | 199 | } |
201 | 200 | ||
202 | static void | 201 | static void |
203 | probe_wakeup(struct rq *rq, struct task_struct *p, int success) | 202 | probe_wakeup(struct task_struct *p, int success) |
204 | { | 203 | { |
205 | struct trace_array_cpu *data; | 204 | struct trace_array_cpu *data; |
206 | int cpu = smp_processor_id(); | 205 | int cpu = smp_processor_id(); |