Skip to contentSkip to conversation

perf annotate stdio: Fix --show-total-period

tip:perf/core tip-bot for Taeung Song 1 participant 1 message Jul 26, 2017 perf events

lore
Share & tools
lore

tip-bot for Taeung Song

author merge bot
#0 lore raw
Commit-ID:  585d93c5ffccced26689e34095c0d74ef20a07d6
Gitweb:     http://git.kernel.org/tip/585d93c5ffccced26689e34095c0d74ef20a07d6
Author:     Taeung Song <[email protected]>
AuthorDate: Fri, 21 Jul 2017 11:58:20 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 25 Jul 2017 11:23:36 -0300

perf annotate stdio: Fix --show-total-period

We were showing the total number of samples, not the total period as asked by the user, fix it.

Cc Jiri Olsa <[email protected]>
Cc Martin Liška <[email protected]>
Cc Milian Wolff <[email protected]>
Fixes 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period")
[ split from a larger patch ]
---
 tools/perf/util/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/annotate.c +1 -1
index 00e085f..004072f 100644
@@ -1143,7 +1143,7 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
 
 			if (symbol_conf.show_total_period)
 				color_fprintf(stdout, color, " %7" PRIu64,
-					      sample.nr_samples);
+					      sample.period);
 			else
 				color_fprintf(stdout, color, " %7.2f", percent);
 		}