Fix: kernel metadata is generated on the fly for snapshot sessions
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 8 Feb 2019 02:30:11 +0000 (21:30 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 18 Feb 2019 19:25:02 +0000 (14:25 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
src/bin/lttng-sessiond/kernel.c

index aac6665bef40a17021b03c88dc7f294be5e8553e..3ed65a83b206c2f3c6c374e031a428023305c80c 100644 (file)
@@ -1476,7 +1476,7 @@ enum lttng_error_code kernel_clear_session(struct ltt_session *session)
        assert(ksess);
        assert(ksess->consumer);
 
-       DBG("Cleat kernel session %s (session %" PRIu64 ")",
+       DBG("Clear kernel session %s (session %" PRIu64 ")",
                        session->name, session->id);
 
        rcu_read_lock();
@@ -1500,6 +1500,15 @@ enum lttng_error_code kernel_clear_session(struct ltt_session *session)
                        }
                }
 
+               if (!ksess->metadata) {
+                       /*
+                        * Nothing to do for the metadata.
+                        * This is a snpashot session.
+                        * The metadata is genererated on the fly.
+                        */
+                       continue;
+               }
+
                /*
                 * Clear the metadata channel.
                 * Metadata channel is not cleared per se but we still need to
This page took 0.027574 seconds and 5 git commands to generate.