SoW-2020-0003: Trace Hit Counters
[lttng-tools.git] / src / bin / lttng-sessiond / clear.c
index 03abbd8e19090c55301c393936824a5bfc2a2c2d..3a08a119a686d2bffc6a849e0b346e1456d174a1 100644 (file)
@@ -188,12 +188,21 @@ int cmd_clear_session(struct ltt_session *session, int *sock_fd)
                /* Flag session that trace should start automatically */
                if (usess) {
                        int int_ret = ust_app_start_trace_all(usess);
-
                        if (int_ret < 0) {
                                ret = LTTNG_ERR_UST_START_FAIL;
                                goto end;
                        }
                }
+
+               /*
+                * Open a packet in every stream of the session to ensure that
+                * viewers can correctly identify the boundaries of the periods
+                * during which tracing was active for this session.
+                */
+               ret = session_open_packets(session);
+               if (ret != LTTNG_OK) {
+                       goto end;
+               }
        }
        ret = LTTNG_OK;
 end:
This page took 0.025618 seconds and 5 git commands to generate.