From: David Goulet Date: Wed, 1 Feb 2012 23:19:20 +0000 (-0500) Subject: Fix enable channel usage and add enable event error msg X-Git-Tag: v2.0-pre19~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cc62c0c06bbfb22885debcaba1164e31cfa4f87b;p=lttng-tools.git Fix enable channel usage and add enable event error msg Channel options were missing details to the usage text. Also, add an error message if an event option is passed to user-space that is not supported. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 942dbf00e..912e3b041 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -100,17 +100,17 @@ static void usage(FILE *ofp) DEFAULT_CHANNEL_OVERWRITE ? "" : " (default)"); fprintf(ofp, " --overwrite Flight recorder mode%s\n", DEFAULT_CHANNEL_OVERWRITE ? " (default)" : ""); - fprintf(ofp, " --subbuf-size Subbuffer size in bytes\n"); + fprintf(ofp, " --subbuf-size SIZE Subbuffer size in bytes\n"); fprintf(ofp, " (default: %u, kernel default: %u)\n", DEFAULT_CHANNEL_SUBBUF_SIZE, DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE); - fprintf(ofp, " --num-subbuf Number of subbufers\n"); + fprintf(ofp, " --num-subbuf NUM Number of subbufers\n"); fprintf(ofp, " (default: %u, kernel default: %u)\n", DEFAULT_CHANNEL_SUBBUF_NUM, DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM); - fprintf(ofp, " --switch-timer Switch timer interval in usec (default: %u)\n", + fprintf(ofp, " --switch-timer USEC Switch timer interval in usec (default: %u)\n", DEFAULT_CHANNEL_SWITCH_TIMER); - fprintf(ofp, " --read-timer Read timer interval in usec (default: %u)\n", + fprintf(ofp, " --read-timer USEC Read timer interval in usec (default: %u)\n", DEFAULT_CHANNEL_READ_TIMER); fprintf(ofp, "\n"); } diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 5beb5a2b2..125c40fe0 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -369,6 +369,7 @@ static int enable_events(char *session_name) case LTTNG_EVENT_FUNCTION_ENTRY: case LTTNG_EVENT_SYSCALL: default: + ERR("Event type not available for user-space tracing"); ret = CMD_UNDEFINED; goto error; }