diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-09 20:29:51 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-14 22:32:03 +0200 |
commit | ce8ccff5dd6b87dfe3495c7e9c5d56169bbacf58 (patch) | |
tree | e40b13129e87e5f7a9e0544776f151d4e5084965 /tools/perf/util/evsel.h | |
parent | perf session: Remove last reference to hists struct (diff) | |
download | linux-ce8ccff5dd6b87dfe3495c7e9c5d56169bbacf58.tar.xz linux-ce8ccff5dd6b87dfe3495c7e9c5d56169bbacf58.zip |
perf evsel: Subclassing
Provide a method to be called at tool start to config the perf_evsel
instance size, together with optional constructor and destructor.
This will be used so that perf_evsel doesn't always include a struct
hists, tools that works with hists/hist_entries, like report, top and
annotate, will, at start, tell the evsel class the size they need per
instance.
v2: Don't use exit as a name of a member of function parameter, as this
breaks the build on at least fedora14 and rhel6.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-7t8cay0ieryox4gqosie85ek@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r-- | tools/perf/util/evsel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index ff72ce058724..d6325106c8fd 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -112,6 +112,10 @@ struct thread_map; struct perf_evlist; struct record_opts; +int perf_evsel__object_config(size_t object_size, + int (*init)(struct perf_evsel *evsel), + void (*fini)(struct perf_evsel *evsel)); + struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx); static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr) |