Skip to content

Commit

Permalink
perf annotate stdio: Fix --show-total-period
Browse files Browse the repository at this point in the history
We were showing the total number of samples, not the total period as
asked by the user, fix it.

Reported-by: Namhyung Kim <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Martin Liška <[email protected]>
Cc: Milian Wolff <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Fixes: 0c4a5bc ("perf annotate: Display total number of samples with --show-total-period")
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Taeung authored and acmel committed Jul 25, 2017
1 parent ecd5f99 commit 585d93c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 585d93c

Please sign in to comment.