Add load/unload messages to kernel log
[lttng-modules.git] / lttng-events.c
index 455b790f45fbe06dd37da01b7b79be7477f77df5..a66e6711fc03bc0ec2a20732dc33e956451177c9 100644 (file)
@@ -1909,7 +1909,7 @@ int _lttng_enum_statedump(struct lttng_session *session,
        if (ret)
                goto end;
        ret = lttng_metadata_printf(session,
-               "enum : integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u; } {\n",
+               "enum : integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } {\n",
                container_type->size,
                container_type->alignment,
                container_type->signedness,
@@ -1918,7 +1918,13 @@ int _lttng_enum_statedump(struct lttng_session *session,
                        : (container_type->encoding == lttng_encode_UTF8)
                                ? "UTF8"
                                : "ASCII",
-               container_type->base);
+               container_type->base,
+#if __BYTE_ORDER == __BIG_ENDIAN
+               container_type->reverse_byte_order ? " byte_order = le;" : ""
+#else
+               container_type->reverse_byte_order ? " byte_order = be;" : ""
+#endif
+               );
        if (ret)
                goto end;
        /* Dump all entries */
@@ -2671,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:
@@ -2681,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;
 }
 
@@ -2697,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);
This page took 0.024331 seconds and 4 git commands to generate.