diff options
author | mingo <mingo@europe.(none)> | 2009-09-14 18:30:44 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-14 18:34:57 +0200 |
commit | 08f69e6c2e59b3d73343f8c9ecf758e0133dbc22 (patch) | |
tree | 4e979b37f653004d849c04f96b098610a0356218 | |
parent | d11533893b31ab7806ff04bfa69ae646068610ce (diff) | |
download | linux-08f69e6c2e59b3d73343f8c9ecf758e0133dbc22.tar.gz linux-08f69e6c2e59b3d73343f8c9ecf758e0133dbc22.tar.bz2 linux-08f69e6c2e59b3d73343f8c9ecf758e0133dbc22.zip |
perf sched: Print PIDs too
Often it's useful to know the PID of the task as well - print it
out too.
( While at it, reformat the output to be a bit more
paste-into-commit-logs friendly. )
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | tools/perf/builtin-sched.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index f856a02cd4fc..93ef7b215aba 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -1144,9 +1144,9 @@ static void output_lat_thread(struct task_atoms *atom_list) all_runtime += atom_list->total_runtime; all_count += atom_list->nb_atoms; - ret = printf(" %s ", atom_list->thread->comm); + ret = printf(" %s-%d ", atom_list->thread->comm, atom_list->thread->pid); - for (i = 0; i < 19 - ret; i++) + for (i = 0; i < 24 - ret; i++) printf(" "); avg = atom_list->total_lat / atom_list->nb_atoms; @@ -1296,9 +1296,9 @@ static void __cmd_lat(void) read_events(); sort_lat(); - printf("-----------------------------------------------------------------------------------\n"); - printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms |\n"); - printf("-----------------------------------------------------------------------------------\n"); + printf("\n ---------------------------------------------------------------------------------------\n"); + printf(" Task | Runtime ms | Switches | Average delay ms | Maximum delay ms |\n"); + printf(" ---------------------------------------------------------------------------------------\n"); next = rb_first(&sorted_atom_root); @@ -1310,8 +1310,8 @@ static void __cmd_lat(void) next = rb_next(next); } - printf("-----------------------------------------------------------------------------------\n"); - printf(" TOTAL: |%9.3f ms |%9Ld |", + printf(" ---------------------------------------------------------------------------------------\n"); + printf(" TOTAL: |%9.3f ms |%9Ld |", (double)all_runtime/1e6, all_count); if (unordered_timestamps && nr_timestamps) { @@ -1321,7 +1321,7 @@ static void __cmd_lat(void) printf("\n"); } - printf("---------------------------------------------\n"); + printf(" -------------------------------------------------\n\n"); } static struct trace_sched_handler *trace_handler; |