The logger now logs the thread name making this prefix useless.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ie9093e4032d2cf0d3c0e9fa0d7eda28467033931
sock = lttcomm_alloc_sock_from_uri(uri);
uri_free(uri);
if (sock == NULL) {
sock = lttcomm_alloc_sock_from_uri(uri);
uri_free(uri);
if (sock == NULL) {
- ERR("[agent-thread] agent allocating TCP socket");
+ ERR("agent allocating TCP socket");
port <= the_config.agent_tcp_port.end; port++) {
ret = lttcomm_sock_set_port(sock, (uint16_t) port);
if (ret) {
port <= the_config.agent_tcp_port.end; port++) {
ret = lttcomm_sock_set_port(sock, (uint16_t) port);
if (ret) {
- ERR("[agent-thread] Failed to set port %u on socket",
+ ERR("Failed to set port %u on socket",
- DBG3("[agent-thread] Trying to bind on port %u", port);
+ DBG3("Trying to bind on port %u", port);
ret = sock->ops->bind(sock);
if (!ret) {
bind_succeeded = true;
ret = sock->ops->bind(sock);
if (!ret) {
bind_succeeded = true;
- DBG("[agent-thread] Listening on TCP port %u and socket %d",
+ DBG("Listening on TCP port %u and socket %d",
port, sock->fd);
return sock;
port, sock->fd);
return sock;
ret = lttcomm_sock_get_port(sock, &port);
if (ret) {
ret = lttcomm_sock_get_port(sock, &port);
if (ret) {
- ERR("[agent-thread] Failed to get port of agent TCP socket");
+ ERR("Failed to get port of agent TCP socket");
- DBG3("[agent-thread] Destroy TCP socket on port %" PRIu16,
+ DBG3("Destroy TCP socket on port %" PRIu16,
port);
/* This will return gracefully if fd is invalid. */
port);
/* This will return gracefully if fd is invalid. */
const int quit_pipe_read_fd = lttng_pipe_get_readfd(
notifiers->quit_pipe);
const int quit_pipe_read_fd = lttng_pipe_get_readfd(
notifiers->quit_pipe);
- DBG("[agent-thread] Manage agent application registration.");
+ DBG("Manage agent application registration.");
rcu_register_thread();
rcu_thread_online();
rcu_register_thread();
rcu_thread_online();
ret = write_agent_port(port);
if (ret) {
ret = write_agent_port(port);
if (ret) {
- ERR("[agent-thread] Failed to create agent port file: agent tracing will be unavailable");
+ ERR("Failed to create agent port file: agent tracing will be unavailable");
/* Don't prevent the launch of the sessiond on error. */
mark_thread_as_ready(notifiers);
goto error;
/* Don't prevent the launch of the sessiond on error. */
mark_thread_as_ready(notifiers);
goto error;
- DBG3("[agent-thread] Manage agent polling");
+ DBG3("Manage agent polling");
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
- DBG3("[agent-thread] Manage agent return from poll on %d fds",
+ DBG3("Manage agent return from poll on %d fds",
LTTNG_POLL_GETNB(&events));
if (ret < 0) {
/*
LTTNG_POLL_GETNB(&events));
if (ret < 0) {
/*
goto error;
}
nb_fd = ret;
goto error;
}
nb_fd = ret;
- DBG3("[agent-thread] %d fd ready", nb_fd);
+ DBG3("%d fd ready", nb_fd);
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
for (i = 0; i < nb_fd; i++) {
/* Fetch once the poll data */
lttng_poll_clean(&events);
error_poll_create:
uatomic_set(&agent_tracing_enabled, 0);
lttng_poll_clean(&events);
error_poll_create:
uatomic_set(&agent_tracing_enabled, 0);
- DBG("[agent-thread] Cleaning up and stopping.");
+ DBG("Cleaning up and stopping.");
rcu_thread_offline();
rcu_unregister_thread();
return NULL;
rcu_thread_offline();
rcu_unregister_thread();
return NULL;
ret = lttng_poll_add(events, the_ht_cleanup_pipe[0], LPOLLIN | LPOLLERR);
if (ret < 0) {
ret = lttng_poll_add(events, the_ht_cleanup_pipe[0], LPOLLIN | LPOLLERR);
if (ret < 0) {
- DBG("[ht-thread] lttng_poll_add error %d.", ret);
+ DBG("lttng_poll_add error %d.", ret);
uint32_t revents, nb_fd;
struct lttng_poll_event events;
uint32_t revents, nb_fd;
struct lttng_poll_event events;
- DBG("[ht-thread] startup.");
rcu_register_thread();
rcu_thread_online();
rcu_register_thread();
rcu_thread_online();
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_HT_CLEANUP);
if (testpoint(sessiond_thread_ht_cleanup)) {
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_HT_CLEANUP);
if (testpoint(sessiond_thread_ht_cleanup)) {
- DBG("[ht-thread] testpoint.");
ret = set_pollset(&events, 2);
if (ret < 0) {
ret = set_pollset(&events, 2);
if (ret < 0) {
- DBG("[ht-thread] sessiond_set_ht_cleanup_thread_pollset error %d.", ret);
+ DBG("sessiond_set_ht_cleanup_thread_pollset error %d.", ret);
goto error_poll_create;
}
goto error_poll_create;
}
- DBG3("[ht-thread] Polling.");
health_poll_entry();
ret = lttng_poll_wait(&events, -1);
health_poll_entry();
ret = lttng_poll_wait(&events, -1);
- DBG3("[ht-thread] Returning from poll on %d fds.",
+ DBG3("Returning from poll on %d fds.",
LTTNG_POLL_GETNB(&events));
health_poll_exit();
if (ret < 0) {
LTTNG_POLL_GETNB(&events));
health_poll_exit();
if (ret < 0) {
notification = zmalloc(sizeof(struct lttng_event_notifier_notification));
if (notification == NULL) {
notification = zmalloc(sizeof(struct lttng_event_notifier_notification));
if (notification == NULL) {
- ERR("[notification-thread] Error allocating notification");
+ ERR("Error allocating notification");
if (session_info->channel_infos_ht) {
ret = cds_lfht_destroy(session_info->channel_infos_ht, NULL);
if (ret) {
if (session_info->channel_infos_ht) {
ret = cds_lfht_destroy(session_info->channel_infos_ht, NULL);
if (ret) {
- ERR("[notification-thread] Failed to destroy channel information hash table");
+ ERR("Failed to destroy channel information hash table");
}
}
lttng_session_trigger_list_destroy(session_info->trigger_list);
}
}
lttng_session_trigger_list_destroy(session_info->trigger_list);
if (!channel_key){
/* No channel found; normal exit. */
if (!channel_key){
/* No channel found; normal exit. */
- DBG("[notification-thread] No known channel associated with newly subscribed-to condition");
+ DBG("No known channel associated with newly subscribed-to condition");
channel_state_ht_node);
} else {
/* Nothing to evaluate, no sample was ever taken. Normal exit */
channel_state_ht_node);
} else {
/* Nothing to evaluate, no sample was ever taken. Normal exit */
- DBG("[notification-thread] No channel sample associated with newly subscribed-to condition");
+ DBG("No channel sample associated with newly subscribed-to condition");
0, channel_info->session_info->consumed_data_size,
channel_info);
if (ret) {
0, channel_info->session_info->consumed_data_size,
channel_info);
if (ret) {
- WARN("[notification-thread] Fatal error occurred while evaluating a newly subscribed-to condition");
+ WARN("Fatal error occurred while evaluating a newly subscribed-to condition");
abort();
}
if (status != LTTNG_CONDITION_STATUS_OK) {
abort();
}
if (status != LTTNG_CONDITION_STATUS_OK) {
- ERR("[notification-thread] Failed to retrieve session rotation condition's session name");
+ ERR("Failed to retrieve session rotation condition's session name");
&iter);
node = cds_lfht_iter_get_node(&iter);
if (!node) {
&iter);
node = cds_lfht_iter_get_node(&iter);
if (!node) {
- DBG("[notification-thread] No known session matching name \"%s\"",
+ DBG("No known session matching name \"%s\"",
session_name);
ret = 0;
goto end;
session_name);
ret = 0;
goto end;
session_info->rotation.id);
if (!*evaluation) {
/* Fatal error. */
session_info->rotation.id);
if (!*evaluation) {
/* Fatal error. */
- ERR("[notification-thread] Failed to create session rotation ongoing evaluation for session \"%s\"",
+ ERR("Failed to create session rotation ongoing evaluation for session \"%s\"",
session_info->name);
ret = -1;
goto end_session_put;
session_info->name);
ret = -1;
goto end_session_put;
&evaluation, &object_uid, &object_gid);
break;
case LTTNG_OBJECT_TYPE_NONE:
&evaluation, &object_uid, &object_gid);
break;
case LTTNG_OBJECT_TYPE_NONE:
- DBG("[notification-thread] Newly subscribed-to condition not bound to object, nothing to evaluate");
+ DBG("Newly subscribed-to condition not bound to object, nothing to evaluate");
ret = 0;
goto end;
case LTTNG_OBJECT_TYPE_UNKNOWN:
ret = 0;
goto end;
case LTTNG_OBJECT_TYPE_UNKNOWN:
}
if (!evaluation) {
/* Evaluation yielded nothing. Normal exit. */
}
if (!evaluation) {
/* Evaluation yielded nothing. Normal exit. */
- DBG("[notification-thread] Newly subscribed-to condition evaluated to false, nothing to report to client");
+ DBG("Newly subscribed-to condition evaluated to false, nothing to report to client");
cds_list_add(&client_list_element.node, &client_list.clients_list);
/* Send evaluation result to the newly-subscribed client. */
cds_list_add(&client_list_element.node, &client_list.clients_list);
/* Send evaluation result to the newly-subscribed client. */
- DBG("[notification-thread] Newly subscribed-to condition evaluated to true, notifying client");
+ DBG("Newly subscribed-to condition evaluated to true, notifying client");
ret = send_evaluation_to_clients(trigger, evaluation, &client_list,
state, object_uid, object_gid);
ret = send_evaluation_to_clients(trigger, evaluation, &client_list,
state, object_uid, object_gid);
&client_list->triggers_list, client_list_trigger_node) {
if (evaluate_condition_for_client(trigger_ht_element->trigger, condition_list_element->condition,
client, state)) {
&client_list->triggers_list, client_list_trigger_node) {
if (evaluate_condition_for_client(trigger_ht_element->trigger, condition_list_element->condition,
client, state)) {
- WARN("[notification-thread] Evaluation of a condition on client subscription failed, aborting.");
+ WARN("Evaluation of a condition on client subscription failed, aborting.");
ret = -1;
free(client_list_element);
pthread_mutex_unlock(&client_list->lock);
ret = -1;
free(client_list_element);
pthread_mutex_unlock(&client_list->lock);
* Not an error, the list of triggers applying to that session
* will be initialized when the session is created.
*/
* Not an error, the list of triggers applying to that session
* will be initialized when the session is created.
*/
- DBG("[notification-thread] No trigger list found for session \"%s\" as it is not yet known to the notification system",
+ DBG("No trigger list found for session \"%s\" as it is not yet known to the notification system",
session_name);
goto end;
}
session_name);
goto end;
}
condition_status = lttng_condition_session_rotation_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
condition_status = lttng_condition_session_rotation_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
- ERR("[notification-thread] Failed to retrieve session rotation condition's session name");
+ ERR("Failed to retrieve session rotation condition's session name");
- DBG("[notification-thread] Found %i triggers that apply to newly created session",
+ DBG("Found %i triggers that apply to newly created session",
trigger_count);
return session_trigger_list;
error:
trigger_count);
return session_trigger_list;
error:
&iter);
node = cds_lfht_iter_get_node(&iter);
if (node) {
&iter);
node = cds_lfht_iter_get_node(&iter);
if (node) {
- DBG("[notification-thread] Found session info of session \"%s\" (uid = %i, gid = %i)",
+ DBG("Found session info of session \"%s\" (uid = %i, gid = %i)",
name, uid, gid);
session = caa_container_of(node, struct session_info,
sessions_ht_node);
name, uid, gid);
session = caa_container_of(node, struct session_info,
sessions_ht_node);
session = session_info_create(name, uid, gid, trigger_list,
state->sessions_ht);
if (!session) {
session = session_info_create(name, uid, gid, trigger_list,
state->sessions_ht);
if (!session) {
- ERR("[notification-thread] Failed to allocation session info for session \"%s\" (uid = %i, gid = %i)",
+ ERR("Failed to allocation session info for session \"%s\" (uid = %i, gid = %i)",
name, uid, gid);
lttng_session_trigger_list_destroy(trigger_list);
goto error;
name, uid, gid);
lttng_session_trigger_list_destroy(trigger_list);
goto error;
struct cds_lfht_iter iter;
struct session_info *session_info = NULL;
struct cds_lfht_iter iter;
struct session_info *session_info = NULL;
- DBG("[notification-thread] Adding channel %s from session %s, channel key = %" PRIu64 " in %s domain",
+ DBG("Adding channel %s from session %s, channel key = %" PRIu64 " in %s domain",
channel_name, session_name, channel_key_int,
lttng_domain_type_str(channel_domain));
channel_name, session_name, channel_key_int,
lttng_domain_type_str(channel_domain));
- DBG("[notification-thread] Found %i triggers that apply to newly added channel",
+ DBG("Found %i triggers that apply to newly added channel",
trigger_count);
channel_trigger_list = zmalloc(sizeof(*channel_trigger_list));
if (!channel_trigger_list) {
trigger_count);
channel_trigger_list = zmalloc(sizeof(*channel_trigger_list));
if (!channel_trigger_list) {
struct channel_key key = { .key = channel_key, .domain = domain };
struct channel_info *channel_info;
struct channel_key key = { .key = channel_key, .domain = domain };
struct channel_info *channel_info;
- DBG("[notification-thread] Removing channel key = %" PRIu64 " in %s domain",
+ DBG("Removing channel key = %" PRIu64 " in %s domain",
channel_key, lttng_domain_type_str(domain));
rcu_read_lock();
channel_key, lttng_domain_type_str(domain));
rcu_read_lock();
* channel that doesn't exist.
*/
if (!node) {
* channel that doesn't exist.
*/
if (!node) {
- ERR("[notification-thread] Channel being removed is unknown to the notification thread");
+ ERR("Channel being removed is unknown to the notification thread");
session_info->rotation.id = trace_archive_chunk_id;
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
session_info->rotation.id = trace_archive_chunk_id;
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
- DBG("[notification-thread] No triggers applying to session \"%s\" found",
+ DBG("No triggers applying to session \"%s\" found",
session_name);
goto end;
}
session_name);
goto end;
}
cds_list_add(&element->node, &state->tracer_event_sources_list);
cds_list_add(&element->node, &state->tracer_event_sources_list);
- DBG3("[notification-thread] Adding tracer event source fd to poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG3("Adding tracer event source fd to poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(domain_type));
/* Adding the read side pipe to the event poll. */
ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLIN | LPOLLERR);
if (ret < 0) {
tracer_event_source_fd,
lttng_domain_type_str(domain_type));
/* Adding the read side pipe to the event poll. */
ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add tracer event source to poll set: tracer_event_source_fd = %d, domain = '%s'",
+ ERR("Failed to add tracer event source to poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(element->domain));
cds_list_del(&element->node);
tracer_event_source_fd,
lttng_domain_type_str(element->domain));
cds_list_del(&element->node);
ret = lttng_poll_create(&events, 1, LTTNG_CLOEXEC);
if (ret < 0) {
ret = lttng_poll_create(&events, 1, LTTNG_CLOEXEC);
if (ret < 0) {
- ERR("[notification-thread] Error creating lttng_poll_event");
+ ERR("Error creating lttng_poll_event");
goto end;
}
ret = lttng_poll_add(&events, pipe, LPOLLIN);
if (ret < 0) {
goto end;
}
ret = lttng_poll_add(&events, pipe, LPOLLIN);
if (ret < 0) {
- ERR("[notification-thread] Error adding fd event notifier notification pipe to lttng_poll_event: fd = %d",
+ ERR("Error adding fd event notifier notification pipe to lttng_poll_event: fd = %d",
ret = handle_one_event_notifier_notification(state, pipe, domain);
if (ret) {
ret = handle_one_event_notifier_notification(state, pipe, domain);
if (ret) {
- ERR("[notification-thread] Error consuming an event notifier notification from pipe: fd = %d",
+ ERR("Error consuming an event notifier notification from pipe: fd = %d",
- DBG("[notification-thread] Removed tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG("Removed tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cds_list_del(&source_element->node);
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cds_list_del(&source_element->node);
- DBG3("[notification-thread] Removing tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG3("Removing tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
/* Removing the fd from the event poll set. */
ret = lttng_poll_del(&state->events, tracer_event_source_fd);
if (ret < 0) {
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
/* Removing the fd from the event poll set. */
ret = lttng_poll_del(&state->events, tracer_event_source_fd);
if (ret < 0) {
- ERR("[notification-thread] Failed to remove tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ ERR("Failed to remove tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cmd_result = LTTNG_ERR_FATAL;
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cmd_result = LTTNG_ERR_FATAL;
ret = drain_event_notifier_notification_pipe(state, tracer_event_source_fd,
source_element->domain);
if (ret) {
ret = drain_event_notifier_notification_pipe(state, tracer_event_source_fd,
source_element->domain);
if (ret) {
- ERR("[notification-thread] Error draining event notifier notification: tracer_event_source_fd = %d, domain = %s",
+ ERR("Error draining event notifier notification: tracer_event_source_fd = %d, domain = %s",
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cmd_result = LTTNG_ERR_FATAL;
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
cmd_result = LTTNG_ERR_FATAL;
status = lttng_condition_session_rotation_get_session_name(
condition, &session_name);
if (status != LTTNG_CONDITION_STATUS_OK) {
status = lttng_condition_session_rotation_get_session_name(
condition, &session_name);
if (status != LTTNG_CONDITION_STATUS_OK) {
- ERR("[notification-thread] Failed to bind trigger to session: unable to get 'session_rotation' condition's session name");
+ ERR("Failed to bind trigger to session: unable to get 'session_rotation' condition's session name");
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
- DBG("[notification-thread] Unable to bind trigger applying to session \"%s\" as it is not yet known to the notification system",
+ DBG("Unable to bind trigger applying to session \"%s\" as it is not yet known to the notification system",
session_name);
goto end;
}
session_name);
goto end;
}
- DBG("[notification-thread] Newly registered trigger bound to session \"%s\"",
+ DBG("Newly registered trigger bound to session \"%s\"",
session_name);
ret = lttng_session_trigger_list_add(trigger_list, trigger);
end:
session_name);
ret = lttng_session_trigger_list_add(trigger_list, trigger);
end:
CDS_INIT_LIST_HEAD(&trigger_list_element->node);
trigger_list_element->trigger = trigger;
cds_list_add(&trigger_list_element->node, &trigger_list->list);
CDS_INIT_LIST_HEAD(&trigger_list_element->node);
trigger_list_element->trigger = trigger;
cds_list_add(&trigger_list_element->node, &trigger_list->list);
- DBG("[notification-thread] Newly registered trigger bound to channel \"%s\"",
+ DBG("Newly registered trigger bound to channel \"%s\"",
trigger_tokens_ht_element->trigger);
/* TODO talk to all app and remove it */
trigger_tokens_ht_element->trigger);
/* TODO talk to all app and remove it */
- DBG("[notification-thread] Removed trigger from tokens_ht");
+ DBG("Removed trigger from tokens_ht");
cds_lfht_del(state->trigger_tokens_ht,
&trigger_tokens_ht_element->node);
cds_lfht_del(state->trigger_tokens_ht,
&trigger_tokens_ht_element->node);
- DBG("[notification-thread] Removed trigger from channel_triggers_ht");
+ DBG("Removed trigger from channel_triggers_ht");
cds_list_del(&trigger_element->node);
/* A trigger can only appear once per channel */
break;
cds_list_del(&trigger_element->node);
/* A trigger can only appear once per channel */
break;
cds_list_del(&cmd->cmd_list_node);
pthread_mutex_unlock(&handle->cmd_queue.lock);
cds_list_del(&cmd->cmd_list_node);
pthread_mutex_unlock(&handle->cmd_queue.lock);
- DBG("[notification-thread] Received `%s` command",
+ DBG("Received `%s` command",
notification_command_type_str(cmd->type));
switch (cmd->type) {
case NOTIFICATION_COMMAND_TYPE_REGISTER_TRIGGER:
notification_command_type_str(cmd->type));
switch (cmd->type) {
case NOTIFICATION_COMMAND_TYPE_REGISTER_TRIGGER:
- ERR("[notification-thread] Unknown internal command received");
+ ERR("Unknown internal command received");
int ret;
struct notification_client *client;
int ret;
struct notification_client *client;
- DBG("[notification-thread] Handling new notification channel client connection");
+ DBG("Handling new notification channel client connection");
client = zmalloc(sizeof(*client));
if (!client) {
client = zmalloc(sizeof(*client));
if (!client) {
ret = client_reset_inbound_state(client);
if (ret) {
ret = client_reset_inbound_state(client);
if (ret) {
- ERR("[notification-thread] Failed to reset client communication's inbound state");
+ ERR("Failed to reset client communication's inbound state");
ret = 0;
goto error;
}
ret = lttcomm_accept_unix_sock(state->notification_channel_socket);
if (ret < 0) {
ret = 0;
goto error;
}
ret = lttcomm_accept_unix_sock(state->notification_channel_socket);
if (ret < 0) {
- ERR("[notification-thread] Failed to accept new notification channel client connection");
+ ERR("Failed to accept new notification channel client connection");
ret = socket_set_non_blocking(client->socket);
if (ret) {
ret = socket_set_non_blocking(client->socket);
if (ret) {
- ERR("[notification-thread] Failed to set new notification channel client connection socket as non-blocking");
+ ERR("Failed to set new notification channel client connection socket as non-blocking");
goto error;
}
ret = lttcomm_setsockopt_creds_unix_sock(client->socket);
if (ret < 0) {
goto error;
}
ret = lttcomm_setsockopt_creds_unix_sock(client->socket);
if (ret < 0) {
- ERR("[notification-thread] Failed to set socket options on new notification channel client socket");
+ ERR("Failed to set socket options on new notification channel client socket");
LPOLLIN | LPOLLERR |
LPOLLHUP | LPOLLRDHUP);
if (ret < 0) {
LPOLLIN | LPOLLERR |
LPOLLHUP | LPOLLRDHUP);
if (ret < 0) {
- ERR("[notification-thread] Failed to add notification channel client socket to poll set");
+ ERR("Failed to add notification channel client socket to poll set");
- DBG("[notification-thread] Added new notification channel client socket (%i) to poll set",
+ DBG("Added new notification channel client socket (%i) to poll set",
client->socket);
rcu_read_lock();
client->socket);
rcu_read_lock();
ret = lttng_poll_del(&state->events, client->socket);
if (ret) {
ret = lttng_poll_del(&state->events, client->socket);
if (ret) {
- ERR("[notification-thread] Failed to remove client socket %d from poll set",
+ ERR("Failed to remove client socket %d from poll set",
struct notification_client *client;
rcu_read_lock();
struct notification_client *client;
rcu_read_lock();
- DBG("[notification-thread] Closing client connection (socket fd = %i)",
+ DBG("Closing client connection (socket fd = %i)",
client_socket);
client = get_client_from_socket(client_socket, state);
if (!client) {
/* Internal state corruption, fatal error. */
client_socket);
client = get_client_from_socket(client_socket, state);
if (!client) {
/* Internal state corruption, fatal error. */
- ERR("[notification-thread] Unable to find client (socket fd = %i)",
+ ERR("Unable to find client (socket fd = %i)",
client_socket);
ret = -1;
goto end;
client_socket);
ret = -1;
goto end;
bool error_encoutered = false;
rcu_read_lock();
bool error_encoutered = false;
rcu_read_lock();
- DBG("[notification-thread] Closing all client connections");
+ DBG("Closing all client connections");
cds_lfht_for_each_entry(state->client_socket_ht, &iter, client,
client_socket_ht_node) {
int ret;
cds_lfht_for_each_entry(state->client_socket_ht, &iter, client,
client_socket_ht_node) {
int ret;
/* Send data. */
to_send_count = pv.buffer.size;
/* Send data. */
to_send_count = pv.buffer.size;
- DBG("[notification-thread] Flushing client (socket fd = %i) outgoing queue",
+ DBG("Flushing client (socket fd = %i) outgoing queue",
client->socket);
ret = lttcomm_send_unix_sock_non_block(client->socket,
pv.buffer.data,
to_send_count);
if ((ret >= 0 && ret < to_send_count)) {
client->socket);
ret = lttcomm_send_unix_sock_non_block(client->socket,
pv.buffer.data,
to_send_count);
if ((ret >= 0 && ret < to_send_count)) {
- DBG("[notification-thread] Client (socket fd = %i) outgoing queue could not be completely flushed",
+ DBG("Client (socket fd = %i) outgoing queue could not be completely flushed",
client->socket);
to_send_count -= max(ret, 0);
client->socket);
to_send_count -= max(ret, 0);
goto end;
} else if (ret < 0) {
/* Generic error, disable the client's communication. */
goto end;
} else if (ret < 0) {
/* Generic error, disable the client's communication. */
- ERR("[notification-thread] Failed to flush outgoing queue, disconnecting client (socket fd = %i)",
+ ERR("Failed to flush outgoing queue, disconnecting client (socket fd = %i)",
client->socket);
client->communication.active = false;
status = CLIENT_TRANSMISSION_STATUS_FAIL;
client->socket);
client->communication.active = false;
status = CLIENT_TRANSMISSION_STATUS_FAIL;
client->socket, &pv);
if (ret < 0) {
/* Generic error, disable the client's communication. */
client->socket, &pv);
if (ret < 0) {
/* Generic error, disable the client's communication. */
- ERR("[notification-thread] Failed to flush outgoing fds queue, disconnecting client (socket fd = %i)",
+ ERR("Failed to flush outgoing fds queue, disconnecting client (socket fd = %i)",
client->socket);
client->communication.active = false;
status = CLIENT_TRANSMISSION_STATUS_FAIL;
client->socket);
client->communication.active = false;
status = CLIENT_TRANSMISSION_STATUS_FAIL;
memcpy(buffer, &msg, sizeof(msg));
memcpy(buffer + sizeof(msg), &reply, sizeof(reply));
memcpy(buffer, &msg, sizeof(msg));
memcpy(buffer + sizeof(msg), &reply, sizeof(reply));
- DBG("[notification-thread] Send command reply (%i)", (int) status);
+ DBG("Send command reply (%i)", (int) status);
pthread_mutex_lock(&client->lock);
if (client->communication.outbound.queued_command_reply) {
pthread_mutex_lock(&client->lock);
if (client->communication.outbound.queued_command_reply) {
if (msg->size == 0 ||
msg->size > DEFAULT_MAX_NOTIFICATION_CLIENT_MESSAGE_PAYLOAD_SIZE) {
if (msg->size == 0 ||
msg->size > DEFAULT_MAX_NOTIFICATION_CLIENT_MESSAGE_PAYLOAD_SIZE) {
- ERR("[notification-thread] Invalid notification channel message: length = %u",
+ ERR("Invalid notification channel message: length = %u",
msg->size);
ret = -1;
goto end;
msg->size);
ret = -1;
goto end;
break;
default:
ret = -1;
break;
default:
ret = -1;
- ERR("[notification-thread] Invalid notification channel message: unexpected message type");
+ ERR("Invalid notification channel message: unexpected message type");
client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
- ERR("[notification-thread] No credentials received from client");
+ ERR("No credentials received from client");
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
- DBG("[notification-thread] Received handshake from client (uid = %u, gid = %u) with version %i.%i",
+ DBG("Received handshake from client (uid = %u, gid = %u) with version %i.%i",
client->uid, client->gid, (int) client->major,
(int) client->minor);
client->uid, client->gid, (int) client->major,
(int) client->minor);
&client->communication.outbound.payload.buffer, send_buffer,
sizeof(send_buffer));
if (ret) {
&client->communication.outbound.payload.buffer, send_buffer,
sizeof(send_buffer));
if (ret) {
- ERR("[notification-thread] Failed to send protocol version to notification channel client");
+ ERR("Failed to send protocol version to notification channel client");
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
- ERR("[notification-thread] Failed to reset client communication's inbound state");
+ ERR("Failed to reset client communication's inbound state");
goto end;
}
/* Flushes the outgoing queue. */
ret = client_send_command_reply(client, state, status);
if (ret) {
goto end;
}
/* Flushes the outgoing queue. */
ret = client_send_command_reply(client, state, status);
if (ret) {
- ERR("[notification-thread] Failed to send reply to notification channel client");
+ ERR("Failed to send reply to notification channel client");
expected_condition_size = client->communication.inbound.payload.buffer.size;
ret = lttng_condition_create_from_payload(&condition_view, &condition);
if (ret != expected_condition_size) {
expected_condition_size = client->communication.inbound.payload.buffer.size;
ret = lttng_condition_create_from_payload(&condition_view, &condition);
if (ret != expected_condition_size) {
- ERR("[notification-thread] Malformed condition received from client");
+ ERR("Malformed condition received from client");
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
- ERR("[notification-thread] Failed to reset client communication's inbound state");
+ ERR("Failed to reset client communication's inbound state");
goto end;
}
ret = client_send_command_reply(client, state, status);
if (ret) {
goto end;
}
ret = client_send_command_reply(client, state, status);
if (ret) {
- ERR("[notification-thread] Failed to send reply to notification channel client");
+ ERR("Failed to send reply to notification channel client");
client->communication.inbound.msg_type !=
LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_UNKNOWN &&
!client->validated) {
client->communication.inbound.msg_type !=
LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_UNKNOWN &&
!client->validated) {
- WARN("[notification-thread] client attempted a command before handshake");
+ WARN("client attempted a command before handshake");
condition_type = lttng_condition_get_type(condition);
if (condition_type == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW) {
condition_type = lttng_condition_get_type(condition);
if (condition_type == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW) {
- DBG("[notification-thread] Low buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
+ DBG("Low buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
threshold, sample->highest_usage);
/*
threshold, sample->highest_usage);
/*
result = true;
}
} else {
result = true;
}
} else {
- DBG("[notification-thread] High buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
+ DBG("High buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
threshold, sample->highest_usage);
/*
threshold, sample->highest_usage);
/*
parent);
threshold = size_condition->consumed_threshold_bytes.value;
parent);
threshold = size_condition->consumed_threshold_bytes.value;
- DBG("[notification-thread] Session consumed size condition being evaluated: threshold = %" PRIu64 ", current size = %" PRIu64,
+ DBG("Session consumed size condition being evaluated: threshold = %" PRIu64 ", current size = %" PRIu64,
threshold, session_consumed_size);
return session_consumed_size >= threshold;
}
threshold, session_consumed_size);
return session_consumed_size >= threshold;
}
ret = lttng_notification_serialize(¬ification, &msg_payload);
if (ret) {
ret = lttng_notification_serialize(¬ification, &msg_payload);
if (ret) {
- ERR("[notification-thread] Failed to serialize notification");
+ ERR("Failed to serialize notification");
* Client is not allowed to monitor this
* object.
*/
* Client is not allowed to monitor this
* object.
*/
- DBG("[notification-thread] Skipping client at it does not have the object permission to receive notification for this trigger");
+ DBG("Skipping client at it does not have the object permission to receive notification for this trigger");
goto skip_client;
}
}
if (client->uid != lttng_credentials_get_uid(trigger_creds)) {
goto skip_client;
}
}
if (client->uid != lttng_credentials_get_uid(trigger_creds)) {
- DBG("[notification-thread] Skipping client at it does not have the permission to receive notification for this trigger");
+ DBG("Skipping client at it does not have the permission to receive notification for this trigger");
- DBG("[notification-thread] Sending notification to client (fd = %i, %zu bytes)",
+ DBG("Sending notification to client (fd = %i, %zu bytes)",
client->socket, msg_payload.buffer.size);
if (client_has_outbound_data_left(client)) {
client->socket, msg_payload.buffer.size);
if (client_has_outbound_data_left(client)) {
}
if (capture_buffer_size > MAX_CAPTURE_SIZE) {
}
if (capture_buffer_size > MAX_CAPTURE_SIZE) {
- ERR("[notification-thread] Event notifier has a capture payload size which exceeds the maximum allowed size: capture_payload_size = %zu bytes, max allowed size = %d bytes",
+ ERR("Event notifier has a capture payload size which exceeds the maximum allowed size: capture_payload_size = %zu bytes, max allowed size = %d bytes",
capture_buffer_size, MAX_CAPTURE_SIZE);
goto end;
}
capture_buffer = zmalloc(capture_buffer_size);
if (!capture_buffer) {
capture_buffer_size, MAX_CAPTURE_SIZE);
goto end;
}
capture_buffer = zmalloc(capture_buffer_size);
if (!capture_buffer) {
- ERR("[notification-thread] Failed to allocate capture buffer");
+ ERR("Failed to allocate capture buffer");
goto end;
}
/* Fetch additional payload (capture). */
ret = lttng_read(notification_pipe_read_fd, capture_buffer, capture_buffer_size);
if (ret != capture_buffer_size) {
goto end;
}
/* Fetch additional payload (capture). */
ret = lttng_read(notification_pipe_read_fd, capture_buffer, capture_buffer_size);
if (ret != capture_buffer_size) {
- ERR("[notification-thread] Failed to read from event source pipe (fd = %i)",
+ ERR("Failed to read from event source pipe (fd = %i)",
notification_pipe_read_fd);
goto end;
}
notification_pipe_read_fd);
goto end;
}
notification->capture_buf_size, false);
if (evaluation == NULL) {
notification->capture_buf_size, false);
if (evaluation == NULL) {
- ERR("[notification-thread] Failed to create event rule hit evaluation while creating and enqueuing action executor job");
+ ERR("Failed to create event rule hit evaluation while creating and enqueuing action executor job");
ret = -1;
goto end_unlock;
}
ret = -1;
goto end_unlock;
}
notification = recv_one_event_notifier_notification(pipe, domain);
if (notification == NULL) {
/* Reception failed, don't consider it fatal. */
notification = recv_one_event_notifier_notification(pipe, domain);
if (notification == NULL) {
/* Reception failed, don't consider it fatal. */
- ERR("[notification-thread] Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
+ ERR("Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
pipe, lttng_domain_type_str(domain));
goto end;
}
ret = dispatch_one_event_notifier_notification(state, notification);
if (ret) {
pipe, lttng_domain_type_str(domain));
goto end;
}
ret = dispatch_one_event_notifier_notification(state, notification);
if (ret) {
- ERR("[notification-thread] Error dispatching an event notifier notification from tracer: fd = %i, domain = %s",
+ ERR("Error dispatching an event notifier notification from tracer: fd = %i, domain = %s",
pipe, lttng_domain_type_str(domain));
goto end;
}
pipe, lttng_domain_type_str(domain));
goto end;
}
*/
ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg));
if (ret != sizeof(sample_msg)) {
*/
ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg));
if (ret != sizeof(sample_msg)) {
- ERR("[notification-thread] Failed to read from monitoring pipe (fd = %i)",
+ ERR("Failed to read from monitoring pipe (fd = %i)",
pipe);
ret = -1;
goto end;
pipe);
ret = -1;
goto end;
* channel's destruction before we get a chance to process that
* sample.
*/
* channel's destruction before we get a chance to process that
* sample.
*/
- DBG("[notification-thread] Received a sample for an unknown channel from consumerd, key = %" PRIu64 " in %s domain",
+ DBG("Received a sample for an unknown channel from consumerd, key = %" PRIu64 " in %s domain",
latest_sample.key.key,
lttng_domain_type_str(domain));
goto end_unlock;
}
channel_info = caa_container_of(node, struct channel_info,
channels_ht_node);
latest_sample.key.key,
lttng_domain_type_str(domain));
goto end_unlock;
}
channel_info = caa_container_of(node, struct channel_info,
channels_ht_node);
- DBG("[notification-thread] Handling channel sample for channel %s (key = %" PRIu64 ") in session %s (highest usage = %" PRIu64 ", lowest usage = %" PRIu64", total consumed = %" PRIu64")",
+ DBG("Handling channel sample for channel %s (key = %" PRIu64 ") in session %s (highest usage = %" PRIu64 ", lowest usage = %" PRIu64", total consumed = %" PRIu64")",
channel_info->name,
latest_sample.key.key,
channel_info->session_info->name,
channel_info->name,
latest_sample.key.key,
channel_info->session_info->name,
int ret;
char *sock_path = get_notification_channel_sock_path();
int ret;
char *sock_path = get_notification_channel_sock_path();
- DBG("[notification-thread] Destroying notification channel socket");
+ DBG("Destroying notification channel socket");
if (sock_path) {
ret = unlink(sock_path);
if (sock_path) {
ret = unlink(sock_path);
int fd = -1, ret;
char *sock_path = get_notification_channel_sock_path();
int fd = -1, ret;
char *sock_path = get_notification_channel_sock_path();
- DBG("[notification-thread] Creating notification channel UNIX socket at %s",
+ DBG("Creating notification channel UNIX socket at %s",
sock_path);
ret = lttcomm_create_unix_sock(sock_path);
if (ret < 0) {
sock_path);
ret = lttcomm_create_unix_sock(sock_path);
if (ret < 0) {
- ERR("[notification-thread] Failed to create notification socket");
+ ERR("Failed to create notification socket");
- DBG("[notification-thread] Notification channel UNIX socket created (fd = %i)",
+ DBG("Notification channel UNIX socket created (fd = %i)",
fd);
free(sock_path);
return fd;
fd);
free(sock_path);
return fd;
ret = lttng_poll_add(poll_set, notification_channel_socket,
LPOLLIN | LPOLLERR | LPOLLHUP | LPOLLRDHUP);
if (ret < 0) {
ret = lttng_poll_add(poll_set, notification_channel_socket,
LPOLLIN | LPOLLERR | LPOLLHUP | LPOLLRDHUP);
if (ret < 0) {
- ERR("[notification-thread] Failed to add notification channel socket to pollset");
+ ERR("Failed to add notification channel socket to pollset");
goto error;
}
ret = lttng_poll_add(poll_set, lttng_pipe_get_readfd(handle->cmd_queue.event_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
goto error;
}
ret = lttng_poll_add(poll_set, lttng_pipe_get_readfd(handle->cmd_queue.event_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add notification command queue event fd to pollset");
+ ERR("Failed to add notification command queue event fd to pollset");
goto error;
}
ret = lttng_poll_add(poll_set,
handle->channel_monitoring_pipes.ust32_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
goto error;
}
ret = lttng_poll_add(poll_set,
handle->channel_monitoring_pipes.ust32_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add ust-32 channel monitoring pipe fd to pollset");
+ ERR("Failed to add ust-32 channel monitoring pipe fd to pollset");
goto error;
}
ret = lttng_poll_add(poll_set,
handle->channel_monitoring_pipes.ust64_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
goto error;
}
ret = lttng_poll_add(poll_set,
handle->channel_monitoring_pipes.ust64_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add ust-64 channel monitoring pipe fd to pollset");
+ ERR("Failed to add ust-64 channel monitoring pipe fd to pollset");
goto error;
}
if (handle->channel_monitoring_pipes.kernel_consumer < 0) {
goto error;
}
if (handle->channel_monitoring_pipes.kernel_consumer < 0) {
handle->channel_monitoring_pipes.kernel_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
handle->channel_monitoring_pipes.kernel_consumer,
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add kernel channel monitoring pipe fd to pollset");
+ ERR("Failed to add kernel channel monitoring pipe fd to pollset");
- DBG("[notification-thread] Listening on notification channel socket");
+ DBG("Listening on notification channel socket");
ret = lttcomm_listen_unix_sock(state->notification_channel_socket);
if (ret < 0) {
ret = lttcomm_listen_unix_sock(state->notification_channel_socket);
if (ret < 0) {
- ERR("[notification-thread] Listen failed on notification channel socket");
+ ERR("Listen failed on notification channel socket");
if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
ret = lttng_poll_del(&state->events, fd);
if (ret) {
if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
ret = lttng_poll_del(&state->events, fd);
if (ret) {
- ERR("[notification-thread] Failed to remove consumer monitoring pipe from poll set");
+ ERR("Failed to remove consumer monitoring pipe from poll set");
ret = handle_notification_thread_channel_sample(
state, fd, domain);
if (ret) {
ret = handle_notification_thread_channel_sample(
state, fd, domain);
if (ret) {
- ERR("[notification-thread] Consumer sample handling error occurred");
+ ERR("Consumer sample handling error occurred");
ret = handle_notification_thread_remove_tracer_event_source_no_result(
state, event_source_fd);
if (ret) {
ret = handle_notification_thread_remove_tracer_event_source_no_result(
state, event_source_fd);
if (ret) {
- ERR("[notification-thread] Failed to remove event notification pipe from poll set: fd = %d",
+ ERR("Failed to remove event notification pipe from poll set: fd = %d",
event_source_fd);
}
goto end;
event_source_fd);
}
goto end;
ret = handle_notification_thread_event_notification(
state, event_source_fd, domain);
if (ret) {
ret = handle_notification_thread_event_notification(
state, event_source_fd, domain);
if (ret) {
- ERR("[notification-thread] Event notification handling error occurred for fd: %d",
+ ERR("Event notification handling error occurred for fd: %d",
event_source_fd);
ret = -1;
goto end;
event_source_fd);
ret = -1;
goto end;
struct notification_thread_state state;
enum lttng_domain_type domain;
struct notification_thread_state state;
enum lttng_domain_type domain;
- DBG("[notification-thread] Started notification thread");
+ DBG("Started notification thread");
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION);
rcu_register_thread();
rcu_thread_online();
if (!handle) {
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_NOTIFICATION);
rcu_register_thread();
rcu_thread_online();
if (!handle) {
- ERR("[notification-thread] Invalid thread context provided");
+ ERR("Invalid thread context provided");
int fd_count, i;
health_poll_entry();
int fd_count, i;
health_poll_entry();
- DBG("[notification-thread] Entering poll wait");
+ DBG("Entering poll wait");
ret = lttng_poll_wait(&state.events, -1);
ret = lttng_poll_wait(&state.events, -1);
- DBG("[notification-thread] Poll wait returned (%i)", ret);
+ DBG("Poll wait returned (%i)", ret);
health_poll_exit();
if (ret < 0) {
/*
health_poll_exit();
if (ret < 0) {
/*
if (errno == EINTR) {
continue;
}
if (errno == EINTR) {
continue;
}
- ERR("[notification-thread] Error encountered during lttng_poll_wait (%i)", ret);
+ ERR("Error encountered during lttng_poll_wait (%i)", ret);
int fd = LTTNG_POLL_GETFD(&state.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&state.events, i);
int fd = LTTNG_POLL_GETFD(&state.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&state.events, i);
- DBG("[notification-thread] Handling fd (%i) activity (%u)", fd, revents);
+ DBG("Handling fd (%i) activity (%u)", fd, revents);
if (fd == state.notification_channel_socket) {
if (revents & LPOLLIN) {
if (fd == state.notification_channel_socket) {
if (revents & LPOLLIN) {
}
} else if (revents &
(LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
}
} else if (revents &
(LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
- ERR("[notification-thread] Notification socket poll error");
+ ERR("Notification socket poll error");
- ERR("[notification-thread] Unexpected poll events %u for notification socket %i", revents, fd);
+ ERR("Unexpected poll events %u for notification socket %i", revents, fd);
goto error;
}
} else if (fd == lttng_pipe_get_readfd(handle->cmd_queue.event_pipe)) {
ret = handle_notification_thread_command(handle,
&state);
if (ret < 0) {
goto error;
}
} else if (fd == lttng_pipe_get_readfd(handle->cmd_queue.event_pipe)) {
ret = handle_notification_thread_command(handle,
&state);
if (ret < 0) {
- DBG("[notification-thread] Error encountered while servicing command queue");
+ DBG("Error encountered while servicing command queue");
goto error;
} else if (ret > 0) {
goto exit;
goto error;
} else if (ret > 0) {
goto exit;
lttng_pipe_get_readfd(handle->quit_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
lttng_pipe_get_readfd(handle->quit_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[rotation-thread] Failed to add quit pipe read fd to poll set");
+ ERR("Failed to add quit pipe read fd to poll set");
lttng_pipe_get_readfd(handle->rotation_timer_queue->event_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
lttng_pipe_get_readfd(handle->rotation_timer_queue->event_pipe),
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[rotation-thread] Failed to add rotate_pending fd to poll set");
+ ERR("Failed to add rotate_pending fd to poll set");
ret = init_poll_set(&state->events, handle);
if (ret) {
ret = init_poll_set(&state->events, handle);
if (ret) {
- ERR("[rotation-thread] Failed to initialize rotation thread poll set");
+ ERR("Failed to initialize rotation thread poll set");
goto end;
}
rotate_notification_channel = lttng_notification_channel_create(
lttng_session_daemon_notification_endpoint);
if (!rotate_notification_channel) {
goto end;
}
rotate_notification_channel = lttng_notification_channel_create(
lttng_session_daemon_notification_endpoint);
if (!rotate_notification_channel) {
- ERR("[rotation-thread] Could not create notification channel");
+ ERR("Could not create notification channel");
ret = -1;
goto end;
}
ret = lttng_poll_add(&state->events, rotate_notification_channel->socket,
LPOLLIN | LPOLLERR);
if (ret < 0) {
ret = -1;
goto end;
}
ret = lttng_poll_add(&state->events, rotate_notification_channel->socket,
LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[rotation-thread] Failed to add notification fd to pollset");
+ ERR("Failed to add notification fd to pollset");
session->chunk_being_archived,
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
session->chunk_being_archived,
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
- DBG("[rotation-thread] Rotation of trace archive %" PRIu64 " of session \"%s\" is complete on all consumers",
+ DBG("Rotation of trace archive %" PRIu64 " of session \"%s\" is complete on all consumers",
chunk_being_archived_id,
session->name);
}
chunk_being_archived_id,
session->name);
}
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
- DBG("[rotation-thread] Checking for pending rotation on session \"%s\", trace archive %" PRIu64,
+ DBG("Checking for pending rotation on session \"%s\", trace archive %" PRIu64,
session->name, chunk_being_archived_id);
/*
session->name, chunk_being_archived_id);
/*
session->last_archived_chunk_id.value,
location);
if (ret != LTTNG_OK) {
session->last_archived_chunk_id.value,
location);
if (ret != LTTNG_OK) {
- ERR("[rotation-thread] Failed to notify notification thread of completed rotation for session %s",
+ ERR("Failed to notify notification thread of completed rotation for session %s",
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
&chunk_being_archived_id);
assert(chunk_status == LTTNG_TRACE_CHUNK_STATUS_OK);
- DBG("[rotation-thread] Rotation of trace archive %" PRIu64 " is still pending for session %s",
+ DBG("Rotation of trace archive %" PRIu64 " is still pending for session %s",
chunk_being_archived_id, session->name);
ret = timer_session_rotation_pending_check_start(session,
DEFAULT_ROTATE_PENDING_TIMER);
chunk_being_archived_id, session->name);
ret = timer_session_rotation_pending_check_start(session,
DEFAULT_ROTATE_PENDING_TIMER);
int ret;
struct lttng_rotate_session_return rotation_return;
int ret;
struct lttng_rotate_session_return rotation_return;
- DBG("[rotation-thread] Launching scheduled time-based rotation on session \"%s\"",
+ DBG("Launching scheduled time-based rotation on session \"%s\"",
session->name);
ret = cmd_rotate_session(session, &rotation_return, false,
LTTNG_TRACE_CHUNK_COMMAND_TYPE_MOVE_TO_COMPLETED);
if (ret == LTTNG_OK) {
session->name);
ret = cmd_rotate_session(session, &rotation_return, false,
LTTNG_TRACE_CHUNK_COMMAND_TYPE_MOVE_TO_COMPLETED);
if (ret == LTTNG_OK) {
- DBG("[rotation-thread] Scheduled time-based rotation successfully launched on session \"%s\"",
+ DBG("Scheduled time-based rotation successfully launched on session \"%s\"",
session->name);
} else {
/* Don't consider errors as fatal. */
session->name);
} else {
/* Don't consider errors as fatal. */
- DBG("[rotation-thread] Scheduled time-based rotation aborted for session %s: %s",
+ DBG("Scheduled time-based rotation aborted for session %s: %s",
session->name, lttng_strerror(ret));
}
return 0;
session->name, lttng_strerror(ret));
}
return 0;
session_lock_list();
session = job->session;
if (!session) {
session_lock_list();
session = job->session;
if (!session) {
- DBG("[rotation-thread] Session \"%s\" not found",
+ DBG("Session \"%s\" not found",
session->name);
/*
* This is a non-fatal error, and we cannot report it to
session->name);
/*
* This is a non-fatal error, and we cannot report it to
if (condition_type != LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE) {
ret = -1;
if (condition_type != LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE) {
ret = -1;
- ERR("[rotation-thread] Condition type and session usage type are not the same");
+ ERR("Condition type and session usage type are not the same");
condition_status = lttng_condition_session_consumed_size_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
condition_status = lttng_condition_session_consumed_size_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
- ERR("[rotation-thread] Session name could not be fetched");
+ ERR("Session name could not be fetched");
ret = -1;
goto end;
}
evaluation_status = lttng_evaluation_session_consumed_size_get_consumed_size(evaluation,
&consumed);
if (evaluation_status != LTTNG_EVALUATION_STATUS_OK) {
ret = -1;
goto end;
}
evaluation_status = lttng_evaluation_session_consumed_size_get_consumed_size(evaluation,
&consumed);
if (evaluation_status != LTTNG_EVALUATION_STATUS_OK) {
- ERR("[rotation-thread] Failed to get evaluation");
+ ERR("Failed to get evaluation");
if (!session) {
ret = -1;
session_unlock_list();
if (!session) {
ret = -1;
session_unlock_list();
- ERR("[rotation-thread] Session \"%s\" not found",
+ ERR("Session \"%s\" not found",
condition_session_name);
goto end;
}
condition_session_name);
goto end;
}
if (ret == -LTTNG_ERR_ROTATION_PENDING) {
DBG("Rotate already pending, subscribe to the next threshold value");
} else if (ret != LTTNG_OK) {
if (ret == -LTTNG_ERR_ROTATION_PENDING) {
DBG("Rotate already pending, subscribe to the next threshold value");
} else if (ret != LTTNG_OK) {
- ERR("[rotation-thread] Failed to rotate on size notification with error: %s",
+ ERR("Failed to rotate on size notification with error: %s",
lttng_strerror(ret));
ret = -1;
goto end_unlock;
lttng_strerror(ret));
ret = -1;
goto end_unlock;
consumed + session->rotate_size,
notification_thread_handle);
if (ret) {
consumed + session->rotate_size,
notification_thread_handle);
if (ret) {
- ERR("[rotation-thread] Failed to subscribe to session consumed size condition");
+ ERR("Failed to subscribe to session consumed size condition");
goto end_unlock;
}
ret = 0;
goto end_unlock;
}
ret = 0;
status = lttng_notification_channel_has_pending_notification(
rotate_notification_channel, ¬ification_pending);
if (status != LTTNG_NOTIFICATION_CHANNEL_STATUS_OK) {
status = lttng_notification_channel_has_pending_notification(
rotate_notification_channel, ¬ification_pending);
if (status != LTTNG_NOTIFICATION_CHANNEL_STATUS_OK) {
- ERR("[rotation-thread] Error occurred while checking for pending notification");
+ ERR("Error occurred while checking for pending notification");
struct rotation_thread thread;
int queue_pipe_fd;
struct rotation_thread thread;
int queue_pipe_fd;
- DBG("[rotation-thread] Started rotation thread");
+ DBG("Started rotation thread");
rcu_register_thread();
rcu_thread_online();
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_ROTATION);
health_code_update();
if (!handle) {
rcu_register_thread();
rcu_thread_online();
health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_ROTATION);
health_code_update();
if (!handle) {
- ERR("[rotation-thread] Invalid thread context provided");
+ ERR("Invalid thread context provided");
int fd_count, i;
health_poll_entry();
int fd_count, i;
health_poll_entry();
- DBG("[rotation-thread] Entering poll wait");
+ DBG("Entering poll wait");
ret = lttng_poll_wait(&thread.events, -1);
ret = lttng_poll_wait(&thread.events, -1);
- DBG("[rotation-thread] Poll wait returned (%i)", ret);
+ DBG("Poll wait returned (%i)", ret);
health_poll_exit();
if (ret < 0) {
/*
health_poll_exit();
if (ret < 0) {
/*
if (errno == EINTR) {
continue;
}
if (errno == EINTR) {
continue;
}
- ERR("[rotation-thread] Error encountered during lttng_poll_wait (%i)", ret);
+ ERR("Error encountered during lttng_poll_wait (%i)", ret);
int fd = LTTNG_POLL_GETFD(&thread.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&thread.events, i);
int fd = LTTNG_POLL_GETFD(&thread.events, i);
uint32_t revents = LTTNG_POLL_GETEV(&thread.events, i);
- DBG("[rotation-thread] Handling fd (%i) activity (%u)",
+ DBG("Handling fd (%i) activity (%u)",
fd, revents);
if (revents & LPOLLERR) {
fd, revents);
if (revents & LPOLLERR) {
- ERR("[rotation-thread] Polling returned an error on fd %i", fd);
+ ERR("Polling returned an error on fd %i", fd);
ret = handle_notification_channel(fd, handle,
&thread);
if (ret) {
ret = handle_notification_channel(fd, handle,
&thread);
if (ret) {
- ERR("[rotation-thread] Error occurred while handling activity on notification channel socket");
+ ERR("Error occurred while handling activity on notification channel socket");
ret = handle_job_queue(handle, &thread,
handle->rotation_timer_queue);
if (ret) {
ret = handle_job_queue(handle, &thread,
handle->rotation_timer_queue);
if (ret) {
- ERR("[rotation-thread] Failed to handle rotation timer pipe event");
+ ERR("Failed to handle rotation timer pipe event");
ret = lttng_read(fd, &buf, 1);
if (ret != 1) {
ret = lttng_read(fd, &buf, 1);
if (ret != 1) {
- ERR("[rotation-thread] Failed to read from wakeup pipe (fd = %i)", fd);
+ ERR("Failed to read from wakeup pipe (fd = %i)", fd);
- DBG("[rotation-thread] Quit pipe activity");
+ DBG("Quit pipe activity");
- DBG("[rotation-thread] Exit");
fini_thread_state(&thread);
end:
health_unregister(the_health_sessiond);
fini_thread_state(&thread);
end:
health_unregister(the_health_sessiond);
* still fire.
*/
} else {
* still fire.
*/
} else {
- ERR("Unexpected signal %d\n", info.si_signo);
+ ERR("Unexpected signal %d", info.si_signo);
- DBG("[timer-thread] Exit");
health_unregister(the_health_sessiond);
rcu_thread_offline();
rcu_unregister_thread();
health_unregister(the_health_sessiond);
rcu_thread_offline();
rcu_unregister_thread();