aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-05-01 11:25:44 -0400
committerIngo Molnar <mingo@kernel.org>2013-05-28 02:59:54 -0400
commitab573844e3058eef2788803d373019f8bebead57 (patch)
tree8d040ef2da05caccabce8ccb5f4b168ee3f63216 /include
parentddd40da4ccbabdd2e941837aa987e08dfa4396b4 (diff)
perf: Fix hw breakpoints overflow period sampling
The hw breakpoint pmu 'add' function is missing the period_left update needed for SW events. The perf HW breakpoint events use the SW events framework to process the overflow, so it needs to be properly initialized in the PMU 'add' method. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1367421944-19082-5-git-send-email-jolsa@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_event.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index f463a46424e2..fa38612d70b6 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -743,6 +743,7 @@ extern unsigned int perf_output_skip(struct perf_output_handle *handle,
743 unsigned int len); 743 unsigned int len);
744extern int perf_swevent_get_recursion_context(void); 744extern int perf_swevent_get_recursion_context(void);
745extern void perf_swevent_put_recursion_context(int rctx); 745extern void perf_swevent_put_recursion_context(int rctx);
746extern u64 perf_swevent_set_period(struct perf_event *event);
746extern void perf_event_enable(struct perf_event *event); 747extern void perf_event_enable(struct perf_event *event);
747extern void perf_event_disable(struct perf_event *event); 748extern void perf_event_disable(struct perf_event *event);
748extern int __perf_event_disable(void *info); 749extern int __perf_event_disable(void *info);
@@ -782,6 +783,7 @@ static inline void perf_event_fork(struct task_struct *tsk) { }
782static inline void perf_event_init(void) { } 783static inline void perf_event_init(void) { }
783static inline int perf_swevent_get_recursion_context(void) { return -1; } 784static inline int perf_swevent_get_recursion_context(void) { return -1; }
784static inline void perf_swevent_put_recursion_context(int rctx) { } 785static inline void perf_swevent_put_recursion_context(int rctx) { }
786static inline u64 perf_swevent_set_period(struct perf_event *event) { return 0; }
785static inline void perf_event_enable(struct perf_event *event) { } 787static inline void perf_event_enable(struct perf_event *event) { }
786static inline void perf_event_disable(struct perf_event *event) { } 788static inline void perf_event_disable(struct perf_event *event) { }
787static inline int __perf_event_disable(void *info) { return -1; } 789static inline int __perf_event_disable(void *info) { return -1; }