Fix: Add missing health code update for consumer command
authorDavid Goulet <dgoulet@efficios.com>
Thu, 13 Dec 2012 21:35:44 +0000 (16:35 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 13 Dec 2012 21:43:20 +0000 (16:43 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/kernel-consumer.c
src/bin/lttng-sessiond/ust-consumer.c

index 2a9bf9983d937223e5131ed5c0d374599c052000..25f0e47998eebb85e753d249df947bbb02d1c72f 100644 (file)
@@ -52,11 +52,15 @@ int kernel_consumer_add_channel(struct consumer_socket *sock,
                        channel->channel->name,
                        channel->stream_count);
 
+       health_code_update(&health_thread_kernel);
+
        ret = consumer_send_channel(sock, &lkm);
        if (ret < 0) {
                goto error;
        }
 
+       health_code_update(&health_thread_kernel);
+
 error:
        return ret;
 }
@@ -123,11 +127,15 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        "metadata",
                        1);
 
+       health_code_update(&health_thread_kernel);
+
        ret = consumer_send_channel(sock, &lkm);
        if (ret < 0) {
                goto error;
        }
 
+       health_code_update(&health_thread_kernel);
+
        /* Prep stream message structure */
        consumer_init_stream_comm_msg(&lkm,
                        LTTNG_CONSUMER_ADD_STREAM,
@@ -144,6 +152,8 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        pathname,
                        session->id);
 
+       health_code_update(&health_thread_kernel);
+
        /* Send stream and file descriptor */
        ret = consumer_send_stream(sock, consumer, &lkm,
                        &session->metadata_stream_fd, 1);
@@ -151,6 +161,8 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                goto error;
        }
 
+       health_code_update(&health_thread_kernel);
+
 error:
        return ret;
 }
@@ -216,12 +228,16 @@ int kernel_consumer_add_stream(struct consumer_socket *sock,
                        pathname,
                        session->id);
 
+       health_code_update(&health_thread_kernel);
+
        /* Send stream and file descriptor */
        ret = consumer_send_stream(sock, consumer, &lkm, &stream->fd, 1);
        if (ret < 0) {
                goto error;
        }
 
+       health_code_update(&health_thread_kernel);
+
 error:
        return ret;
 }
index c1af765c9ab9821a855666da2613e96d6af16aab..e804f4b5ac74284c1c3b0b9ea23a9317b505649f 100644 (file)
@@ -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;
 }
@@ -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;
 }
@@ -220,11 +230,15 @@ static int send_metadata(struct consumer_socket *sock,
                        "metadata",
                        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 */
@@ -277,6 +293,8 @@ static int send_metadata(struct consumer_socket *sock,
                        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;
 }
This page took 0.027633 seconds and 4 git commands to generate.