Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1434875
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 05/11] perf annotate: Add number of samples to the header |
| Date | Fri, 01 Jul 2016 00:20:01 +0200 |
| Message-ID | <rPStr-6J4-11@gated-at.bofh.it> (permalink) |
| References | <rPStr-6J4-9@gated-at.bofh.it> |
| X-Original-To | Ingo Molnar <mingo@kernel.org> |
| X-Mailer | git-send-email 2.7.4 |
| X-Srs-Rewrite | SMTP reverse-path rewritten from <acme@infradead.org> by merlin.infradead.org. See http://www.infradead.org/rpr.html |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Jiri Olsa <jolsa@kernel.org>, Arnaldo Carvalho de Melo <acme@redhat.com> |
| X-Original-Date | Thu, 30 Jun 2016 19:16:53 -0300 |
| X-Original-Message-ID | <1467325019-18785-6-git-send-email-acme@kernel.org> |
| X-Original-References | <1467325019-18785-1-git-send-email-acme@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1434875 |
Show key headers only | View raw
From: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Staring at annotations of large functions is useless if there's only a
few samples in them. Report the number of samples in the header to make
this easier to determine.
Committer note:
The change amounts to:
- Percent | Source code & Disassembly of perf-vdso.so for cycles:u
------------------------------------------------------------------
+ Percent | Source code & Disassembly of perf-vdso.so for cycles:u (3278 samples)
+--------------------------------------------------------------------------------
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20160630082955.GA30921@twins.programming.kicks-ass.net
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 78e5d6f3ff61..e9825fe825fd 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1522,6 +1522,7 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
const char *d_filename;
const char *evsel_name = perf_evsel__name(evsel);
struct annotation *notes = symbol__annotation(sym);
+ struct sym_hist *h = annotation__histogram(notes, evsel->idx);
struct disasm_line *pos, *queue = NULL;
u64 start = map__rip_2objdump(map, sym->start);
int printed = 2, queue_len = 0;
@@ -1544,8 +1545,8 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
if (perf_evsel__is_group_event(evsel))
width *= evsel->nr_members;
- graph_dotted_len = printf(" %-*.*s| Source code & Disassembly of %s for %s\n",
- width, width, "Percent", d_filename, evsel_name);
+ graph_dotted_len = printf(" %-*.*s| Source code & Disassembly of %s for %s (%" PRIu64 " samples)\n",
+ width, width, "Percent", d_filename, evsel_name, h->sum);
printf("%-*.*s----\n",
graph_dotted_len, graph_dotted_len, graph_dotted_line);
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 05/11] perf annotate: Add number of samples to the header Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-01 00:20 +0200
csiph-web