Fix: push metadata on stop for per-UID buffers
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Jul 2013 12:59:12 +0000 (08:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Jul 2013 13:01:54 +0000 (09:01 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/ust-app.c

index 4dcaf4ffb71be6e1e8203947b35b3565663282cf..e5e45b43e4e2f74c8bdc0aadac59d056e5042bb7 100644 (file)
@@ -3960,7 +3960,7 @@ int ust_app_stop_trace_all(struct ltt_ust_session *usess)
                }
        }
 
-       /* Flush buffers */
+       /* Flush buffers and push metadata (for UID buffers). */
        switch (usess->buffer_type) {
        case LTTNG_BUFFER_PER_UID:
        {
@@ -3968,6 +3968,7 @@ int ust_app_stop_trace_all(struct ltt_ust_session *usess)
 
                /* Flush all per UID buffers associated to that session. */
                cds_list_for_each_entry(reg, &usess->buffer_reg_uid_list, lnode) {
+                       struct ust_registry_session *ust_session_reg;
                        struct buffer_reg_channel *reg_chan;
                        struct consumer_socket *socket;
 
@@ -3988,7 +3989,14 @@ int ust_app_stop_trace_all(struct ltt_ust_session *usess)
                                 */
                                (void) consumer_flush_channel(socket, reg_chan->consumer_key);
                        }
+
+                       ust_session_reg = reg->registry->reg.ust;
+                       if (!ust_session_reg->metadata_closed) {
+                               /* Push metadata. */
+                               (void) push_metadata(ust_session_reg, usess->consumer);
+                       }
                }
+
                break;
        }
        case LTTNG_BUFFER_PER_PID:
This page took 0.033945 seconds and 4 git commands to generate.