Skip to contentSkip to conversation

perf, tools: Print stddev in CSV mode with -a

PATCH In review Andi Kleen 2 participants 2 messages Apr 8, 2015 – Apr 10, 2015 perf events

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 perf, tools: Print stddev in CSV mode with -a

From: Andi Kleen <[email protected]>

Currently with -r.. -a -A ,x or other aggregation we don't print the stddev into the CSV output. Just drop the checks preventing this.

---
 tools/perf/builtin-stat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tools/perf/builtin-stat.c +2 -4
index d4d1b77..3de0ea5 100644
@@ -1282,8 +1282,7 @@ static void print_aggr(char *prefix)
 			else
 				abs_printout(id, nr, counter, uval);
 
-			if (!csv_output)
-				print_noise(counter, 1.0);
+			print_noise(counter, 1.0);
 
 			print_running(run, ena);
 			fputc('\n', output);
@@ -1392,8 +1391,7 @@ static void print_counter(struct perf_evsel *counter, char *prefix)
 		else
 			abs_printout(cpu, 0, counter, uval);
 
-		if (!csv_output)
-			print_noise(counter, 1.0);
+		print_noise(counter, 1.0);
 		print_running(run, ena);
 
 		fputc('\n', output);
Signature · 1 line
2.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andi Kleen

From: Andi Kleen <[email protected]>

Currently with -r.. -a -A ,x or other aggregation we don't print the stddev into the CSV output. Just drop the checks preventing this.

we already print this print_counter_aggr so I think we can consider this as bugfix even though it changes current csv format

thanks,
jirka

Quoted 31 lines
---
 tools/perf/builtin-stat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tools/perf/builtin-stat.c +2 -4
index d4d1b77..3de0ea5 100644
@@ -1282,8 +1282,7 @@ static void print_aggr(char *prefix)
 			else
 				abs_printout(id, nr, counter, uval);
 
-			if (!csv_output)
-				print_noise(counter, 1.0);
+			print_noise(counter, 1.0);
 
 			print_running(run, ena);
 			fputc('\n', output);
@@ -1392,8 +1391,7 @@ static void print_counter(struct perf_evsel *counter, char *prefix)
 		else
 			abs_printout(cpu, 0, counter, uval);
 
-		if (!csv_output)
-			print_noise(counter, 1.0);
+		print_noise(counter, 1.0);
 		print_running(run, ena);
 
 		fputc('\n', output);
Signature · 1 line
2.3.3