diff options
author | Avi Kivity <avi@redhat.com> | 2011-06-29 11:42:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-01 05:06:40 -0400 |
commit | 26ca5c11fb45ae2b2ac7e3574b8db6b3a3c7d350 (patch) | |
tree | 01f430828eaacf7ba3e0eb541f8d946f3d855696 /include/linux/perf_event.h | |
parent | 0af3ac1fdb9d5c297b4b07c9e0172531d42b6716 (diff) |
perf: export perf_event_refresh() to modules
KVM needs one-shot samples, since a PMC programmed to -X will fire after X
events and then again after 2^40 events (i.e. variable period).
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1309362157-6596-4-git-send-email-avi@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2a08cacb1628..3f2711ccf910 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -955,6 +955,7 @@ extern void perf_pmu_disable(struct pmu *pmu); | |||
955 | extern void perf_pmu_enable(struct pmu *pmu); | 955 | extern void perf_pmu_enable(struct pmu *pmu); |
956 | extern int perf_event_task_disable(void); | 956 | extern int perf_event_task_disable(void); |
957 | extern int perf_event_task_enable(void); | 957 | extern int perf_event_task_enable(void); |
958 | extern int perf_event_refresh(struct perf_event *event, int refresh); | ||
958 | extern void perf_event_update_userpage(struct perf_event *event); | 959 | extern void perf_event_update_userpage(struct perf_event *event); |
959 | extern int perf_event_release_kernel(struct perf_event *event); | 960 | extern int perf_event_release_kernel(struct perf_event *event); |
960 | extern struct perf_event * | 961 | extern struct perf_event * |
@@ -1149,6 +1150,10 @@ static inline void perf_event_delayed_put(struct task_struct *task) { } | |||
1149 | static inline void perf_event_print_debug(void) { } | 1150 | static inline void perf_event_print_debug(void) { } |
1150 | static inline int perf_event_task_disable(void) { return -EINVAL; } | 1151 | static inline int perf_event_task_disable(void) { return -EINVAL; } |
1151 | static inline int perf_event_task_enable(void) { return -EINVAL; } | 1152 | static inline int perf_event_task_enable(void) { return -EINVAL; } |
1153 | static inline int perf_event_refresh(struct perf_event *event, int refresh) | ||
1154 | { | ||
1155 | return -EINVAL; | ||
1156 | } | ||
1152 | 1157 | ||
1153 | static inline void | 1158 | static inline void |
1154 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { } | 1159 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { } |