Unit tests: don't rebuild units under test
[lttng-tools.git] / src / bin / lttng / commands / enable_channels.c
index d026af4337332ddfa08c05b3f912aa40085e9b18..fbf02a0580c520fc37f9baf62cdd3ec2a962387c 100644 (file)
@@ -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:
This page took 0.025006 seconds and 5 git commands to generate.