X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=e990c34843f7eba9d21d0f2df5e8d43dbc750882;hp=631aa6b2d92e5e0d13aaa5a2d59072327b31eb69;hb=ae8564917fa3cb3497ec17951d8ac0ee28de9c81;hpb=af87c45a6179026e263c3a9eb251ccf8ec9537e7 diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 631aa6b2d..e990c3484 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -314,7 +314,7 @@ error: static void teardown_kernel_session(struct ltt_session *session) { if (!session->kernel_session) { - DBG3("No kernel session when tearingdown session"); + DBG3("No kernel session when tearing down session"); return; } @@ -340,7 +340,7 @@ static void teardown_ust_session(struct ltt_session *session) int ret; if (!session->ust_session) { - DBG3("No UST session when tearingdown session"); + DBG3("No UST session when tearing down session"); return; } @@ -397,7 +397,7 @@ static void cleanup(void) } free(cmd); - DBG("Cleaning up all session"); + DBG("Cleaning up all sessions"); /* Destroy session list mutex */ if (session_list_ptr != NULL) { @@ -2031,8 +2031,15 @@ static int list_lttng_ust_global_events(char *channel_name, case LTTNG_UST_FUNCTION: tmp[i].type = LTTNG_EVENT_FUNCTION; break; - case LTTNG_UST_TRACEPOINT_LOGLEVEL: - tmp[i].type = LTTNG_EVENT_TRACEPOINT_LOGLEVEL; + } + strncpy(tmp[i].loglevel, uevent->attr.loglevel, LTTNG_SYMBOL_NAME_LEN); + tmp[i].loglevel[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; + switch (uevent->attr.loglevel_type) { + case LTTNG_UST_LOGLEVEL: + tmp[i].type = LTTNG_EVENT_LOGLEVEL; + break; + case LTTNG_UST_LOGLEVEL_ONLY: + tmp[i].type = LTTNG_EVENT_LOGLEVEL_ONLY; break; } i++; @@ -2419,12 +2426,6 @@ error: /* * Command LTTNG_ENABLE_EVENT processed by the client thread. - * - * TODO: currently, both events and loglevels are kept within the same - * namespace for UST global registry/app registery, so if an event - * happen to have the same name as the loglevel (very unlikely though), - * and an attempt is made to enable/disable both in the same session, - * the first to be created will be the only one allowed to exist. */ static int cmd_enable_event(struct ltt_session *session, int domain, char *channel_name, struct lttng_event *event) @@ -3301,7 +3302,6 @@ static int process_client_msg(struct command_ctx *cmd_ctx) ret = cmd_disable_event(cmd_ctx->session, cmd_ctx->lsm->domain.type, cmd_ctx->lsm->u.disable.channel_name, cmd_ctx->lsm->u.disable.name); - ret = LTTCOMM_OK; break; } case LTTNG_DISABLE_ALL_EVENT: @@ -4158,6 +4158,8 @@ int main(int argc, char **argv) void *status; const char *home_path; + init_kernel_workarounds(); + rcu_register_thread(); /* Create thread quit pipe */