X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel-consumer.c;h=044b1a81f58f19540a527370beadade74a6f297c;hp=f30c11ccc2fa2be882e77218220b5da7b746ed10;hb=6dc3064a30b0cc7cfa9fdd22da1963525dfb7388;hpb=57f272edb1b4ccb8869e3f5b69eb5461bcb56101 diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index f30c11ccc..044b1a81f 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -115,7 +115,7 @@ error: * Sending metadata to the consumer with command ADD_CHANNEL and ADD_STREAM. */ int kernel_consumer_add_metadata(struct consumer_socket *sock, - struct ltt_kernel_session *session) + struct ltt_kernel_session *session, int no_monitor) { int ret; char tmp_path[PATH_MAX]; @@ -195,6 +195,14 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock, session->metadata_stream_fd, 0); /* CPU: 0 for metadata. */ + /* + * Set the no monitor flag. If set to 1, it indicates the consumer to NOT + * monitor the stream but rather add it to a special list in the associated + * channel. This is used to handle ephemeral stream used by the snapshot + * command or store streams for the flight recorder mode. + */ + lkm.u.stream.no_monitor = no_monitor; + health_code_update(); /* Send stream and file descriptor */ @@ -323,7 +331,7 @@ int kernel_consumer_send_session(struct consumer_socket *sock, DBG("Sending session stream to kernel consumer"); if (session->metadata_stream_fd >= 0) { - ret = kernel_consumer_add_metadata(sock, session); + ret = kernel_consumer_add_metadata(sock, session, 0); if (ret < 0) { goto error; }