diff options
| -rw-r--r-- | tools/perf/builtin-stat.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 784ed6d6e0d6..1d08c8084cc4 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -517,7 +517,10 @@ static void print_noise_pct(double total, double avg) | |||
| 517 | if (avg) | 517 | if (avg) |
| 518 | pct = 100.0*total/avg; | 518 | pct = 100.0*total/avg; |
| 519 | 519 | ||
| 520 | fprintf(stderr, " ( +-%6.2f%% )", pct); | 520 | if (csv_output) |
| 521 | fprintf(stderr, "%s%.2f%%", csv_sep, pct); | ||
| 522 | else | ||
| 523 | fprintf(stderr, " ( +-%6.2f%% )", pct); | ||
| 521 | } | 524 | } |
| 522 | 525 | ||
| 523 | static void print_noise(struct perf_evsel *evsel, double avg) | 526 | static void print_noise(struct perf_evsel *evsel, double avg) |
| @@ -882,13 +885,13 @@ static void print_counter_aggr(struct perf_evsel *counter) | |||
| 882 | else | 885 | else |
| 883 | abs_printout(-1, counter, avg); | 886 | abs_printout(-1, counter, avg); |
| 884 | 887 | ||
| 888 | print_noise(counter, avg); | ||
| 889 | |||
| 885 | if (csv_output) { | 890 | if (csv_output) { |
| 886 | fputc('\n', stderr); | 891 | fputc('\n', stderr); |
| 887 | return; | 892 | return; |
| 888 | } | 893 | } |
| 889 | 894 | ||
| 890 | print_noise(counter, avg); | ||
| 891 | |||
| 892 | if (scaled) { | 895 | if (scaled) { |
| 893 | double avg_enabled, avg_running; | 896 | double avg_enabled, avg_running; |
| 894 | 897 | ||
