aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-18 18:41:45 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-24 10:18:05 -0500
commitef1d1af28ca37fdbc2745da040529cd2953c1af5 (patch)
treedff4a86fbc813ca808ce0607e3e041cdcdca5cec /tools/perf/util/evsel.h
parentd0dd74e853a0a6f37e8061d6d50be41c7034c54c (diff)
perf evsel: Introduce perf_evsel__{in,ex}it
Out of the {con,des}structor, as in interpreted language bindings we will need to go back from the wrapper object to the real thing. In that case using container_of will save us to have an extra pointer in the perf_evsel struct. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 667ee4e2e35e..7962e7587dea 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -52,6 +52,9 @@ struct thread_map;
52struct perf_evlist; 52struct perf_evlist;
53 53
54struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx); 54struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx);
55void perf_evsel__init(struct perf_evsel *evsel,
56 struct perf_event_attr *attr, int idx);
57void perf_evsel__exit(struct perf_evsel *evsel);
55void perf_evsel__delete(struct perf_evsel *evsel); 58void perf_evsel__delete(struct perf_evsel *evsel);
56 59
57int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); 60int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);