perf evsel: Subclassing
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 9 Oct 2014 18:29:51 +0000 (15:29 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Oct 2014 20:32:03 +0000 (17:32 -0300)
commitce8ccff5dd6b87dfe3495c7e9c5d56169bbacf58
treee40b13129e87e5f7a9e0544776f151d4e5084965
parent2a1731fb85ec96a1f6a326fb2d52cd93494dafa2
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>
tools/perf/util/evsel.c
tools/perf/util/evsel.h