X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-consumer.c;h=ea9c8570353501ec86cb8ef7335a593bd7cf7ccb;hp=c1af765c9ab9821a855666da2613e96d6af16aab;hb=30079b6ba2522a6c3ac329fcaaa779bd4bf04f4a;hpb=f50f23d9f80ed9fae7fe5c49aee65e813e0031c8 diff --git a/src/bin/lttng-sessiond/ust-consumer.c b/src/bin/lttng-sessiond/ust-consumer.c index c1af765c9..ea9c85703 100644 --- a/src/bin/lttng-sessiond/ust-consumer.c +++ b/src/bin/lttng-sessiond/ust-consumer.c @@ -57,17 +57,23 @@ static int send_channel(struct consumer_socket *sock, uchan->name, uchan->streams.count); + health_code_update(&health_thread_cmd); + ret = consumer_send_channel(sock, &msg); if (ret < 0) { goto error; } + health_code_update(&health_thread_cmd); + fd = uchan->obj->shm_fd; ret = consumer_send_fds(sock, &fd, 1); if (ret < 0) { goto error; } + health_code_update(&health_thread_cmd); + error: return ret; } @@ -77,7 +83,7 @@ error: */ static int send_channel_stream(struct consumer_socket *sock, struct ust_app_channel *uchan, struct ust_app_session *usess, - struct ltt_ust_stream *stream, struct consumer_output *consumer, + struct ust_app_stream *stream, struct consumer_output *consumer, const char *pathname) { int ret, fds[2]; @@ -108,6 +114,8 @@ static int send_channel_stream(struct consumer_socket *sock, pathname, usess->id); + health_code_update(&health_thread_cmd); + /* Send stream and file descriptor */ fds[0] = stream->obj->shm_fd; fds[1] = stream->obj->wait_fd; @@ -116,6 +124,8 @@ static int send_channel_stream(struct consumer_socket *sock, goto error; } + health_code_update(&health_thread_cmd); + error: return ret; } @@ -130,7 +140,7 @@ static int send_channel_streams(struct consumer_socket *sock, int ret; char tmp_path[PATH_MAX]; const char *pathname; - struct ltt_ust_stream *stream, *tmp; + struct ust_app_stream *stream, *tmp; assert(sock); @@ -217,14 +227,18 @@ static int send_metadata(struct consumer_socket *sock, usess->metadata->obj->shm_fd, usess->metadata->attr.subbuf_size, usess->metadata->obj->memory_map_size, - "metadata", + DEFAULT_METADATA_NAME, 1); + health_code_update(&health_thread_cmd); + ret = consumer_send_channel(sock, &msg); if (ret < 0) { goto error; } + health_code_update(&health_thread_cmd); + /* Sending metadata shared memory fd */ fd = usess->metadata->obj->shm_fd; ret = consumer_send_fds(sock, &fd, 1); @@ -232,6 +246,8 @@ static int send_metadata(struct consumer_socket *sock, goto error; } + health_code_update(&health_thread_cmd); + /* Get correct path name destination */ if (consumer->type == CONSUMER_DST_LOCAL) { /* Set application path to the destination path */ @@ -273,10 +289,12 @@ static int send_metadata(struct consumer_socket *sock, usess->gid, consumer->net_seq_index, 1, /* Flag metadata set */ - "metadata", + DEFAULT_METADATA_NAME, pathname, usess->id); + health_code_update(&health_thread_cmd); + /* Send stream and file descriptor */ fds[0] = usess->metadata->stream_obj->shm_fd; fds[1] = usess->metadata->stream_obj->wait_fd; @@ -285,6 +303,8 @@ static int send_metadata(struct consumer_socket *sock, goto error; } + health_code_update(&health_thread_cmd); + error: return ret; }