Drop support for kernels < 3.0 from perf.h wrapper
[lttng-modules.git] / wrapper / perf.h
CommitLineData
9f36eaed
MJ
1/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
2 *
886d51a3 3 * wrapper/perf.h
90f5546c 4 *
886d51a3 5 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
90f5546c
MD
6 */
7
9f36eaed
MJ
8#ifndef _LTTNG_WRAPPER_PERF_H
9#define _LTTNG_WRAPPER_PERF_H
10
90f5546c
MD
11#include <linux/perf_event.h>
12
bed5dbd4
DE
13#ifdef CONFIG_PERF_EVENTS
14
15#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
90f5546c
MD
16static inline struct perf_event *
17wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
18 int cpu,
19 struct task_struct *task,
20 perf_overflow_handler_t callback)
21{
22 return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
23}
bed5dbd4 24#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
90f5546c
MD
25static inline struct perf_event *
26wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
27 int cpu,
28 struct task_struct *task,
29 perf_overflow_handler_t callback)
30{
31 return perf_event_create_kernel_counter(attr, cpu, task, callback);
32}
bed5dbd4
DE
33#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
34
35#endif /* CONFIG_PERF_EVENTS */
90f5546c 36
a90917c3 37#endif /* _LTTNG_WRAPPER_PERF_H */
This page took 0.03538 seconds and 4 git commands to generate.