summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorJiri Olsa2016-01-18 10:24:00 +0100
committerArnaldo Carvalho de Melo2016-02-03 15:13:11 +0100
commit452ce03b1e686f0b2da6c1644dce7cdc71e3c69c (patch)
tree93645122f65b1cb4122e470a27b86310838f2190 /tools/perf/util/hist.c
parentperf hists: Factor output_resort from hists__output_resort (diff)
downloadkernel-qcow2-linux-452ce03b1e686f0b2da6c1644dce7cdc71e3c69c.tar.gz
kernel-qcow2-linux-452ce03b1e686f0b2da6c1644dce7cdc71e3c69c.tar.xz
kernel-qcow2-linux-452ce03b1e686f0b2da6c1644dce7cdc71e3c69c.zip
perf hists: Introduce perf_evsel__output_resort function
Adding evsel specific function to sort hists_evsel based hists. The hists__output_resort can be now used to sort common hists object. 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-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 7797d06d4993..d07955c145e5 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1233,9 +1233,8 @@ static void output_resort(struct hists *hists, struct ui_progress *prog,
}
}
-void hists__output_resort(struct hists *hists, struct ui_progress *prog)
+void perf_evsel__output_resort(struct perf_evsel *evsel, 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)
@@ -1243,7 +1242,12 @@ void hists__output_resort(struct hists *hists, struct ui_progress *prog)
else
use_callchain = symbol_conf.use_callchain;
- output_resort(hists, prog, use_callchain);
+ output_resort(evsel__hists(evsel), prog, use_callchain);
+}
+
+void hists__output_resort(struct hists *hists, struct ui_progress *prog)
+{
+ output_resort(hists, prog, symbol_conf.use_callchain);
}
static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h,