Only generate the bitwise enumerations when
CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM is enabled, so the default build
does not generate traces which lead to warnings when viewed with
babeltrace 1.x and babeltrace 2 with default options.
Change-Id: Id45c7a78b280a7f35bbeafb80f2f6f5aa1ebbdc9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
+# Experimental bitwise enum defaults to disabled.
+CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ?= n
+
+# Emulate Kconfig behavior of setting defines for config options.
+LKCPPFLAGS = $(KCPPFLAGS)
+ifeq ($(CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM),y)
+LKCPPFLAGS += -DCONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y
+endif
+
default: modules
modules:
default: modules
modules:
- $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ modules
- $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules_install
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ modules_install
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD)/src clean
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD)/src clean
# The following targets are used for development and debugging. They are not
# part of the build system.
%.i: %.c
# The following targets are used for development and debugging. They are not
# part of the build system.
%.i: %.c
- $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ $@
- $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ $@
- `CONFIG_KALLSYMS_ALL`: state dump of mapping between block device
number and name
- `CONFIG_KALLSYMS_ALL`: state dump of mapping between block device
number and name
+### LTTng specific kernel config options
+
+The following kernel configuration options are provided by LTTng:
+
+ - `CONFIG_LTTNG`: Build LTTng (Defaults to 'm').
+ - `CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM`: Enable the experimental bitwise
+ enumerations (Defaults to 'n'). This can be enabled by building with:
+
+ make CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y
+
+ - `CONFIG_LTTNG_CLOCK_PLUGIN_TEST`: Build the test clock plugin (Defaults to
+ 'm'). This plugin overrides the trace clock and should always be built as a
+ module for testing.
+
+
Customization/Extension
-----------------------
Customization/Extension
-----------------------
+config LTTNG_EXPERIMENTAL_BITWISE_ENUM
+ bool "LTTng experimental bitwise enum support"
+ default n
+ depends on LTTNG
+ help
+ Enable experimental bitwise enumerations. The traces produced with
+ this option enabled will generate warnings when read by trace
+ viewers with default options.
+
+ If unsure, say N.
+
source "lttng/src/tests/Kconfig"
source "lttng/src/tests/Kconfig"
+#ifdef CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM
+ printk(KERN_NOTICE "LTTng: Experimental bitwise enum enabled.\n");
+#endif /* CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM */