Hi, only one clock plugin can be used when building lttng inside the kernel. To be able to write a custom clock plugin it should be possible to not build the test clock plugin.
This appended patch is one way to make this possible. Regards Anders Wallin
From d6b2cd6dccf9f3fd8b4aea34da5fca0ff352de51 Mon Sep 17 00:00:00 2001 Message-Id: <d6b2cd6dccf9f3fd8b4aea34da5fca0ff352de51.1468955785.git.anders.wal...@windriver.com> From: Anders Wallin <[email protected]> Date: Tue, 19 Jul 2016 21:06:09 +0200 Subject: [PATCH 1/1] Added kernel configuration for lttng clock plugin Only one lttng clock plugin can be used and to make it possible to use a custom clock the test plugin must be unconfigured Signed-off-by: Anders Wallin <[email protected]> --- Kconfig | 2 ++ Makefile | 6 +++--- tests/Kbuild | 2 +- tests/Kconfig | 7 +++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 tests/Kconfig diff --git a/Kconfig b/Kconfig index 6b4ad68..c350b9b 100644 --- a/Kconfig +++ b/Kconfig @@ -10,3 +10,5 @@ config LTTNG the Linux kernel image, choose Y. If unsure, say N. + +source "lttng/tests/Kconfig" diff --git a/Makefile b/Makefile index c2b1213..8602649 100644 --- a/Makefile +++ b/Makefile @@ -107,15 +107,15 @@ CFLAGS = $(EXTCFLAGS) default: modules modules: - $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m modules + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules modules_install: - $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m modules_install + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules_install clean: $(MAKE) -C $(KERNELDIR) M=$(PWD) clean %.i: %.c - $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m $@ + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@ endif # KERNELRELEASE diff --git a/tests/Kbuild b/tests/Kbuild index 5e49007..aabb8e2 100644 --- a/tests/Kbuild +++ b/tests/Kbuild @@ -7,7 +7,7 @@ ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) obj-$(CONFIG_LTTNG) += lttng-test.o lttng-test-objs := probes/lttng-test.o -obj-$(CONFIG_LTTNG) += lttng-clock-plugin-test.o +obj-$(CONFIG_LTTNG_CLOCK_PLUGIN_TEST) += lttng-clock-plugin-test.o lttng-clock-plugin-test-objs := clock-plugin/lttng-clock-plugin-test.o # vim:syntax=make diff --git a/tests/Kconfig b/tests/Kconfig new file mode 100644 index 0000000..9a74867 --- /dev/null +++ b/tests/Kconfig @@ -0,0 +1,7 @@ +config LTTNG_CLOCK_PLUGIN_TEST + tristate "Use Test plugin as trace clock" + depends on LTTNG + help + Use the Test clock as trace clock. This plugin freezes the + time with 1 KHz for regression test + -- 2.9.1
_______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
