Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326731
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf hists: Factor output_resort from hists__output_resort |
| Date | Thu, 04 Feb 2016 13:40:02 +0100 |
| Message-ID | <qYrmy-da-13@gated-at.bofh.it> (permalink) |
| References | <qSes1-78G-5@gated-at.bofh.it> |
| X-Original-To | linux-tip-commits@vger.kernel.org |
| Reply-To | linux-kernel@vger.kernel.org, dsahern@gmail.com, acme@redhat.com, namhyung@kernel.org, mingo@kernel.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, hpa@zytor.com, tglx@linutronix.de |
| Git-Commit-ID | 01441af5df438a171bce36bc3c7cfb588bc98a7a |
| X-Mailer | tip-git-log-daemon |
| Robot-ID | <tip-bot.git.kernel.org> |
| Robot-Unsubscribe | Contact <mailto:hpa@kernel.org> to get blacklisted from these emails |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 8bit |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Disposition | inline |
| 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 | 71 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, namhyung@kernel.org, dsahern@gmail.com, hpa@zytor.com, tglx@linutronix.de, jolsa@kernel.org, a.p.zijlstra@chello.nl |
| X-Original-Date | Thu, 4 Feb 2016 04:33:33 -0800 |
| X-Original-Message-ID | <tip-01441af5df438a171bce36bc3c7cfb588bc98a7a@git.kernel.org> |
| X-Original-References | <1453109064-1026-2-git-send-email-jolsa@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1326731 |
Show key headers only | View raw
Commit-ID: 01441af5df438a171bce36bc3c7cfb588bc98a7a
Gitweb: http://git.kernel.org/tip/01441af5df438a171bce36bc3c7cfb588bc98a7a
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 18 Jan 2016 10:23:59 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 3 Feb 2016 11:13:11 -0300
perf hists: Factor output_resort from hists__output_resort
Currently hists__output_resort() depends on hists based on hists_evsel
struct, but we need to be able to sort common hists as well.
Cutting out the sorting base sorting code into output_resort
function, so it can be reused in following patch.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1453109064-1026-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 098310b..7797d06 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1197,19 +1197,13 @@ static void __hists__insert_output_entry(struct rb_root *entries,
rb_insert_color(&he->rb_node, entries);
}
-void hists__output_resort(struct hists *hists, struct ui_progress *prog)
+static void output_resort(struct hists *hists, struct ui_progress *prog,
+ bool use_callchain)
{
struct rb_root *root;
struct rb_node *next;
struct hist_entry *n;
u64 min_callchain_hits;
- struct perf_evsel *evsel = hists_to_evsel(hists);
- bool use_callchain;
-
- if (evsel && symbol_conf.use_callchain && !symbol_conf.show_ref_callgraph)
- use_callchain = evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN;
- else
- use_callchain = symbol_conf.use_callchain;
min_callchain_hits = hists__total_period(hists) * (callchain_param.min_percent / 100);
@@ -1239,6 +1233,19 @@ void hists__output_resort(struct hists *hists, struct ui_progress *prog)
}
}
+void hists__output_resort(struct hists *hists, struct ui_progress *prog)
+{
+ struct perf_evsel *evsel = hists_to_evsel(hists);
+ bool use_callchain;
+
+ if (evsel && symbol_conf.use_callchain && !symbol_conf.show_ref_callgraph)
+ use_callchain = evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN;
+ else
+ use_callchain = symbol_conf.use_callchain;
+
+ output_resort(hists, prog, use_callchain);
+}
+
static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h,
enum hist_filter filter)
{
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[tip:perf/core] perf hists: Factor output_resort from hists__output_resort tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-02-04 13:40 +0100
csiph-web