/* 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: