Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288643
b: refs/heads/master
c: 5fde252
h: refs/heads/master
i:
  288641: 5e4aa68
  288639: 04077cd
v: v3
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Feb 6, 2012
1 parent a8321bf commit bdfda73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 762b2935fc0ea2eab3a0edc8333fedb95266c7a9
refs/heads/master: 5fde2523bddb71d96f12b6ee8d2a9a43cb99da96
8 changes: 7 additions & 1 deletion trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,12 +844,18 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)

fprintf(output, " # %8.3f GHz ", ratio);
} else if (runtime_nsecs_stats[cpu].n != 0) {
char unit = 'M';

total = avg_stats(&runtime_nsecs_stats[cpu]);

if (total)
ratio = 1000.0 * avg / total;
if (ratio < 0.001) {
ratio *= 1000;
unit = 'K';
}

fprintf(output, " # %8.3f M/sec ", ratio);
fprintf(output, " # %8.3f %c/sec ", ratio, unit);
} else {
fprintf(output, " ");
}
Expand Down

0 comments on commit bdfda73

Please sign in to comment.