projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Silence compiler "always false comparison" warning
[lttng-modules.git]
/
wrapper
/
perf.h
diff --git
a/wrapper/perf.h
b/wrapper/perf.h
index d774d4abbb5bce28e222acd50a060e3b7e8ba0bd..4a7f6d8582873b9075a021595aea291cec2971b0 100644
(file)
--- a/
wrapper/perf.h
+++ b/
wrapper/perf.h
@@
-1,15
+1,18
@@
-#ifndef _LTTNG_WRAPPER_PERF_H
-#define _LTTNG_WRAPPER_PERF_H
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
+/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
*
*
- * Dual LGPL v2.1/GPL v2 license.
+ * wrapper/perf.h
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
*/
+#ifndef _LTTNG_WRAPPER_PERF_H
+#define _LTTNG_WRAPPER_PERF_H
+
#include <linux/perf_event.h>
#include <linux/perf_event.h>
-#if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,99))
+#ifdef CONFIG_PERF_EVENTS
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
@@
-18,7
+21,7
@@
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
{
return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
}
{
return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
}
-#else
+#else
/* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
@@
-27,6
+30,8
@@
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
{
return perf_event_create_kernel_counter(attr, cpu, task, callback);
}
{
return perf_event_create_kernel_counter(attr, cpu, task, callback);
}
-#endif
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
+
+#endif /* CONFIG_PERF_EVENTS */
#endif /* _LTTNG_WRAPPER_PERF_H */
#endif /* _LTTNG_WRAPPER_PERF_H */
This page took
0.025834 seconds
and
4
git commands to generate.