aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/hw_breakpoint.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 5da472e434b7..a03daed08c59 100644
--- a/include/linux/hw_breakpoint.h
+++ b/include/linux/hw_breakpoint.h
@@ -28,6 +28,13 @@ struct perf_event_attr name = { \
28 .pinned = 1, \ 28 .pinned = 1, \
29}; 29};
30 30
31static inline void hw_breakpoint_init(struct perf_event_attr *attr)
32{
33 attr->type = PERF_TYPE_BREAKPOINT;
34 attr->size = sizeof(*attr);
35 attr->pinned = 1;
36}
37
31static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) 38static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
32{ 39{
33 return bp->attr.bp_addr; 40 return bp->attr.bp_addr;
@@ -59,19 +66,13 @@ modify_user_hw_breakpoint(struct perf_event *bp,
59 * Kernel breakpoints are not associated with any particular thread. 66 * Kernel breakpoints are not associated with any particular thread.
60 */ 67 */
61extern struct perf_event * 68extern struct perf_event *
62register_wide_hw_breakpoint_cpu(unsigned long addr, 69register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
63 int len,
64 int type,
65 perf_callback_t triggered, 70 perf_callback_t triggered,
66 int cpu, 71 int cpu);
67 bool active);
68 72
69extern struct perf_event ** 73extern struct perf_event **
70register_wide_hw_breakpoint(unsigned long addr, 74register_wide_hw_breakpoint(struct perf_event_attr *attr,
71 int len, 75 perf_callback_t triggered);
72 int type,
73 perf_callback_t triggered,
74 bool active);
75 76
76extern int register_perf_hw_breakpoint(struct perf_event *bp); 77extern int register_perf_hw_breakpoint(struct perf_event *bp);
77extern int __register_perf_hw_breakpoint(struct perf_event *bp); 78extern int __register_perf_hw_breakpoint(struct perf_event *bp);
@@ -100,18 +101,12 @@ modify_user_hw_breakpoint(struct perf_event *bp,
100 perf_callback_t triggered, 101 perf_callback_t triggered,
101 struct task_struct *tsk) { return NULL; } 102 struct task_struct *tsk) { return NULL; }
102static inline struct perf_event * 103static inline struct perf_event *
103register_wide_hw_breakpoint_cpu(unsigned long addr, 104register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
104 int len,
105 int type,
106 perf_callback_t triggered, 105 perf_callback_t triggered,
107 int cpu, 106 int cpu) { return NULL; }
108 bool active) { return NULL; }
109static inline struct perf_event ** 107static inline struct perf_event **
110register_wide_hw_breakpoint(unsigned long addr, 108register_wide_hw_breakpoint(struct perf_event_attr *attr,
111 int len, 109 perf_callback_t triggered) { return NULL; }
112 int type,
113 perf_callback_t triggered,
114 bool active) { return NULL; }
115static inline int 110static inline int
116register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } 111register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; }
117static inline int 112static inline int