Add basic lttng probes generation from TRACE_EVENT
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 9 Dec 2010 21:36:18 +0000 (16:36 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 9 Dec 2010 21:36:18 +0000 (16:36 -0500)
(only build code)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
probes/Makefile [new file with mode: 0644]
probes/lttng.h [new file with mode: 0644]
probes/sched.c [new file with mode: 0644]

index 109b8060498b5cc57e860184f465614933357610..19acdbb64d84fbe3335ede4cc5d01c0b50a58e5b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,8 @@ obj-m += ltt-ring-buffer-client-overwrite.o
 obj-m += ltt-relay.o
 ltt-relay-objs :=  ltt-events.o ltt-event-header.o ltt-debugfs-abi.o
 
+obj-m += probes/
+
 #ltt-type-serializer.o
 #ltt-serialize.o
 #obj-m += ltt-marker-control.o
diff --git a/probes/Makefile b/probes/Makefile
new file mode 100644 (file)
index 0000000..3125567
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Makefile for the LTT probes.
+#
+
+ifneq ($(KERNELRELEASE),)
+ifneq ($(CONFIG_TRACEPOINTS),)
+
+ccflags-y += -I$(PWD)/probes
+obj-m += sched.o
+
+endif
+
+else
+       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+       PWD := $(shell pwd)
+       CFLAGS = $(EXTCFLAGS)
+
+default:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+
+modules_install:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
+       /sbin/depmod -a
+
+clean:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+
+endif
diff --git a/probes/lttng.h b/probes/lttng.h
new file mode 100644 (file)
index 0000000..22ebd90
--- /dev/null
@@ -0,0 +1,2 @@
+
+#error "blah"
diff --git a/probes/sched.c b/probes/sched.c
new file mode 100644 (file)
index 0000000..98bf517
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * probes/sched.c
+ *
+ * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng sched probes.
+ */
+
+#include <linux/module.h>
+
+/*
+ * Create LTTng tracepoint probes.
+ */
+#define LTTNG_PACKAGE_BUILD
+#define CREATE_TRACE_POINTS
+
+#include <trace/events/sched.h>
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>");
+MODULE_DESCRIPTION("LTTng sched probes");
This page took 0.028073 seconds and 4 git commands to generate.