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>
char err_unix_sock_path[PATH_MAX];
char cmd_unix_sock_path[PATH_MAX];
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;
};
/* communication lock */
pthread_mutex_t lock;
};
/* Declare TLS health state. */
extern DECLARE_URCU_TLS(struct health_state, 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().
*/
/*
* 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);
}
{
uatomic_add(&URCU_TLS(health_state).current, HEALTH_POLL_VALUE);
}
* Update current counter by 2 indicates progress in execution of a
* thread.
*/
* 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);
}
{
uatomic_add(&URCU_TLS(health_state).current, HEALTH_CODE_VALUE);
}
/*
* Set health "error" flag.
*/
/*
* 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);
}
{
uatomic_or(&URCU_TLS(health_state).flags, HEALTH_ERROR);
}
channel->channel->name,
channel->stream_count);
channel->channel->name,
channel->stream_count);
- health_code_update(&health_thread_kernel);
ret = consumer_send_channel(sock, &lkm);
if (ret < 0) {
goto error;
}
ret = consumer_send_channel(sock, &lkm);
if (ret < 0) {
goto error;
}
- health_code_update(&health_thread_kernel);
DEFAULT_METADATA_NAME,
1);
DEFAULT_METADATA_NAME,
1);
- health_code_update(&health_thread_kernel);
ret = consumer_send_channel(sock, &lkm);
if (ret < 0) {
goto error;
}
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,
/* Prep stream message structure */
consumer_init_stream_comm_msg(&lkm,
- health_code_update(&health_thread_kernel);
/* Send stream and file descriptor */
ret = consumer_send_stream(sock, consumer, &lkm,
/* Send stream and file descriptor */
ret = consumer_send_stream(sock, consumer, &lkm,
- health_code_update(&health_thread_kernel);
- health_code_update(&health_thread_kernel);
/* Send stream and file descriptor */
ret = consumer_send_stream(sock, consumer, &lkm, &stream->fd, 1);
/* Send stream and file descriptor */
ret = consumer_send_stream(sock, consumer, &lkm, &stream->fd, 1);
- health_code_update(&health_thread_kernel);
static enum consumerd_state ust_consumerd_state;
static enum consumerd_state kernel_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.
*/
/*
* Socket timeout for receiving and sending in seconds.
*/
- health_code_update(&health_thread_kernel);
if (testpoint(thread_manage_kernel_before_loop)) {
goto error_testpoint;
}
while (1) {
if (testpoint(thread_manage_kernel_before_loop)) {
goto error_testpoint;
}
while (1) {
- health_code_update(&health_thread_kernel);
if (update_poll_flag == 1) {
/* Clean events object. We are about to populate it again. */
if (update_poll_flag == 1) {
/* Clean events object. We are about to populate it again. */
/* Poll infinite value of time */
restart:
/* Poll infinite value of time */
restart:
- health_poll_update(&health_thread_kernel);
ret = lttng_poll_wait(&events, -1);
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&health_thread_kernel);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- health_code_update(&health_thread_kernel);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
utils_close_pipe(kernel_poll_pipe);
kernel_poll_pipe[0] = kernel_poll_pipe[1] = -1;
if (err) {
utils_close_pipe(kernel_poll_pipe);
kernel_poll_pipe[0] = kernel_poll_pipe[1] = -1;
if (err) {
- health_error(&health_thread_kernel);
ERR("Health error occurred in %s", __func__);
WARN("Kernel thread died unexpectedly. "
"Kernel tracing can continue but CPU hotplug is disabled.");
ERR("Health error occurred in %s", __func__);
WARN("Kernel thread died unexpectedly. "
"Kernel tracing can continue but CPU hotplug is disabled.");
* In a nutshell, the following poll update to the health state brings back
* the state to an even value meaning a code path.
*/
* 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);
/*
* Pass 2 as size here for the thread quit pipe and kconsumerd_err_sock.
/*
* Pass 2 as size here for the thread quit pipe and kconsumerd_err_sock.
- health_code_update(&consumer_data->health);
/* Inifinite blocking call, waiting for transmission */
restart:
/* Inifinite blocking call, waiting for transmission */
restart:
- health_poll_update(&consumer_data->health);
if (testpoint(thread_manage_consumer)) {
goto error;
}
ret = lttng_poll_wait(&events, -1);
if (testpoint(thread_manage_consumer)) {
goto error;
}
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&consumer_data->health);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- health_code_update(&consumer_data->health);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
*/
(void) utils_set_fd_cloexec(sock);
*/
(void) utils_set_fd_cloexec(sock);
- health_code_update(&consumer_data->health);
DBG2("Receiving code from consumer err_sock");
DBG2("Receiving code from consumer err_sock");
- health_code_update(&consumer_data->health);
if (code == LTTCOMM_CONSUMERD_COMMAND_SOCK_READY) {
consumer_data->cmd_sock =
if (code == LTTCOMM_CONSUMERD_COMMAND_SOCK_READY) {
consumer_data->cmd_sock =
- health_code_update(&consumer_data->health);
/* Inifinite blocking call, waiting for transmission */
restart_poll:
/* Inifinite blocking call, waiting for transmission */
restart_poll:
- health_poll_update(&consumer_data->health);
ret = lttng_poll_wait(&events, -1);
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&consumer_data->health);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- health_code_update(&consumer_data->health);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
- health_code_update(&consumer_data->health);
/* Wait for any kconsumerd error */
ret = lttcomm_recv_unix_sock(sock, &code,
/* Wait for any kconsumerd error */
ret = lttcomm_recv_unix_sock(sock, &code,
lttng_poll_clean(&events);
error_poll:
if (err) {
lttng_poll_clean(&events);
error_poll:
if (err) {
- health_error(&consumer_data->health);
ERR("Health error occurred in %s", __func__);
}
health_unregister();
ERR("Health error occurred in %s", __func__);
}
health_unregister();
- health_code_update(&health_thread_app_manage);
ret = create_thread_poll_set(&events, 2);
if (ret < 0) {
ret = create_thread_poll_set(&events, 2);
if (ret < 0) {
- health_code_update(&health_thread_app_manage);
while (1) {
DBG("Apps thread polling on %d fds", LTTNG_POLL_GETNB(&events));
/* Inifinite blocking call, waiting for transmission */
restart:
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);
ret = lttng_poll_wait(&events, -1);
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&health_thread_app_manage);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- health_code_update(&health_thread_app_manage);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
- health_code_update(&health_thread_app_manage);
/* Register applicaton to the session daemon */
ret = ust_app_register(&ust_cmd.reg_msg,
/* Register applicaton to the session daemon */
ret = ust_app_register(&ust_cmd.reg_msg,
- health_code_update(&health_thread_app_manage);
/*
* Validate UST version compatibility.
/*
* Validate UST version compatibility.
update_ust_app(ust_cmd.sock);
}
update_ust_app(ust_cmd.sock);
}
- health_code_update(&health_thread_app_manage);
ret = ust_app_register_done(ust_cmd.sock);
if (ret < 0) {
ret = ust_app_register_done(ust_cmd.sock);
if (ret < 0) {
- health_code_update(&health_thread_app_manage);
- health_code_update(&health_thread_app_manage);
- health_error(&health_thread_app_manage);
ERR("Health error occurred in %s", __func__);
}
health_unregister();
ERR("Health error occurred in %s", __func__);
}
health_unregister();
/* Inifinite blocking call, waiting for transmission */
restart:
/* Inifinite blocking call, waiting for transmission */
restart:
- health_poll_update(&health_thread_app_reg);
ret = lttng_poll_wait(&events, -1);
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&health_thread_app_reg);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
nb_fd = ret;
for (i = 0; i < nb_fd; i++) {
nb_fd = ret;
for (i = 0; i < nb_fd; i++) {
- health_code_update(&health_thread_app_reg);
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
/* Fetch once the poll data */
revents = LTTNG_POLL_GETEV(&events, i);
- health_code_update(&health_thread_app_reg);
ret = lttcomm_recv_unix_sock(sock, &ust_cmd->reg_msg,
sizeof(struct ust_register_msg));
if (ret < 0 || ret < sizeof(struct ust_register_msg)) {
ret = lttcomm_recv_unix_sock(sock, &ust_cmd->reg_msg,
sizeof(struct ust_register_msg));
if (ret < 0 || ret < sizeof(struct ust_register_msg)) {
- health_code_update(&health_thread_app_reg);
ust_cmd->sock = sock;
sock = -1;
ust_cmd->sock = sock;
sock = -1;
- health_error(&health_thread_app_reg);
ERR("Health error occurred in %s", __func__);
}
ERR("Health error occurred in %s", __func__);
}
- health_code_update(&health_thread_cmd);
ret = lttcomm_listen_unix_sock(client_sock);
if (ret < 0) {
ret = lttcomm_listen_unix_sock(client_sock);
if (ret < 0) {
- health_code_update(&health_thread_cmd);
while (1) {
DBG("Accepting client command ...");
/* Inifinite blocking call, waiting for transmission */
restart:
while (1) {
DBG("Accepting client command ...");
/* Inifinite blocking call, waiting for transmission */
restart:
- health_poll_update(&health_thread_cmd);
ret = lttng_poll_wait(&events, -1);
ret = lttng_poll_wait(&events, -1);
- health_poll_update(&health_thread_cmd);
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
- health_code_update(&health_thread_cmd);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
DBG("Wait for client response");
DBG("Wait for client response");
- health_code_update(&health_thread_cmd);
sock = lttcomm_accept_unix_sock(client_sock);
if (sock < 0) {
sock = lttcomm_accept_unix_sock(client_sock);
if (sock < 0) {
cmd_ctx->llm = NULL;
cmd_ctx->session = NULL;
cmd_ctx->llm = NULL;
cmd_ctx->session = NULL;
- health_code_update(&health_thread_cmd);
/*
* Data is received from the lttng client. The struct
/*
* Data is received from the lttng client. The struct
- health_code_update(&health_thread_cmd);
// TODO: Validate cmd_ctx including sanity check for
// security purpose.
// TODO: Validate cmd_ctx including sanity check for
// security purpose.
- health_code_update(&health_thread_cmd);
DBG("Sending response (size: %d, retcode: %s)",
cmd_ctx->lttng_msg_size,
DBG("Sending response (size: %d, retcode: %s)",
cmd_ctx->lttng_msg_size,
clean_command_ctx(&cmd_ctx);
clean_command_ctx(&cmd_ctx);
- health_code_update(&health_thread_cmd);
- health_error(&health_thread_cmd);
ERR("Health error occurred in %s", __func__);
}
ERR("Health error occurred in %s", __func__);
}
- health_code_update(&health_thread_cmd);
ret = ustctl_add_context(app->sock, &ua_ctx->ctx,
ua_chan->obj, &ua_ctx->obj);
ret = ustctl_add_context(app->sock, &ua_ctx->ctx,
ua_chan->obj, &ua_ctx->obj);
DBG2("UST app context created successfully for channel %s", ua_chan->name);
error:
DBG2("UST app context created successfully for channel %s", ua_chan->name);
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
if (!ua_event->filter) {
ret = 0;
if (!ua_event->filter) {
ret = 0;
DBG2("UST filter set successfully for event %s", ua_event->name);
error:
DBG2("UST filter set successfully for event %s", ua_event->name);
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = ustctl_disable(app->sock, ua_event->obj);
if (ret < 0) {
ret = ustctl_disable(app->sock, ua_event->obj);
if (ret < 0) {
ua_event->attr.name, app->pid);
error:
ua_event->attr.name, app->pid);
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = ustctl_disable(app->sock, ua_chan->obj);
if (ret < 0) {
ret = ustctl_disable(app->sock, ua_chan->obj);
if (ret < 0) {
ua_chan->name, app->pid);
error:
ua_chan->name, app->pid);
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = ustctl_enable(app->sock, ua_chan->obj);
if (ret < 0) {
ret = ustctl_enable(app->sock, ua_chan->obj);
if (ret < 0) {
ua_chan->name, app->pid);
error:
ua_chan->name, app->pid);
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = ustctl_enable(app->sock, ua_event->obj);
if (ret < 0) {
ret = ustctl_enable(app->sock, ua_event->obj);
if (ret < 0) {
ua_event->attr.name, app->pid);
error:
ua_event->attr.name, app->pid);
error:
- health_code_update(&health_thread_cmd);
int ret;
struct lttng_ust_channel_attr uattr;
int ret;
struct lttng_ust_channel_attr uattr;
- health_code_update(&health_thread_cmd);
uattr.overwrite = ua_sess->metadata->attr.overwrite;
uattr.subbuf_size = ua_sess->metadata->attr.subbuf_size;
uattr.overwrite = ua_sess->metadata->attr.overwrite;
uattr.subbuf_size = ua_sess->metadata->attr.subbuf_size;
ua_sess->metadata->handle = ua_sess->metadata->obj->handle;
error:
ua_sess->metadata->handle = ua_sess->metadata->obj->handle;
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
- health_code_update(&health_thread_cmd);
assert(ua_chan->obj);
assert(stream);
assert(ua_chan->obj);
assert(stream);
- health_code_update(&health_thread_cmd);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
stream->handle = stream->obj->handle;
error:
stream->handle = stream->obj->handle;
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
/* We are going to receive 2 fds, we need to reserve them. */
ret = lttng_fd_get(LTTNG_FD_APPS, 2);
- health_code_update(&health_thread_cmd);
ret = ustctl_create_channel(app->sock, ua_sess->handle, &ua_chan->attr,
&ua_chan->obj);
ret = ustctl_create_channel(app->sock, ua_sess->handle, &ua_chan->attr,
&ua_chan->obj);
DBG2("UST app channel %s created successfully for pid:%d and sock:%d",
ua_chan->name, app->pid, app->sock);
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);
/* If channel is not enabled, disable it on the tracer */
if (!ua_chan->enabled) {
/* If channel is not enabled, disable it on the tracer */
if (!ua_chan->enabled) {
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
/* Create UST event on tracer */
ret = ustctl_create_event(app->sock, &ua_event->attr, ua_chan->obj,
/* Create UST event on tracer */
ret = ustctl_create_event(app->sock, &ua_event->attr, ua_chan->obj,
DBG2("UST app event %s created successfully for pid:%d",
ua_event->attr.name, app->pid);
DBG2("UST app event %s created successfully for pid:%d",
ua_event->attr.name, app->pid);
- health_code_update(&health_thread_cmd);
/* Set filter if one is present. */
if (ua_event->filter) {
/* Set filter if one is present. */
if (ua_event->filter) {
- health_code_update(&health_thread_cmd);
assert(app);
assert(ua_sess_ptr);
assert(app);
assert(ua_sess_ptr);
- health_code_update(&health_thread_cmd);
ua_sess = lookup_session_by_app(usess, app);
if (ua_sess == NULL) {
ua_sess = lookup_session_by_app(usess, app);
if (ua_sess == NULL) {
- health_code_update(&health_thread_cmd);
if (ua_sess->handle == -1) {
ret = ustctl_create_session(app->sock);
if (ua_sess->handle == -1) {
ret = ustctl_create_session(app->sock);
- health_code_update(&health_thread_cmd);
cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
struct lttng_ust_tracepoint_iter uiter;
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);
if (!app->compatible) {
/*
if (!app->compatible) {
/*
while ((ret = ustctl_tracepoint_list_get(app->sock, handle,
&uiter)) != -LTTNG_UST_ERR_NOENT) {
while ((ret = ustctl_tracepoint_list_get(app->sock, handle,
&uiter)) != -LTTNG_UST_ERR_NOENT) {
- health_code_update(&health_thread_cmd);
if (count >= nbmem) {
/* In case the realloc fails, we free the memory */
void *ptr;
if (count >= nbmem) {
/* In case the realloc fails, we free the memory */
void *ptr;
rcu_error:
rcu_read_unlock();
error:
rcu_error:
rcu_read_unlock();
error:
- health_code_update(&health_thread_cmd);
cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app, pid_n.node) {
struct lttng_ust_field_iter uiter;
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);
if (!app->compatible) {
/*
if (!app->compatible) {
/*
while ((ret = ustctl_tracepoint_field_list_get(app->sock, handle,
&uiter)) != -LTTNG_UST_ERR_NOENT) {
while ((ret = ustctl_tracepoint_field_list_get(app->sock, handle,
&uiter)) != -LTTNG_UST_ERR_NOENT) {
- health_code_update(&health_thread_cmd);
if (count >= nbmem) {
/* In case the realloc fails, we free the memory */
void *ptr;
if (count >= nbmem) {
/* In case the realloc fails, we free the memory */
void *ptr;
rcu_error:
rcu_read_unlock();
error:
rcu_error:
rcu_read_unlock();
error:
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = create_ust_stream(app, ua_chan, ustream);
if (ret < 0) {
ret = create_ust_stream(app, ua_chan, ustream);
if (ret < 0) {
- health_code_update(&health_thread_cmd);
/* Order is important this is why a list is used. */
cds_list_add_tail(&ustream->list, &ua_chan->streams.head);
/* Order is important this is why a list is used. */
cds_list_add_tail(&ustream->list, &ua_chan->streams.head);
- health_code_update(&health_thread_cmd);
}
switch (app->bits_per_long) {
}
switch (app->bits_per_long) {
- health_code_update(&health_thread_cmd);
skip_setup:
/* This start the UST tracing */
skip_setup:
/* This start the UST tracing */
/* Indicate that the session has been started once */
ua_sess->started = 1;
/* Indicate that the session has been started once */
ua_sess->started = 1;
- health_code_update(&health_thread_cmd);
/* Quiescent wait after starting trace */
ustctl_wait_quiescent(app->sock);
end:
rcu_read_unlock();
/* Quiescent wait after starting trace */
ustctl_wait_quiescent(app->sock);
end:
rcu_read_unlock();
- health_code_update(&health_thread_cmd);
return 0;
error_rcu_unlock:
rcu_read_unlock();
return 0;
error_rcu_unlock:
rcu_read_unlock();
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
/* This inhibits UST tracing */
ret = ustctl_stop_session(app->sock, ua_sess->handle);
/* This inhibits UST tracing */
ret = ustctl_stop_session(app->sock, ua_sess->handle);
- health_code_update(&health_thread_cmd);
/* Quiescent wait after stopping trace */
ustctl_wait_quiescent(app->sock);
/* Quiescent wait after stopping trace */
ustctl_wait_quiescent(app->sock);
- health_code_update(&health_thread_cmd);
/* Flushing buffers */
cds_lfht_for_each_entry(ua_sess->channels->ht, &iter.iter, ua_chan,
node.node) {
/* Flushing buffers */
cds_lfht_for_each_entry(ua_sess->channels->ht, &iter.iter, ua_chan,
node.node) {
- health_code_update(&health_thread_cmd);
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",
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",
- health_code_update(&health_thread_cmd);
/* Flush all buffers before stopping */
ret = ustctl_sock_flush_buffer(app->sock, ua_sess->metadata->obj);
/* Flush all buffers before stopping */
ret = ustctl_sock_flush_buffer(app->sock, ua_sess->metadata->obj);
- health_code_update(&health_thread_cmd);
return 0;
error_rcu_unlock:
rcu_read_unlock();
return 0;
error_rcu_unlock:
rcu_read_unlock();
- health_code_update(&health_thread_cmd);
obj.shm_fd = -1;
obj.wait_fd = -1;
obj.memory_map_size = 0;
obj.shm_fd = -1;
obj.wait_fd = -1;
obj.memory_map_size = 0;
- health_code_update(&health_thread_cmd);
ustctl_release_object(app->sock, &obj);
ustctl_release_object(app->sock, &obj);
- health_code_update(&health_thread_cmd);
delete_ust_app_session(app->sock, ua_sess);
/* Quiescent wait after stopping trace */
delete_ust_app_session(app->sock, ua_sess);
/* Quiescent wait after stopping trace */
- health_code_update(&health_thread_cmd);
app = find_app_by_sock(sock);
assert(app);
app = find_app_by_sock(sock);
assert(app);
- health_code_update(&health_thread_cmd);
ret = ustctl_tracer_version(sock, &app->version);
if (ret < 0) {
ret = ustctl_tracer_version(sock, &app->version);
if (ret < 0) {
UST_APP_MAJOR_VERSION);
app->compatible = 1;
rcu_read_unlock();
UST_APP_MAJOR_VERSION);
app->compatible = 1;
rcu_read_unlock();
- health_code_update(&health_thread_cmd);
UST_APP_MAJOR_VERSION);
app->compatible = 0;
rcu_read_unlock();
UST_APP_MAJOR_VERSION);
app->compatible = 0;
rcu_read_unlock();
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
ret = ustctl_calibrate(app->sock, calibrate);
if (ret < 0) {
ret = ustctl_calibrate(app->sock, calibrate);
if (ret < 0) {
- health_code_update(&health_thread_cmd);
uchan->name,
uchan->streams.count);
uchan->name,
uchan->streams.count);
- health_code_update(&health_thread_cmd);
ret = consumer_send_channel(sock, &msg);
if (ret < 0) {
goto error;
}
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);
fd = uchan->obj->shm_fd;
ret = consumer_send_fds(sock, &fd, 1);
- health_code_update(&health_thread_cmd);
- health_code_update(&health_thread_cmd);
/* Send stream and file descriptor */
fds[0] = stream->obj->shm_fd;
/* Send stream and file descriptor */
fds[0] = stream->obj->shm_fd;
- health_code_update(&health_thread_cmd);
DEFAULT_METADATA_NAME,
1);
DEFAULT_METADATA_NAME,
1);
- health_code_update(&health_thread_cmd);
ret = consumer_send_channel(sock, &msg);
if (ret < 0) {
goto error;
}
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;
/* Sending metadata shared memory fd */
fd = usess->metadata->obj->shm_fd;
- health_code_update(&health_thread_cmd);
/* Get correct path name destination */
if (consumer->type == CONSUMER_DST_LOCAL) {
/* Get correct path name destination */
if (consumer->type == CONSUMER_DST_LOCAL) {
- health_code_update(&health_thread_cmd);
/* Send stream and file descriptor */
fds[0] = usess->metadata->stream_obj->shm_fd;
/* Send stream and file descriptor */
fds[0] = usess->metadata->stream_obj->shm_fd;
- health_code_update(&health_thread_cmd);