X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=28166c8be28e5a9588d14d8f14adfd56a39810dd;hb=5b89fc92cbb5a2a9d1fd2994edebb0453584f87c;hp=be252ab7600c3299e0243df68338b703d19c9fa7;hpb=b955b4d4c416bfa4db1915b51834c24ee2f35df1;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index be252ab76..28166c8be 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -24,6 +24,7 @@ #include #include +#include #include #include "../command.h" @@ -251,8 +252,8 @@ end: static void print_userspace_probe_location(struct lttng_event *event) { - struct lttng_userspace_probe_location *location; - struct lttng_userspace_probe_location_lookup_method *lookup_method; + const struct lttng_userspace_probe_location *location; + const struct lttng_userspace_probe_location_lookup_method *lookup_method; enum lttng_userspace_probe_location_lookup_method_type lookup_type; location = lttng_event_get_userspace_probe_location(event); @@ -1261,7 +1262,7 @@ void print_timer(const char *timer_name, uint32_t space_count, int64_t value) } if (value) { - MSG("%" PRId64 " µs", value); + MSG("%" PRId64 " %s", value, USEC_UNIT); } else { MSG("inactive"); } @@ -1318,7 +1319,8 @@ static void print_channel(struct lttng_channel *channel) if (blocking_timeout == -1) { MSG("%sBlocking timeout: infinite", indent6); } else { - MSG("%sBlocking timeout: %" PRId64 " µs", indent6, blocking_timeout); + MSG("%sBlocking timeout: %" PRId64 " %s", indent6, + blocking_timeout, USEC_UNIT); } } @@ -1616,7 +1618,7 @@ static enum cmd_error_code print_periodic_rotation_schedule( goto end; } - MSG(" timer period: %" PRIu64" µs", value); + MSG(" timer period: %" PRIu64" %s", value, USEC_UNIT); ret = CMD_SUCCESS; end: return ret; @@ -1857,7 +1859,6 @@ static int list_sessions(const char *session_name) MSG("Available tracing sessions:"); } - for (i = 0; i < count; i++) { if (session_name != NULL) { if (strncmp(sessions[i].name, session_name, NAME_MAX) == 0) { @@ -1865,20 +1866,25 @@ static int list_sessions(const char *session_name) MSG("Tracing session %s: [%s%s]", session_name, active_string(sessions[i].enabled), snapshot_string(sessions[i].snapshot_mode)); - MSG("%sTrace path: %s\n", indent4, sessions[i].path); + if (*sessions[i].path) { + MSG("%sTrace output: %s\n", indent4, sessions[i].path); + } memcpy(&listed_session, &sessions[i], sizeof(listed_session)); break; } } else { - MSG(" %d) %s (%s) [%s%s]", i + 1, - sessions[i].name, sessions[i].path, + MSG(" %d) %s [%s%s]", i + 1, + sessions[i].name, active_string(sessions[i].enabled), snapshot_string(sessions[i].snapshot_mode)); - MSG("%sTrace path: %s", indent4, sessions[i].path); + if (*sessions[i].path) { + MSG("%sTrace output: %s", indent4, sessions[i].path); + } if (sessions[i].live_timer_interval != 0) { - MSG("%sLive timer interval: %u µs", indent4, - sessions[i].live_timer_interval); + MSG("%sLive timer interval: %u %s", indent4, + sessions[i].live_timer_interval, + USEC_UNIT); } MSG(""); }