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>
This commit is contained in:
Jiri Olsa
2016-01-18 10:24:00 +01:00
committed by Arnaldo Carvalho de Melo
parent 01441af5df
commit 452ce03b1e
8 changed files with 23 additions and 16 deletions

View File

@@ -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,