9a6dbfc03c263cb7777d75e368b8ef360e1efdfe
[lttng-modules.git] / wrapper / perf.h
1 #ifndef _LTT_WRAPPER_PERF_H
2 #define _LTT_WRAPPER_PERF_H
3
4 /*
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
6 *
7 * Dual LGPL v2.1/GPL v2 license.
8 */
9
10 #include <linux/perf_event.h>
11
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,
15 int cpu,
16 struct task_struct *task,
17 perf_overflow_handler_t callback)
18 {
19 return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
20 }
21 #else
22 static inline struct perf_event *
23 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
24 int cpu,
25 struct task_struct *task,
26 perf_overflow_handler_t callback)
27 {
28 return perf_event_create_kernel_counter(attr, cpu, task, callback);
29 }
30 #endif
31
32 #endif /* _LTT_WRAPPER_PERF_H */
This page took 0.030426 seconds and 4 git commands to generate.