From: Mathieu Desnoyers Date: Thu, 9 Dec 2010 21:36:18 +0000 (-0500) Subject: Add basic lttng probes generation from TRACE_EVENT X-Git-Tag: v2.0-pre1~197 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6d61b34dfbcb172174d8b95f27462bd192ed2674;p=lttng-modules.git Add basic lttng probes generation from TRACE_EVENT (only build code) Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 109b8060..19acdbb6 100644 --- 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 index 00000000..31255675 --- /dev/null +++ b/probes/Makefile @@ -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 index 00000000..22ebd90d --- /dev/null +++ b/probes/lttng.h @@ -0,0 +1,2 @@ + +#error "blah" diff --git a/probes/sched.c b/probes/sched.c new file mode 100644 index 00000000..98bf5176 --- /dev/null +++ b/probes/sched.c @@ -0,0 +1,21 @@ +/* + * probes/sched.c + * + * Copyright 2010 (c) - Mathieu Desnoyers + * + * LTTng sched probes. + */ + +#include + +/* + * Create LTTng tracepoint probes. + */ +#define LTTNG_PACKAGE_BUILD +#define CREATE_TRACE_POINTS + +#include + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng sched probes");