diff options
author | 2016-08-01 20:02:34 +0200 | |
---|---|---|
committer | 2016-08-02 16:33:28 -0300 | |
commit | 52c5cc363f2c5f50e88d2d340c039cc72797d69a (patch) | |
tree | a5b301c27f2103ec31ce71cfec6ba6c236ee2621 /tools/perf/util/hist.h | |
parent | perf tools: Move config/Makefile into Makefile.config (diff) | |
download | linux-52c5cc363f2c5f50e88d2d340c039cc72797d69a.tar.gz linux-52c5cc363f2c5f50e88d2d340c039cc72797d69a.tar.bz2 linux-52c5cc363f2c5f50e88d2d340c039cc72797d69a.zip |
perf hists: Introduce output_resort_cb method
When dealing with nested hist entries it's helpful to have a way to
resort those nested objects.
Adding optional callback call into output_resort function and following
new interface function:
typedef int (*hists__resort_cb_t)(struct hist_entry *he);
void hists__output_resort_cb(struct hists *hists,
struct ui_progress *prog,
hists__resort_cb_t cb);
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/1470074555-24889-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 49aa4fac148f..0a1edf1ab450 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -153,8 +153,12 @@ int hist_entry__snprintf_alignment(struct hist_entry *he, struct perf_hpp *hpp, struct perf_hpp_fmt *fmt, int printed); void hist_entry__delete(struct hist_entry *he); +typedef int (*hists__resort_cb_t)(struct hist_entry *he); + void perf_evsel__output_resort(struct perf_evsel *evsel, struct ui_progress *prog); void hists__output_resort(struct hists *hists, struct ui_progress *prog); +void hists__output_resort_cb(struct hists *hists, struct ui_progress *prog, + hists__resort_cb_t cb); int hists__collapse_resort(struct hists *hists, struct ui_progress *prog); void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel); |