All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 4/9] perf annotate: Show the proper header when using --show-total-period
@ 2017-07-13 17:46 Taeung Song
  0 siblings, 0 replies; only message in thread
From: Taeung Song @ 2017-07-13 17:46 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Namhyung Kim, Jiri Olsa

Currently a first column is only "Percent",
so fix it to show correct column name based on given options.
(e.g. if using --show-total-period, show "Event count" as a first column)

Reported-by: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/util/annotate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 7311a00..1ac621a 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1852,7 +1852,9 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
 			4 * evsel->nr_members : 4;
 
 	graph_dotted_len = printf(" %-*.*s|	Source code & Disassembly of %s for %s (%" PRIu64 " %s)\n",
-				  width, width, "Percent", d_filename, evsel_name,
+				  width, width,
+				  symbol_conf.show_total_period ? "Event count" : "Percent",
+				  d_filename, evsel_name,
 				  symbol_conf.show_total_period ? h->total_period : h->total_samples,
 				  symbol_conf.show_total_period ? "event count" : "samples");
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-13 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13 17:46 [PATCH v2 4/9] perf annotate: Show the proper header when using --show-total-period Taeung Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.