X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-sessiond%2Fmain.c;h=822c1df7de1d86b5fefcc42d2f5a99e5564202d8;hb=6b79ed20f0e6d7aace483e2e4364083d2cfe838b;hp=4091bb0901a6be698fc17173bb2fb2e5e4c97c63;hpb=76d45b4000137cff321b29800e11cc5d4a299a98;p=lttng-tools.git diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c index 4091bb090..822c1df7d 100644 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@ -1527,16 +1527,17 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data) switch (consumer_data->type) { case LTTNG_CONSUMER_KERNEL: /* - * Find out which consumerd to execute. We will first - * try the 64-bit path, then the 32-bit one, then - * fallback on sessiond's installation directory. + * Find out which consumerd to execute. We will + * first try the 64-bit path, then the + * sessiond's installation directory, and + * fallback on the 32-bit one, */ if (stat(consumerd64_bin, &st) == 0) { consumer_to_use = consumerd64_bin; - } else if (stat(consumerd32_bin, &st) == 0) { - consumer_to_use = consumerd32_bin; } else if (stat(INSTALL_BIN_PATH "/" CONSUMERD_FILE, &st) == 0) { consumer_to_use = INSTALL_BIN_PATH "/" CONSUMERD_FILE; + } else if (stat(consumerd32_bin, &st) == 0) { + consumer_to_use = consumerd32_bin; } else { break; } @@ -2093,9 +2094,7 @@ static int list_lttng_ust_global_events(char *channel_name, tmp[i].type = LTTNG_EVENT_FUNCTION; break; case LTTNG_UST_TRACEPOINT_LOGLEVEL: - /* TODO */ - ret = -LTTCOMM_NOT_IMPLEMENTED; - goto error; + tmp[i].type = LTTNG_EVENT_TRACEPOINT_LOGLEVEL; break; } i++; @@ -2410,9 +2409,8 @@ static int cmd_disable_event(struct ltt_session *session, int domain, } case LTTNG_DOMAIN_UST: { - struct ltt_ust_session *usess; struct ltt_ust_channel *uchan; - struct ltt_ust_event *uevent; + struct ltt_ust_session *usess; usess = session->ust_session; @@ -2423,23 +2421,13 @@ static int cmd_disable_event(struct ltt_session *session, int domain, goto error; } - uevent = trace_ust_find_event_by_name(uchan->events, event_name); - if (uevent == NULL) { - ret = LTTCOMM_UST_EVENT_NOT_FOUND; - goto error; - } - - ret = ust_app_disable_event_glb(usess, uchan, uevent); - if (ret < 0) { - ret = LTTCOMM_UST_DISABLE_FAIL; + ret = event_ust_disable_tracepoint(usess, domain, uchan, event_name); + if (ret != LTTCOMM_OK) { goto error; } - uevent->enabled = 0; - - DBG2("Disable UST event %s in channel %s completed", event_name, + DBG3("Disable UST event %s in channel %s completed", event_name, channel_name); - break; } case LTTNG_DOMAIN_UST_EXEC_NAME: @@ -2500,13 +2488,12 @@ static int cmd_disable_event_all(struct ltt_session *session, int domain, goto error; } - ret = ust_app_disable_all_event_glb(usess, uchan); - if (ret < 0) { - ret = LTTCOMM_UST_DISABLE_FAIL; + ret = event_ust_disable_all_tracepoints(usess, domain, uchan); + if (ret != 0) { goto error; } - DBG2("Disable all UST event in channel %s completed", channel_name); + DBG3("Disable all UST events in channel %s completed", channel_name); break; }