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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 76c5c8b724a7..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
@@ -1272,7 +1274,8 @@ static inline bool perf_paranoid_kernel(void)
1272extern void perf_event_init(void); 1274extern void perf_event_init(void);
1273extern void perf_tp_event(u64 addr, u64 count, void *record, 1275extern void perf_tp_event(u64 addr, u64 count, void *record,
1274 int entry_size, struct pt_regs *regs, 1276 int entry_size, struct pt_regs *regs,
1275 struct hlist_head *head, int rctx); 1277 struct hlist_head *head, int rctx,
1278 struct task_struct *task);
1276extern void perf_bp_event(struct perf_event *event, void *data); 1279extern void perf_bp_event(struct perf_event *event, void *data);
1277 1280
1278#ifndef perf_misc_flags 1281#ifndef perf_misc_flags
@@ -1295,6 +1298,7 @@ extern int perf_swevent_get_recursion_context(void);
1295extern void perf_swevent_put_recursion_context(int rctx); 1298extern void perf_swevent_put_recursion_context(int rctx);
1296extern void perf_event_enable(struct perf_event *event); 1299extern void perf_event_enable(struct perf_event *event);
1297extern void perf_event_disable(struct perf_event *event); 1300extern void perf_event_disable(struct perf_event *event);
1301extern int __perf_event_disable(void *info);
1298extern void perf_event_task_tick(void); 1302extern void perf_event_task_tick(void);
1299#else 1303#else
1300static inline void 1304static inline void
@@ -1333,6 +1337,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; }
1333static inline void perf_swevent_put_recursion_context(int rctx) { } 1337static inline void perf_swevent_put_recursion_context(int rctx) { }
1334static inline void perf_event_enable(struct perf_event *event) { } 1338static inline void perf_event_enable(struct perf_event *event) { }
1335static 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; }
1336static inline void perf_event_task_tick(void) { } 1341static inline void perf_event_task_tick(void) { }
1337#endif 1342#endif
1338 1343