aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-09-12 19:59:05 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-13 04:22:48 -0400
commit7362262687b21b0d04927a7615c162a3d064849e (patch)
tree58bfdd62cb077bbe5e6dee2d6caa67bf650ea840 /tools
parent66685678a03d0d8e8ba015472f280fb4f12f84c1 (diff)
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')
-rw-r--r--tools/perf/builtin-sched.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 435702702789..67a0ba88aecf 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)
1129 avg = atom_list->total_lat / atom_list->nb_atoms; 1129 avg = atom_list->total_lat / atom_list->nb_atoms;
1130 1130
1131 printf("|%9.3f ms |%9llu | avg:%9.3f ms | max:%9.3f ms |\n", 1131 printf("|%9.3f ms |%9llu | avg:%9.3f ms | max:%9.3f ms |\n",
1132 (double)atom_list->total_runtime / 1e9, 1132 (double)atom_list->total_runtime / 1e6,
1133 atom_list->nb_atoms, (double)avg / 1e9, 1133 atom_list->nb_atoms, (double)avg / 1e6,
1134 (double)atom_list->max_lat / 1e9); 1134 (double)atom_list->max_lat / 1e6);
1135} 1135}
1136 1136
1137static void __cmd_lat(void) 1137static void __cmd_lat(void)
@@ -1157,7 +1157,7 @@ static void __cmd_lat(void)
1157 1157
1158 printf("-----------------------------------------------------------------------------------\n"); 1158 printf("-----------------------------------------------------------------------------------\n");
1159 printf(" TOTAL: |%9.3f ms |%9Ld |\n", 1159 printf(" TOTAL: |%9.3f ms |%9Ld |\n",
1160 (double)all_runtime/1e9, all_count); 1160 (double)all_runtime/1e6, all_count);
1161 printf("---------------------------------------------\n"); 1161 printf("---------------------------------------------\n");
1162} 1162}
1163 1163