aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 7602ccb3f40e..bdb41612bfec 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -274,6 +274,8 @@ struct perf_event_attr {
274 __u64 branch_sample_type; /* enum branch_sample_type */ 274 __u64 branch_sample_type; /* enum branch_sample_type */
275}; 275};
276 276
277#define perf_flags(attr) (*(&(attr)->read_format + 1))
278
277/* 279/*
278 * Ioctls that can be done on a perf event fd: 280 * Ioctls that can be done on a perf event fd:
279 */ 281 */
@@ -926,7 +928,7 @@ struct perf_event {
926 struct hw_perf_event hw; 928 struct hw_perf_event hw;
927 929
928 struct perf_event_context *ctx; 930 struct perf_event_context *ctx;
929 struct file *filp; 931 atomic_long_t refcount;
930 932
931 /* 933 /*
932 * These accumulate total time (in nanoseconds) that children 934 * These accumulate total time (in nanoseconds) that children
@@ -1296,6 +1298,7 @@ extern int perf_swevent_get_recursion_context(void);
1296extern void perf_swevent_put_recursion_context(int rctx); 1298extern void perf_swevent_put_recursion_context(int rctx);
1297extern void perf_event_enable(struct perf_event *event); 1299extern void perf_event_enable(struct perf_event *event);
1298extern void perf_event_disable(struct perf_event *event); 1300extern void perf_event_disable(struct perf_event *event);
1301extern int __perf_event_disable(void *info);
1299extern void perf_event_task_tick(void); 1302extern void perf_event_task_tick(void);
1300#else 1303#else
1301static inline void 1304static inline void
@@ -1334,6 +1337,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; }
1334static inline void perf_swevent_put_recursion_context(int rctx) { } 1337static inline void perf_swevent_put_recursion_context(int rctx) { }
1335static inline void perf_event_enable(struct perf_event *event) { } 1338static inline void perf_event_enable(struct perf_event *event) { }
1336static inline void perf_event_disable(struct perf_event *event) { } 1339static inline void perf_event_disable(struct perf_event *event) { }
1340static inline int __perf_event_disable(void *info) { return -1; }
1337static inline void perf_event_task_tick(void) { } 1341static inline void perf_event_task_tick(void) { }
1338#endif 1342#endif
1339 1343