Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140938
b: refs/heads/master
c: 889a6c3
h: refs/heads/master
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Steven Rostedt committed Mar 13, 2009
1 parent 8ba96d3 commit d7f716c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 39842323ceb368d2ea36ab7696aedbe296e13b61
refs/heads/master: 889a6c367283709a80dad9413488472596a1a1d2
20 changes: 14 additions & 6 deletions trunk/kernel/trace/trace_workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,20 @@ static int workqueue_stat_show(struct seq_file *s, void *p)
struct cpu_workqueue_stats *cws = p;
unsigned long flags;
int cpu = cws->cpu;
struct task_struct *tsk = find_task_by_vpid(cws->pid);

seq_printf(s, "%3d %6d %6u %s\n", cws->cpu,
atomic_read(&cws->inserted),
cws->executed,
tsk ? tsk->comm : "<...>");
struct pid *pid;
struct task_struct *tsk;

pid = find_get_pid(cws->pid);
if (pid) {
tsk = get_pid_task(pid, PIDTYPE_PID);
if (tsk) {
seq_printf(s, "%3d %6d %6u %s\n", cws->cpu,
atomic_read(&cws->inserted), cws->executed,
tsk->comm);
put_task_struct(tsk);
}
put_pid(pid);
}

spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
if (&cws->list == workqueue_cpu_stat(cpu)->list.next)
Expand Down

0 comments on commit d7f716c

Please sign in to comment.