X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_channels.c;h=fbf02a0580c520fc37f9baf62cdd3ec2a962387c;hb=e132a0d4a23036da549cb5d09ea9170183c45543;hp=d026af4337332ddfa08c05b3f912aa40085e9b18;hpb=1624d5b7ba86633d36f3a5c86ea1df5d308c4360;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index d026af433..fbf02a058 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -112,15 +112,15 @@ static void usage(FILE *ofp) fprintf(ofp, " kernel and ust tracers\n"); fprintf(ofp, " --switch-timer USEC Switch timer interval in usec (default: %u)\n", DEFAULT_CHANNEL_SWITCH_TIMER); - fprintf(ofp, " --read-timer USEC Read timer interval in usec (default: %u)\n", - DEFAULT_CHANNEL_READ_TIMER); + fprintf(ofp, " --read-timer USEC Read timer interval in usec (UST default: %u, kernel default: %u)\n", + DEFAULT_UST_CHANNEL_READ_TIMER, DEFAULT_KERNEL_CHANNEL_READ_TIMER); fprintf(ofp, " --output TYPE Channel output type (Values: %s, %s)\n", output_mmap, output_splice); fprintf(ofp, " --buffers-uid Use per UID buffer (-u only)\n"); fprintf(ofp, " --buffers-pid Use per PID buffer (-u only)\n"); fprintf(ofp, " --buffers-global Use shared buffer for the whole system (-k only)\n"); fprintf(ofp, " -C, --tracefile-size SIZE\n"); - fprintf(ofp, " Maximum size of of each tracefile within a stream (in bytes).\n"); + fprintf(ofp, " Maximum size of each tracefile within a stream (in bytes).\n"); fprintf(ofp, " -W, --tracefile-count COUNT\n"); fprintf(ofp, " Used in conjunction with -C option, this will limit the number\n"); fprintf(ofp, " of files created to the specified count.\n"); @@ -179,11 +179,21 @@ static int enable_channel(char *session_name) if (opt_kernel) { dom.type = LTTNG_DOMAIN_KERNEL; dom.buf_type = LTTNG_BUFFER_GLOBAL; + if (opt_buffer_uid || opt_buffer_pid) { + ERR("Buffer type not supported for domain -k"); + ret = CMD_ERROR; + goto error; + } } else if (opt_userspace) { dom.type = LTTNG_DOMAIN_UST; if (opt_buffer_uid) { dom.buf_type = LTTNG_BUFFER_PER_UID; } else { + if (opt_buffer_global) { + ERR("Buffer type not supported for domain -u"); + ret = CMD_ERROR; + goto error; + } dom.buf_type = LTTNG_BUFFER_PER_PID; } } else { @@ -238,7 +248,7 @@ static int enable_channel(char *session_name) switch (-ret) { case LTTNG_ERR_KERN_CHAN_EXIST: case LTTNG_ERR_UST_CHAN_EXIST: - WARN("Channel %s: %s (session %s", channel_name, + WARN("Channel %s: %s (session %s)", channel_name, lttng_strerror(ret), session_name); goto error; default: