Cleanup unused health state reference
authorDavid Goulet <dgoulet@efficios.com>
Thu, 24 Jan 2013 19:29:49 +0000 (14:29 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 24 Jan 2013 21:32:57 +0000 (16:32 -0500)
The old health state structure are not used anymore since we now rely on
TLS health state.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/consumer.h
src/bin/lttng-sessiond/health.h
src/bin/lttng-sessiond/kernel-consumer.c
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-consumer.c

index 1e7e3b1d579cc1287ac20abd45ccf35d5a70875a..11c98773ee363de996ff03d6d158695c4f6e67c7 100644 (file)
@@ -82,9 +82,6 @@ struct consumer_data {
        char err_unix_sock_path[PATH_MAX];
        char cmd_unix_sock_path[PATH_MAX];
 
-       /* Health check of the thread */
-       struct health_state health;
-
        /* communication lock */
        pthread_mutex_t lock;
 };
index 91a90706a77928acbcaa2fdd83bf8b958f69e7c1..34d2052e5249f8ce145005cfb3dafe5275b67bf6 100644 (file)
@@ -73,23 +73,11 @@ struct health_state {
 /* Declare TLS health state. */
 extern DECLARE_URCU_TLS(struct health_state, health_state);
 
-/* Health state counters for the client command thread */
-extern struct health_state health_thread_cmd;
-
-/* Health state counters for the application management thread */
-extern struct health_state health_thread_app_manage;
-
-/* Health state counters for the application registration thread */
-extern struct health_state health_thread_app_reg;
-
-/* Health state counters for the kernel thread */
-extern struct health_state health_thread_kernel;
-
 /*
  * Update current counter by 1 to indicate that the thread entered or
  * left a blocking state caused by a poll().
  */
-static inline void health_poll_update(struct health_state *state)
+static inline void health_poll_update(void)
 {
        uatomic_add(&URCU_TLS(health_state).current, HEALTH_POLL_VALUE);
 }
@@ -98,7 +86,7 @@ static inline void health_poll_update(struct health_state *state)
  * Update current counter by 2 indicates progress in execution of a
  * thread.
  */
-static inline void health_code_update(struct health_state *state)
+static inline void health_code_update(void)
 {
        uatomic_add(&URCU_TLS(health_state).current, HEALTH_CODE_VALUE);
 }
@@ -106,7 +94,7 @@ static inline void health_code_update(struct health_state *state)
 /*
  * Set health "error" flag.
  */
-static inline void health_error(struct health_state *state)
+static inline void health_error(void)
 {
        uatomic_or(&URCU_TLS(health_state).flags, HEALTH_ERROR);
 }
index 7fae5b0e96f08c2c1c1deb8197e4e9ec4f73c2e8..bdf9b4098be5edef16f3f1d9ad076637079304ec 100644 (file)
@@ -52,14 +52,14 @@ int kernel_consumer_add_channel(struct consumer_socket *sock,
                        channel->channel->name,
                        channel->stream_count);
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        ret = consumer_send_channel(sock, &lkm);
        if (ret < 0) {
                goto error;
        }
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
 error:
        return ret;
@@ -127,14 +127,14 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        DEFAULT_METADATA_NAME,
                        1);
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        ret = consumer_send_channel(sock, &lkm);
        if (ret < 0) {
                goto error;
        }
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        /* Prep stream message structure */
        consumer_init_stream_comm_msg(&lkm,
@@ -152,7 +152,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        pathname,
                        session->id);
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        /* Send stream and file descriptor */
        ret = consumer_send_stream(sock, consumer, &lkm,
@@ -161,7 +161,7 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
 error:
        return ret;
@@ -228,7 +228,7 @@ int kernel_consumer_add_stream(struct consumer_socket *sock,
                        pathname,
                        session->id);
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        /* Send stream and file descriptor */
        ret = consumer_send_stream(sock, consumer, &lkm, &stream->fd, 1);
@@ -236,7 +236,7 @@ int kernel_consumer_add_stream(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
 error:
        return ret;
index d999928feb8a0f06bfe24857fc3182f56c4f903f..859223a11216b1d342b0899ebdd4e66bc657d657 100644 (file)
@@ -222,12 +222,6 @@ enum consumerd_state {
 static enum consumerd_state ust_consumerd_state;
 static enum consumerd_state kernel_consumerd_state;
 
-/* Used for the health monitoring of the session daemon. See health.h */
-struct health_state health_thread_cmd;
-struct health_state health_thread_app_manage;
-struct health_state health_thread_app_reg;
-struct health_state health_thread_kernel;
-
 /*
  * Socket timeout for receiving and sending in seconds.
  */
@@ -717,14 +711,14 @@ static void *thread_manage_kernel(void *data)
                goto error_testpoint;
        }
 
-       health_code_update(&health_thread_kernel);
+       health_code_update();
 
        if (testpoint(thread_manage_kernel_before_loop)) {
                goto error_testpoint;
        }
 
        while (1) {
-               health_code_update(&health_thread_kernel);
+               health_code_update();
 
                if (update_poll_flag == 1) {
                        /* Clean events object. We are about to populate it again. */
@@ -752,9 +746,9 @@ static void *thread_manage_kernel(void *data)
 
                /* Poll infinite value of time */
        restart:
-               health_poll_update(&health_thread_kernel);
+               health_poll_update();
                ret = lttng_poll_wait(&events, -1);
-               health_poll_update(&health_thread_kernel);
+               health_poll_update();
                if (ret < 0) {
                        /*
                         * Restart interrupted system call.
@@ -777,7 +771,7 @@ static void *thread_manage_kernel(void *data)
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       health_code_update(&health_thread_kernel);
+                       health_code_update();
 
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_thread_quit_pipe(pollfd, revents);
@@ -825,7 +819,7 @@ error_testpoint:
        utils_close_pipe(kernel_poll_pipe);
        kernel_poll_pipe[0] = kernel_poll_pipe[1] = -1;
        if (err) {
-               health_error(&health_thread_kernel);
+               health_error();
                ERR("Health error occurred in %s", __func__);
                WARN("Kernel thread died unexpectedly. "
                                "Kernel tracing can continue but CPU hotplug is disabled.");
@@ -890,7 +884,7 @@ static void *thread_manage_consumer(void *data)
         * In a nutshell, the following poll update to the health state brings back
         * the state to an even value meaning a code path.
         */
-       health_poll_update(&consumer_data->health);
+       health_poll_update();
 
        /*
         * Pass 2 as size here for the thread quit pipe and kconsumerd_err_sock.
@@ -911,18 +905,18 @@ static void *thread_manage_consumer(void *data)
                goto error;
        }
 
-       health_code_update(&consumer_data->health);
+       health_code_update();
 
        /* Inifinite blocking call, waiting for transmission */
 restart:
-       health_poll_update(&consumer_data->health);
+       health_poll_update();
 
        if (testpoint(thread_manage_consumer)) {
                goto error;
        }
 
        ret = lttng_poll_wait(&events, -1);
-       health_poll_update(&consumer_data->health);
+       health_poll_update();
        if (ret < 0) {
                /*
                 * Restart interrupted system call.
@@ -940,7 +934,7 @@ restart:
                revents = LTTNG_POLL_GETEV(&events, i);
                pollfd = LTTNG_POLL_GETFD(&events, i);
 
-               health_code_update(&consumer_data->health);
+               health_code_update();
 
                /* Thread quit pipe has been closed. Killing thread. */
                ret = check_thread_quit_pipe(pollfd, revents);
@@ -969,7 +963,7 @@ restart:
         */
        (void) utils_set_fd_cloexec(sock);
 
-       health_code_update(&consumer_data->health);
+       health_code_update();
 
        DBG2("Receiving code from consumer err_sock");
 
@@ -980,7 +974,7 @@ restart:
                goto error;
        }
 
-       health_code_update(&consumer_data->health);
+       health_code_update();
 
        if (code == LTTCOMM_CONSUMERD_COMMAND_SOCK_READY) {
                consumer_data->cmd_sock =
@@ -1010,13 +1004,13 @@ restart:
                goto error;
        }
 
-       health_code_update(&consumer_data->health);
+       health_code_update();
 
        /* Inifinite blocking call, waiting for transmission */
 restart_poll:
-       health_poll_update(&consumer_data->health);
+       health_poll_update();
        ret = lttng_poll_wait(&events, -1);
-       health_poll_update(&consumer_data->health);
+       health_poll_update();
        if (ret < 0) {
                /*
                 * Restart interrupted system call.
@@ -1034,7 +1028,7 @@ restart_poll:
                revents = LTTNG_POLL_GETEV(&events, i);
                pollfd = LTTNG_POLL_GETFD(&events, i);
 
-               health_code_update(&consumer_data->health);
+               health_code_update();
 
                /* Thread quit pipe has been closed. Killing thread. */
                ret = check_thread_quit_pipe(pollfd, revents);
@@ -1052,7 +1046,7 @@ restart_poll:
                }
        }
 
-       health_code_update(&consumer_data->health);
+       health_code_update();
 
        /* Wait for any kconsumerd error */
        ret = lttcomm_recv_unix_sock(sock, &code,
@@ -1103,7 +1097,7 @@ error:
        lttng_poll_clean(&events);
 error_poll:
        if (err) {
-               health_error(&consumer_data->health);
+               health_error();
                ERR("Health error occurred in %s", __func__);
        }
        health_unregister();
@@ -1133,7 +1127,7 @@ static void *thread_manage_apps(void *data)
                goto error_testpoint;
        }
 
-       health_code_update(&health_thread_app_manage);
+       health_code_update();
 
        ret = create_thread_poll_set(&events, 2);
        if (ret < 0) {
@@ -1149,16 +1143,16 @@ static void *thread_manage_apps(void *data)
                goto error;
        }
 
-       health_code_update(&health_thread_app_manage);
+       health_code_update();
 
        while (1) {
                DBG("Apps thread polling on %d fds", LTTNG_POLL_GETNB(&events));
 
                /* Inifinite blocking call, waiting for transmission */
        restart:
-               health_poll_update(&health_thread_app_manage);
+               health_poll_update();
                ret = lttng_poll_wait(&events, -1);
-               health_poll_update(&health_thread_app_manage);
+               health_poll_update();
                if (ret < 0) {
                        /*
                         * Restart interrupted system call.
@@ -1176,7 +1170,7 @@ static void *thread_manage_apps(void *data)
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       health_code_update(&health_thread_app_manage);
+                       health_code_update();
 
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_thread_quit_pipe(pollfd, revents);
@@ -1200,7 +1194,7 @@ static void *thread_manage_apps(void *data)
                                                goto error;
                                        }
 
-                                       health_code_update(&health_thread_app_manage);
+                                       health_code_update();
 
                                        /* Register applicaton to the session daemon */
                                        ret = ust_app_register(&ust_cmd.reg_msg,
@@ -1211,7 +1205,7 @@ static void *thread_manage_apps(void *data)
                                                break;
                                        }
 
-                                       health_code_update(&health_thread_app_manage);
+                                       health_code_update();
 
                                        /*
                                         * Validate UST version compatibility.
@@ -1225,7 +1219,7 @@ static void *thread_manage_apps(void *data)
                                                update_ust_app(ust_cmd.sock);
                                        }
 
-                                       health_code_update(&health_thread_app_manage);
+                                       health_code_update();
 
                                        ret = ust_app_register_done(ust_cmd.sock);
                                        if (ret < 0) {
@@ -1256,7 +1250,7 @@ static void *thread_manage_apps(void *data)
                                                                ust_cmd.sock);
                                        }
 
-                                       health_code_update(&health_thread_app_manage);
+                                       health_code_update();
 
                                        break;
                                }
@@ -1278,7 +1272,7 @@ static void *thread_manage_apps(void *data)
                                }
                        }
 
-                       health_code_update(&health_thread_app_manage);
+                       health_code_update();
                }
        }
 
@@ -1297,7 +1291,7 @@ error_testpoint:
         */
 
        if (err) {
-               health_error(&health_thread_app_manage);
+               health_error();
                ERR("Health error occurred in %s", __func__);
        }
        health_unregister();
@@ -1436,9 +1430,9 @@ static void *thread_registration_apps(void *data)
 
                /* Inifinite blocking call, waiting for transmission */
        restart:
-               health_poll_update(&health_thread_app_reg);
+               health_poll_update();
                ret = lttng_poll_wait(&events, -1);
-               health_poll_update(&health_thread_app_reg);
+               health_poll_update();
                if (ret < 0) {
                        /*
                         * Restart interrupted system call.
@@ -1452,7 +1446,7 @@ static void *thread_registration_apps(void *data)
                nb_fd = ret;
 
                for (i = 0; i < nb_fd; i++) {
-                       health_code_update(&health_thread_app_reg);
+                       health_code_update();
 
                        /* Fetch once the poll data */
                        revents = LTTNG_POLL_GETEV(&events, i);
@@ -1504,7 +1498,7 @@ static void *thread_registration_apps(void *data)
                                                sock = -1;
                                                continue;
                                        }
-                                       health_code_update(&health_thread_app_reg);
+                                       health_code_update();
                                        ret = lttcomm_recv_unix_sock(sock, &ust_cmd->reg_msg,
                                                        sizeof(struct ust_register_msg));
                                        if (ret < 0 || ret < sizeof(struct ust_register_msg)) {
@@ -1522,7 +1516,7 @@ static void *thread_registration_apps(void *data)
                                                sock = -1;
                                                continue;
                                        }
-                                       health_code_update(&health_thread_app_reg);
+                                       health_code_update();
 
                                        ust_cmd->sock = sock;
                                        sock = -1;
@@ -1553,7 +1547,7 @@ static void *thread_registration_apps(void *data)
 exit:
 error:
        if (err) {
-               health_error(&health_thread_app_reg);
+               health_error();
                ERR("Health error occurred in %s", __func__);
        }
 
@@ -3174,7 +3168,7 @@ static void *thread_manage_clients(void *data)
                goto error_testpoint;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = lttcomm_listen_unix_sock(client_sock);
        if (ret < 0) {
@@ -3207,16 +3201,16 @@ static void *thread_manage_clients(void *data)
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        while (1) {
                DBG("Accepting client command ...");
 
                /* Inifinite blocking call, waiting for transmission */
        restart:
-               health_poll_update(&health_thread_cmd);
+               health_poll_update();
                ret = lttng_poll_wait(&events, -1);
-               health_poll_update(&health_thread_cmd);
+               health_poll_update();
                if (ret < 0) {
                        /*
                         * Restart interrupted system call.
@@ -3234,7 +3228,7 @@ static void *thread_manage_clients(void *data)
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       health_code_update(&health_thread_cmd);
+                       health_code_update();
 
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_thread_quit_pipe(pollfd, revents);
@@ -3254,7 +3248,7 @@ static void *thread_manage_clients(void *data)
 
                DBG("Wait for client response");
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                sock = lttcomm_accept_unix_sock(client_sock);
                if (sock < 0) {
@@ -3290,7 +3284,7 @@ static void *thread_manage_clients(void *data)
                cmd_ctx->llm = NULL;
                cmd_ctx->session = NULL;
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                /*
                 * Data is received from the lttng client. The struct
@@ -3311,7 +3305,7 @@ static void *thread_manage_clients(void *data)
                        continue;
                }
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                // TODO: Validate cmd_ctx including sanity check for
                // security purpose.
@@ -3344,7 +3338,7 @@ static void *thread_manage_clients(void *data)
                        continue;
                }
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                DBG("Sending response (size: %d, retcode: %s)",
                                cmd_ctx->lttng_msg_size,
@@ -3363,7 +3357,7 @@ static void *thread_manage_clients(void *data)
 
                clean_command_ctx(&cmd_ctx);
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
        }
 
 exit:
@@ -3390,7 +3384,7 @@ error_testpoint:
        }
 
        if (err) {
-               health_error(&health_thread_cmd);
+               health_error();
                ERR("Health error occurred in %s", __func__);
        }
 
index f46183bd36da99afabc8dbd66eea619539f59e24..679cace8a79063a07368163b46d7def48704f7f0 100644 (file)
@@ -554,7 +554,7 @@ int create_ust_channel_context(struct ust_app_channel *ua_chan,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_add_context(app->sock, &ua_ctx->ctx,
                        ua_chan->obj, &ua_ctx->obj);
@@ -567,7 +567,7 @@ int create_ust_channel_context(struct ust_app_channel *ua_chan,
        DBG2("UST app context created successfully for channel %s", ua_chan->name);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -580,7 +580,7 @@ int set_ust_event_filter(struct ust_app_event *ua_event,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        if (!ua_event->filter) {
                ret = 0;
@@ -596,7 +596,7 @@ int set_ust_event_filter(struct ust_app_event *ua_event,
        DBG2("UST filter set successfully for event %s", ua_event->name);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -608,7 +608,7 @@ static int disable_ust_event(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_disable(app->sock, ua_event->obj);
        if (ret < 0) {
@@ -622,7 +622,7 @@ static int disable_ust_event(struct ust_app *app,
                        ua_event->attr.name, app->pid);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -634,7 +634,7 @@ static int disable_ust_channel(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_disable(app->sock, ua_chan->obj);
        if (ret < 0) {
@@ -648,7 +648,7 @@ static int disable_ust_channel(struct ust_app *app,
                        ua_chan->name, app->pid);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -660,7 +660,7 @@ static int enable_ust_channel(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_enable(app->sock, ua_chan->obj);
        if (ret < 0) {
@@ -676,7 +676,7 @@ static int enable_ust_channel(struct ust_app *app,
                        ua_chan->name, app->pid);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -688,7 +688,7 @@ static int enable_ust_event(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_enable(app->sock, ua_event->obj);
        if (ret < 0) {
@@ -702,7 +702,7 @@ static int enable_ust_event(struct ust_app *app,
                        ua_event->attr.name, app->pid);
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -715,7 +715,7 @@ static int open_ust_metadata(struct ust_app *app,
        int ret;
        struct lttng_ust_channel_attr uattr;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        uattr.overwrite = ua_sess->metadata->attr.overwrite;
        uattr.subbuf_size = ua_sess->metadata->attr.subbuf_size;
@@ -744,7 +744,7 @@ static int open_ust_metadata(struct ust_app *app,
        ua_sess->metadata->handle = ua_sess->metadata->obj->handle;
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -756,7 +756,7 @@ static int create_ust_metadata_stream(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* We are going to receive 2 fds, we need to reserve them. */
        ret = lttng_fd_get(LTTNG_FD_APPS, 2);
@@ -773,7 +773,7 @@ static int create_ust_metadata_stream(struct ust_app *app,
        }
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -794,7 +794,7 @@ static int create_ust_stream(struct ust_app *app,
        assert(ua_chan->obj);
        assert(stream);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* We are going to receive 2 fds, we need to reserve them. */
        ret = lttng_fd_get(LTTNG_FD_APPS, 2);
@@ -833,7 +833,7 @@ static int create_ust_stream(struct ust_app *app,
        stream->handle = stream->obj->handle;
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -845,7 +845,7 @@ static int create_ust_channel(struct ust_app *app,
 {
        int ret;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* We are going to receive 2 fds, we need to reserve them. */
        ret = lttng_fd_get(LTTNG_FD_APPS, 2);
@@ -854,7 +854,7 @@ static int create_ust_channel(struct ust_app *app,
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_create_channel(app->sock, ua_sess->handle, &ua_chan->attr,
                        &ua_chan->obj);
@@ -872,7 +872,7 @@ static int create_ust_channel(struct ust_app *app,
        DBG2("UST app channel %s created successfully for pid:%d and sock:%d",
                        ua_chan->name, app->pid, app->sock);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* If channel is not enabled, disable it on the tracer */
        if (!ua_chan->enabled) {
@@ -883,7 +883,7 @@ static int create_ust_channel(struct ust_app *app,
        }
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -896,7 +896,7 @@ int create_ust_event(struct ust_app *app, struct ust_app_session *ua_sess,
 {
        int ret = 0;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Create UST event on tracer */
        ret = ustctl_create_event(app->sock, &ua_event->attr, ua_chan->obj,
@@ -912,7 +912,7 @@ int create_ust_event(struct ust_app *app, struct ust_app_session *ua_sess,
        DBG2("UST app event %s created successfully for pid:%d",
                        ua_event->attr.name, app->pid);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Set filter if one is present. */
        if (ua_event->filter) {
@@ -947,7 +947,7 @@ int create_ust_event(struct ust_app *app, struct ust_app_session *ua_sess,
        }
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -1138,7 +1138,7 @@ static int create_ust_app_session(struct ltt_ust_session *usess,
        assert(app);
        assert(ua_sess_ptr);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ua_sess = lookup_session_by_app(usess, app);
        if (ua_sess == NULL) {
@@ -1154,7 +1154,7 @@ static int create_ust_app_session(struct ltt_ust_session *usess,
                created = 1;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        if (ua_sess->handle == -1) {
                ret = ustctl_create_session(app->sock);
@@ -1188,7 +1188,7 @@ static int create_ust_app_session(struct ltt_ust_session *usess,
        ret = 0;
 
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -1714,7 +1714,7 @@ int ust_app_list_events(struct lttng_event **events)
        cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
                struct lttng_ust_tracepoint_iter uiter;
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                if (!app->compatible) {
                        /*
@@ -1732,7 +1732,7 @@ int ust_app_list_events(struct lttng_event **events)
 
                while ((ret = ustctl_tracepoint_list_get(app->sock, handle,
                                        &uiter)) != -LTTNG_UST_ERR_NOENT) {
-                       health_code_update(&health_thread_cmd);
+                       health_code_update();
                        if (count >= nbmem) {
                                /* In case the realloc fails, we free the memory */
                                void *ptr;
@@ -1766,7 +1766,7 @@ int ust_app_list_events(struct lttng_event **events)
 rcu_error:
        rcu_read_unlock();
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -1794,7 +1794,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields)
        cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
                struct lttng_ust_field_iter uiter;
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                if (!app->compatible) {
                        /*
@@ -1812,7 +1812,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields)
 
                while ((ret = ustctl_tracepoint_field_list_get(app->sock, handle,
                                        &uiter)) != -LTTNG_UST_ERR_NOENT) {
-                       health_code_update(&health_thread_cmd);
+                       health_code_update();
                        if (count >= nbmem) {
                                /* In case the realloc fails, we free the memory */
                                void *ptr;
@@ -1851,7 +1851,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields)
 rcu_error:
        rcu_read_unlock();
 error:
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return ret;
 }
 
@@ -2393,7 +2393,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                                goto error_rcu_unlock;
                        }
 
-                       health_code_update(&health_thread_cmd);
+                       health_code_update();
 
                        ret = create_ust_stream(app, ua_chan, ustream);
                        if (ret < 0) {
@@ -2408,7 +2408,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                                goto error_rcu_unlock;
                        }
 
-                       health_code_update(&health_thread_cmd);
+                       health_code_update();
 
                        /* Order is important this is why a list is used. */
                        cds_list_add_tail(&ustream->list, &ua_chan->streams.head);
@@ -2418,7 +2418,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                                        ustream->handle);
                }
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
        }
 
        switch (app->bits_per_long) {
@@ -2447,7 +2447,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                goto error_rcu_unlock;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
 skip_setup:
        /* This start the UST tracing */
@@ -2460,19 +2460,19 @@ skip_setup:
        /* Indicate that the session has been started once */
        ua_sess->started = 1;
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Quiescent wait after starting trace */
        ustctl_wait_quiescent(app->sock);
 
 end:
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return 0;
 
 error_rcu_unlock:
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return -1;
 }
 
@@ -2509,7 +2509,7 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
                goto error_rcu_unlock;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* This inhibits UST tracing */
        ret = ustctl_stop_session(app->sock, ua_sess->handle);
@@ -2518,17 +2518,17 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
                goto error_rcu_unlock;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Quiescent wait after stopping trace */
        ustctl_wait_quiescent(app->sock);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Flushing buffers */
        cds_lfht_for_each_entry(ua_sess->channels->ht, &iter.iter, ua_chan,
                        node.node) {
-               health_code_update(&health_thread_cmd);
+               health_code_update();
                ret = ustctl_sock_flush_buffer(app->sock, ua_chan->obj);
                if (ret < 0) {
                        ERR("UST app PID %d channel %s flush failed with ret %d",
@@ -2538,7 +2538,7 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
                }
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Flush all buffers before stopping */
        ret = ustctl_sock_flush_buffer(app->sock, ua_sess->metadata->obj);
@@ -2549,12 +2549,12 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app)
 
 end:
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return 0;
 
 error_rcu_unlock:
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return -1;
 }
 
@@ -2594,10 +2594,10 @@ static int destroy_trace(struct ltt_ust_session *usess, struct ust_app *app)
        obj.shm_fd = -1;
        obj.wait_fd = -1;
        obj.memory_map_size = 0;
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        ustctl_release_object(app->sock, &obj);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        delete_ust_app_session(app->sock, ua_sess);
 
        /* Quiescent wait after stopping trace */
@@ -2605,7 +2605,7 @@ static int destroy_trace(struct ltt_ust_session *usess, struct ust_app *app)
 
 end:
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return 0;
 }
 
@@ -2958,7 +2958,7 @@ int ust_app_validate_version(int sock)
        app = find_app_by_sock(sock);
        assert(app);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = ustctl_tracer_version(sock, &app->version);
        if (ret < 0) {
@@ -2975,7 +2975,7 @@ int ust_app_validate_version(int sock)
                        UST_APP_MAJOR_VERSION);
        app->compatible = 1;
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return 0;
 
 error:
@@ -2984,7 +2984,7 @@ error:
                        UST_APP_MAJOR_VERSION);
        app->compatible = 0;
        rcu_read_unlock();
-       health_code_update(&health_thread_cmd);
+       health_code_update();
        return -1;
 }
 
@@ -3008,7 +3008,7 @@ int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate)
                        continue;
                }
 
-               health_code_update(&health_thread_cmd);
+               health_code_update();
 
                ret = ustctl_calibrate(app->sock, calibrate);
                if (ret < 0) {
@@ -3030,7 +3030,7 @@ int ust_app_calibrate_glb(struct lttng_ust_calibrate *calibrate)
 
        rcu_read_unlock();
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        return ret;
 }
index ea9c8570353501ec86cb8ef7335a593bd7cf7ccb..f108e99bd0b1379bd751432bee5276394d97b054 100644 (file)
@@ -57,14 +57,14 @@ static int send_channel(struct consumer_socket *sock,
                        uchan->name,
                        uchan->streams.count);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = consumer_send_channel(sock, &msg);
        if (ret < 0) {
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        fd = uchan->obj->shm_fd;
        ret = consumer_send_fds(sock, &fd, 1);
@@ -72,7 +72,7 @@ static int send_channel(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
 error:
        return ret;
@@ -114,7 +114,7 @@ static int send_channel_stream(struct consumer_socket *sock,
                        pathname,
                        usess->id);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Send stream and file descriptor */
        fds[0] = stream->obj->shm_fd;
@@ -124,7 +124,7 @@ static int send_channel_stream(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
 error:
        return ret;
@@ -230,14 +230,14 @@ static int send_metadata(struct consumer_socket *sock,
                        DEFAULT_METADATA_NAME,
                        1);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        ret = consumer_send_channel(sock, &msg);
        if (ret < 0) {
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Sending metadata shared memory fd */
        fd = usess->metadata->obj->shm_fd;
@@ -246,7 +246,7 @@ static int send_metadata(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Get correct path name destination */
        if (consumer->type == CONSUMER_DST_LOCAL) {
@@ -293,7 +293,7 @@ static int send_metadata(struct consumer_socket *sock,
                        pathname,
                        usess->id);
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
        /* Send stream and file descriptor */
        fds[0] = usess->metadata->stream_obj->shm_fd;
@@ -303,7 +303,7 @@ static int send_metadata(struct consumer_socket *sock,
                goto error;
        }
 
-       health_code_update(&health_thread_cmd);
+       health_code_update();
 
 error:
        return ret;
This page took 0.068274 seconds and 4 git commands to generate.