[lttng-dev] [PATCH lttng-modules] Add load/unload messages to kernel log
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu Dec 22 16:29:05 UTC 2016
merged, changed lttng: -> LTTng:
Thanks!
Mathieu
----- On Dec 21, 2016, at 5:55 PM, Michael Jeanson mjeanson at efficios.com wrote:
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> lttng-events.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/lttng-events.c b/lttng-events.c
> index 176908b..eeaac08 100644
> --- a/lttng-events.c
> +++ b/lttng-events.c
> @@ -2677,6 +2677,12 @@ static int __init lttng_events_init(void)
> ret = lttng_logger_init();
> if (ret)
> goto error_logger;
> + printk(KERN_NOTICE "lttng: Loaded modules v%s.%s.%s%s (%s)\n",
> + __stringify(LTTNG_MODULES_MAJOR_VERSION),
> + __stringify(LTTNG_MODULES_MINOR_VERSION),
> + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION),
> + LTTNG_MODULES_EXTRAVERSION,
> + LTTNG_VERSION_NAME);
> return 0;
>
> error_logger:
> @@ -2687,6 +2693,12 @@ error_kmem:
> lttng_tracepoint_exit();
> error_tp:
> lttng_context_exit();
> + printk(KERN_NOTICE "lttng: Failed to load modules v%s.%s.%s%s (%s)\n",
> + __stringify(LTTNG_MODULES_MAJOR_VERSION),
> + __stringify(LTTNG_MODULES_MINOR_VERSION),
> + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION),
> + LTTNG_MODULES_EXTRAVERSION,
> + LTTNG_VERSION_NAME);
> return ret;
> }
>
> @@ -2703,6 +2715,12 @@ static void __exit lttng_events_exit(void)
> kmem_cache_destroy(event_cache);
> lttng_tracepoint_exit();
> lttng_context_exit();
> + printk(KERN_NOTICE "lttng: Unloaded modules v%s.%s.%s%s (%s)\n",
> + __stringify(LTTNG_MODULES_MAJOR_VERSION),
> + __stringify(LTTNG_MODULES_MINOR_VERSION),
> + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION),
> + LTTNG_MODULES_EXTRAVERSION,
> + LTTNG_VERSION_NAME);
> }
>
> module_exit(lttng_events_exit);
> --
> 2.7.4
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list