diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-03-25 04:59:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-25 13:32:35 -0400 |
commit | 2f63b840bc8a816ac879ee773b035cf3e433fae4 (patch) | |
tree | 4a97c31e1d4484c0cfded92c185ba46066665c8b /kernel | |
parent | 220ba351dfa57eca4bec5ce0098a276446a47958 (diff) |
trace_workqueues: fix empty line's output
Empty lines separate cpus stat. After previous
fix(trace_stat: keep original order) applied, the empty lines
are displayed at incorrect position.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <49C9F266.2060706@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_workqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c index 9ab035b58cf1..797201e4a137 100644 --- a/kernel/trace/trace_workqueue.c +++ b/kernel/trace/trace_workqueue.c | |||
@@ -196,6 +196,11 @@ static int workqueue_stat_show(struct seq_file *s, void *p) | |||
196 | struct pid *pid; | 196 | struct pid *pid; |
197 | struct task_struct *tsk; | 197 | struct task_struct *tsk; |
198 | 198 | ||
199 | spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags); | ||
200 | if (&cws->list == workqueue_cpu_stat(cpu)->list.next) | ||
201 | seq_printf(s, "\n"); | ||
202 | spin_unlock_irqrestore(&workqueue_cpu_stat(cpu)->lock, flags); | ||
203 | |||
199 | pid = find_get_pid(cws->pid); | 204 | pid = find_get_pid(cws->pid); |
200 | if (pid) { | 205 | if (pid) { |
201 | tsk = get_pid_task(pid, PIDTYPE_PID); | 206 | tsk = get_pid_task(pid, PIDTYPE_PID); |
@@ -208,18 +213,13 @@ static int workqueue_stat_show(struct seq_file *s, void *p) | |||
208 | put_pid(pid); | 213 | put_pid(pid); |
209 | } | 214 | } |
210 | 215 | ||
211 | spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags); | ||
212 | if (&cws->list == workqueue_cpu_stat(cpu)->list.next) | ||
213 | seq_printf(s, "\n"); | ||
214 | spin_unlock_irqrestore(&workqueue_cpu_stat(cpu)->lock, flags); | ||
215 | |||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | static int workqueue_stat_headers(struct seq_file *s) | 219 | static int workqueue_stat_headers(struct seq_file *s) |
220 | { | 220 | { |
221 | seq_printf(s, "# CPU INSERTED EXECUTED NAME\n"); | 221 | seq_printf(s, "# CPU INSERTED EXECUTED NAME\n"); |
222 | seq_printf(s, "# | | | |\n\n"); | 222 | seq_printf(s, "# | | | |\n"); |
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
225 | 225 | ||