aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/sort.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-07-05 08:56:04 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 00:00:39 -0300
commitf542e7670e48bc9d0aed351c1fd2ae0b65cc6f68 (patch)
tree465c63ef93a84bfee9368fd4a10ff0f9d9c2d2c0 /tools/perf/util/sort.h
parentperf hists: Introduce hist_entry__init function (diff)
downloadlinux-dev-f542e7670e48bc9d0aed351c1fd2ae0b65cc6f68.tar.xz
linux-dev-f542e7670e48bc9d0aed351c1fd2ae0b65cc6f68.zip
perf hists: Introduce hist_entry_ops
Introducing allocation callbacks, that allows to extend current hist_entry object into objects with special needs without polluting the current hist_entry 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/1467701765-26194-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/sort.h')
-rw-r--r--tools/perf/util/sort.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index ebb59cacd092..7ca37ea17395 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -67,6 +67,11 @@ struct hist_entry_diff {
};
};
+struct hist_entry_ops {
+ void *(*new)(size_t size);
+ void (*free)(void *ptr);
+};
+
/**
* struct hist_entry - histogram entry
*
@@ -125,6 +130,7 @@ struct hist_entry {
void *trace_output;
struct perf_hpp_list *hpp_list;
struct hist_entry *parent_he;
+ struct hist_entry_ops *ops;
union {
/* this is for hierarchical entry structure */
struct {