Fix build and load against linux-2.6.33.x
authorSamuel Martin <smartin@aldebaran-robotics.com>
Mon, 17 Jun 2013 14:28:51 +0000 (10:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 17 Jun 2013 14:28:51 +0000 (10:28 -0400)
* lttng-event.h declared but did not implement
  lttng_add_perf_counter_to_ctx on kernel >=2.6.33, the implementation
  was in lttng-context-perf-counters.c, which was only included for
  kernel >=2.6.34.  This prevented the module from being loaded.

* on kernel 2.6.33.x, lttng-context-perf-counters.c complains about
  implicit declaration for {get,put}_online_cpus and
  {,un}register_cpu_notifier; so fix header inclusion.

Signed-off-by: Samuel Martin <smartin@aldebaran-robotics.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
lttng-context-perf-counters.c

index 39672afc61b29e506e8ff4fb66eb486f00fd2177..a9d1cb15911ba8d16c4d9e2af301246b8e492c3b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
 ifneq ($(CONFIG_PERF_EVENTS),)
 lttng-tracer-objs += $(shell \
        if [ $(VERSION) -ge 3 \
-               -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 34 \) ] ; then \
+               -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \
                echo "lttng-context-perf-counters.o" ; fi;)
 endif # CONFIG_PERF_EVENTS
 
index 73f4e958e4167818d33a14ae6c9d00fd30339006..d65f690805577a3f88a24d00395d8cc6ea2bafe5 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/perf_event.h>
 #include <linux/list.h>
 #include <linux/string.h>
+#include <linux/cpu.h>
 #include "lttng-events.h"
 #include "wrapper/ringbuffer/frontend_types.h"
 #include "wrapper/vmalloc.h"
This page took 0.026623 seconds and 4 git commands to generate.