[lttng-dev] [PATCH lttng-modules] Fix: the clock plugin must be initiated before first use of the clock

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Jul 22 12:24:27 UTC 2016


----- On Jul 22, 2016, at 3:14 AM, Anders Wallin wallinux at gmail.com wrote:

> When building lttng inside the kernel the clock plugin must be initated
> before the rest of the lttng code. Moved the module_init to
> rootfs_initcall. The functionality will not change when built as a
> module.

Hi Anders,

Good catch. There are a few issues with this patch:

> 
> Signed-off-by: Anders Wallin <wallinux at gmail.com>
> ---
> tests/clock-plugin/lttng-clock-plugin-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/clock-plugin/lttng-clock-plugin-test.c
> b/tests/clock-plugin/lttng-clock-plugin-test.c
> index f16ea64..bf81932 100644
> --- a/tests/clock-plugin/lttng-clock-plugin-test.c
> +++ b/tests/clock-plugin/lttng-clock-plugin-test.c
> @@ -67,7 +67,7 @@ int lttng_clock_plugin_init(void)
> {
>        return lttng_clock_register_plugin(&ltc, THIS_MODULE);

Those are "whitespaces" before "return", but should really be
a "tab". Results in:

Applying: Fix: the clock plugin must be initiated before first use of the clock
error: patch failed: tests/clock-plugin/lttng-clock-plugin-test.c:67
error: tests/clock-plugin/lttng-clock-plugin-test.c: patch does not apply
Patch failed at 0001 Fix: the clock plugin must be initiated before first use of the clock
The copy of the patch that failed is found in:
   /home/compudj/git/lttng-modules/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Can you resubmit with a mail client that does not turn
tabs into spaces ?

Thanks,

Mathieu

> }
> -module_init(lttng_clock_plugin_init);
> +rootfs_initcall(lttng_clock_plugin_init);
> 
> static __exit
> void lttng_clock_plugin_exit(void)
>> 
> --
> 2.9.2
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list