diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-13 01:59:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-13 10:22:48 +0200 |
commit | 7362262687b21b0d04927a7615c162a3d064849e (patch) | |
tree | 58bfdd62cb077bbe5e6dee2d6caa67bf650ea840 /tools/perf/builtin-sched.c | |
parent | 66685678a03d0d8e8ba015472f280fb4f12f84c1 (diff) | |
download | op-kernel-dev-7362262687b21b0d04927a7615c162a3d064849e.zip op-kernel-dev-7362262687b21b0d04927a7615c162a3d064849e.tar.gz |
perf sched: Fix nsec to msec conversion
We are dividing a time in ns by 1e9. This is a nsec to sec
conversion. What we want is msecs. Fix it by dividing by 1e6.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 4357027..67a0ba8 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -1129,9 +1129,9 @@ static void output_lat_thread(struct task_atoms *atom_list) avg = atom_list->total_lat / atom_list->nb_atoms; printf("|%9.3f ms |%9llu | avg:%9.3f ms | max:%9.3f ms |\n", - (double)atom_list->total_runtime / 1e9, - atom_list->nb_atoms, (double)avg / 1e9, - (double)atom_list->max_lat / 1e9); + (double)atom_list->total_runtime / 1e6, + atom_list->nb_atoms, (double)avg / 1e6, + (double)atom_list->max_lat / 1e6); } static void __cmd_lat(void) @@ -1157,7 +1157,7 @@ static void __cmd_lat(void) printf("-----------------------------------------------------------------------------------\n"); printf(" TOTAL: |%9.3f ms |%9Ld |\n", - (double)all_runtime/1e9, all_count); + (double)all_runtime/1e6, all_count); printf("---------------------------------------------\n"); } |