diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-10-24 18:58:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-04 06:10:45 -0500 |
commit | 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb (patch) | |
tree | 1f956e500f6793fba62fd528134310253edda76c /include/linux/perf_event.h | |
parent | 22c4bd9fa921c2b1b3f2420d7b9dabbe982f3059 (diff) |
perf: Add pmu callbacks to track event mapping and unmapping
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Vince Weaver <vince@deater.net>
Cc: "hillf.zj" <hillf.zj@alibaba-inc.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/266afcba1d1f91ea5501e4e16e94bbbc1a9339b6.1414190806.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 5cad0e6f3552..33262004c310 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -202,6 +202,13 @@ struct pmu { | |||
202 | */ | 202 | */ |
203 | int (*event_init) (struct perf_event *event); | 203 | int (*event_init) (struct perf_event *event); |
204 | 204 | ||
205 | /* | ||
206 | * Notification that the event was mapped or unmapped. Called | ||
207 | * in the context of the mapping task. | ||
208 | */ | ||
209 | void (*event_mapped) (struct perf_event *event); /*optional*/ | ||
210 | void (*event_unmapped) (struct perf_event *event); /*optional*/ | ||
211 | |||
205 | #define PERF_EF_START 0x01 /* start the counter when adding */ | 212 | #define PERF_EF_START 0x01 /* start the counter when adding */ |
206 | #define PERF_EF_RELOAD 0x02 /* reload the counter when starting */ | 213 | #define PERF_EF_RELOAD 0x02 /* reload the counter when starting */ |
207 | #define PERF_EF_UPDATE 0x04 /* update the counter when stopping */ | 214 | #define PERF_EF_UPDATE 0x04 /* update the counter when stopping */ |