1 #ifndef _LTT_WRAPPER_PERF_H
2 #define _LTT_WRAPPER_PERF_H
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
7 * Dual LGPL v2.1/GPL v2 license.
10 #include <linux/perf_event.h>
12 #if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,99))
13 static inline struct perf_event
*
14 wrapper_perf_event_create_kernel_counter(struct perf_event_attr
*attr
,
16 struct task_struct
*task
,
17 perf_overflow_handler_t callback
)
19 return perf_event_create_kernel_counter(attr
, cpu
, task
, callback
, NULL
);
22 static inline struct perf_event
*
23 wrapper_perf_event_create_kernel_counter(struct perf_event_attr
*attr
,
25 struct task_struct
*task
,
26 perf_overflow_handler_t callback
)
28 return perf_event_create_kernel_counter(attr
, cpu
, task
, callback
);
32 #endif /* _LTT_WRAPPER_PERF_H */