wrapper/perf.h: Fix kernel version condition
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Mon, 10 Dec 2012 18:18:32 +0000 (13:18 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 10 Dec 2012 18:19:02 +0000 (13:19 -0500)
The pid_t parameter of function perf_event_create_kernel_counter
was changed to task_struct pointer starting from 2.6.37.x.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
wrapper/perf.h

index 5dfa84b388ec2262030de819b208f5f83c9de065..5de205cdda1eec77f60d0616a9fe6296a11300cf 100644 (file)
@@ -34,7 +34,7 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
 }
 #else /* defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,99)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 static inline struct perf_event *
 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
                                int cpu,
@@ -43,7 +43,7 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
 {
        return perf_event_create_kernel_counter(attr, cpu, task, callback);
 }
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) */
+#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
 static inline struct perf_event *
 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
                                int cpu,
@@ -60,8 +60,11 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
        return perf_event_create_kernel_counter(attr, cpu, pid, callback);
 }
 
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
 #define local64_read(l)                atomic64_read(l)
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) */
+#endif
 
 #endif /* defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,99)) */
 
This page took 0.026599 seconds and 4 git commands to generate.