[lttng-dev] [PATCH 09/15] lttng: remove perf_event_create_kernel_counter wrapper
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Wed Nov 30 13:34:22 EST 2011
Now that LTTng is in the kernel tree, we don't need to support
deprecated APIs from older kernels.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
.../staging/lttng/lttng-context-perf-counters.c | 9 ++---
drivers/staging/lttng/wrapper/perf.h | 32 --------------------
2 files changed, 4 insertions(+), 37 deletions(-)
delete mode 100644 drivers/staging/lttng/wrapper/perf.h
diff --git a/drivers/staging/lttng/lttng-context-perf-counters.c b/drivers/staging/lttng/lttng-context-perf-counters.c
index 9910066..713c4df 100644
--- a/drivers/staging/lttng/lttng-context-perf-counters.c
+++ b/drivers/staging/lttng/lttng-context-perf-counters.c
@@ -14,7 +14,6 @@
#include <linux/string.h>
#include "ltt-events.h"
#include "wrapper/ringbuffer/frontend_types.h"
-#include "wrapper/perf.h"
#include "ltt-tracer.h"
static
@@ -123,8 +122,8 @@ int __cpuinit lttng_perf_counter_cpu_hp_callback(struct notifier_block *nb,
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
- pevent = wrapper_perf_event_create_kernel_counter(attr,
- cpu, NULL, overflow_callback);
+ pevent = perf_event_create_kernel_counter(attr,
+ cpu, NULL, overflow_callback, NULL);
if (!pevent || IS_ERR(pevent))
return NOTIFY_BAD;
if (pevent->state == PERF_EVENT_STATE_ERROR) {
@@ -211,8 +210,8 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
get_online_cpus();
for_each_online_cpu(cpu) {
- events[cpu] = wrapper_perf_event_create_kernel_counter(attr,
- cpu, NULL, overflow_callback);
+ events[cpu] = perf_event_create_kernel_counter(attr,
+ cpu, NULL, overflow_callback, NULL);
if (!events[cpu] || IS_ERR(events[cpu])) {
ret = -EINVAL;
goto counter_error;
diff --git a/drivers/staging/lttng/wrapper/perf.h b/drivers/staging/lttng/wrapper/perf.h
deleted file mode 100644
index 9a6dbfc..0000000
--- a/drivers/staging/lttng/wrapper/perf.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LTT_WRAPPER_PERF_H
-#define _LTT_WRAPPER_PERF_H
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers at efficios.com)
- *
- * Dual LGPL v2.1/GPL v2 license.
- */
-
-#include <linux/perf_event.h>
-
-#if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,99))
-static inline struct perf_event *
-wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
- int cpu,
- struct task_struct *task,
- perf_overflow_handler_t callback)
-{
- return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
-}
-#else
-static inline struct perf_event *
-wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
- int cpu,
- struct task_struct *task,
- perf_overflow_handler_t callback)
-{
- return perf_event_create_kernel_counter(attr, cpu, task, callback);
-}
-#endif
-
-#endif /* _LTT_WRAPPER_PERF_H */
--
1.7.5.4
More information about the lttng-dev
mailing list