perf evsel: Subclassing
authorArnaldo Carvalho de Melo <[email protected]>
Thu, 9 Oct 2014 18:29:51 +0000 (15:29 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
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 <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jean Pihet <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/evsel.c
tools/perf/util/evsel.h