Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323551
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/10] perf hists: Fix min callchain hits calculation |
| Date | Mon, 01 Feb 2016 23:00:04 +0100 |
| Message-ID | <qXuFS-Cy-27@gated-at.bofh.it> (permalink) |
| References | <qXuw9-yR-7@gated-at.bofh.it> |
| X-Original-To | Ingo Molnar <mingo@kernel.org> |
| X-Mailer | git-send-email 2.5.0 |
| X-Srs-Rewrite | SMTP reverse-path rewritten from <acme@infradead.org> by casper.infradead.org |
| 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 | 56 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>, Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>, Frederic Weisbecker <fweisbec@gmail.com>, Jiri Olsa <jolsa@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Wang Nan <wangnan0@huawei.com>, Arnaldo Carvalho de Melo <acme@redhat.com> |
| X-Original-Date | Mon, 1 Feb 2016 18:49:10 -0300 |
| X-Original-Message-ID | <1454363359-27435-2-git-send-email-acme@kernel.org> |
| X-Original-References | <1454363359-27435-1-git-send-email-acme@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1323551 |
Show key headers only | View raw
See http://www.infradead.org/rpr.html
From: Namhyung Kim <namhyung@kernel.org>
The total period should be get using hists__total_period() since it
takes filtered entries into account. In addition, if callchain mode is
'fractal', the total period should be the entry's period.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1453909257-26015-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 81ce0aff69d1..b96194676c91 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1163,9 +1163,18 @@ static void __hists__insert_output_entry(struct rb_root *entries,
struct rb_node *parent = NULL;
struct hist_entry *iter;
- if (use_callchain)
+ if (use_callchain) {
+ if (callchain_param.mode == CHAIN_GRAPH_REL) {
+ u64 total = he->stat.period;
+
+ if (symbol_conf.cumulate_callchain)
+ total = he->stat_acc->period;
+
+ min_callchain_hits = total * (callchain_param.min_percent / 100);
+ }
callchain_param.sort(&he->sorted_chain, he->callchain,
min_callchain_hits, &callchain_param);
+ }
while (*p != NULL) {
parent = *p;
@@ -1195,7 +1204,7 @@ void hists__output_resort(struct hists *hists, struct ui_progress *prog)
else
use_callchain = symbol_conf.use_callchain;
- min_callchain_hits = hists->stats.total_period * (callchain_param.min_percent / 100);
+ min_callchain_hits = hists__total_period(hists) * (callchain_param.min_percent / 100);
if (sort__need_collapse)
root = &hists->entries_collapsed;
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/10] perf/core callchains improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-01 23:00 +0100 [PATCH 06/10] perf report: Fix percent display in callchains on --stdio Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-01 23:00 +0100 [PATCH 01/10] perf hists: Fix min callchain hits calculation Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-01 23:00 +0100 [PATCH 05/10] perf callchain: Pass parent_samples to __callchain__fprintf_graph() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-01 23:00 +0100 Re: [GIT PULL 00/10] perf/core callchains improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-02-03 11:10 +0100
csiph-web