Change not implemented error to undefined.
[lttng-tools.git] / src / bin / lttng / commands / calibrate.c
index ee2c76af1bb9ab879163c2e2450b1db4ab8425b9..485cae135413f43fa04c8611b88cc78c0581ba34 100644 (file)
 
 static int opt_event_type;
 static char *opt_kernel;
-static int opt_pid_all;
 static int opt_userspace;
+#if 0
+/* Not implemented yet */
 static char *opt_cmd_name;
 static pid_t opt_pid;
+#endif
 
 enum {
        OPT_HELP = 1,
@@ -54,9 +56,13 @@ static struct poptOption long_options[] = {
        /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
        {"help",           'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0},
        {"kernel",         'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
+#if 0
+       /* Not implemented yet */
        {"userspace",      'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
-       {"all",            0,   POPT_ARG_VAL, &opt_pid_all, 1, 0, 0},
        {"pid",            'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#else
+       {"userspace",      'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
        {"tracepoint",     0,   POPT_ARG_NONE, 0, OPT_TRACEPOINT, 0, 0},
        {"marker",         0,   POPT_ARG_NONE, 0, OPT_MARKER, 0, 0},
        {"probe",          0,   POPT_ARG_NONE, 0, OPT_PROBE, 0, 0},
@@ -81,9 +87,14 @@ static void usage(FILE *ofp)
        fprintf(ofp, "\n");
        fprintf(ofp, "  -h, --help               Show this help\n");
        fprintf(ofp, "  -k, --kernel             Apply for the kernel tracer\n");
+#if 0
        fprintf(ofp, "  -u, --userspace [CMD]    Apply for the user-space tracer\n");
-       fprintf(ofp, "      --all                If -u, apply on all traceable apps\n");
-       fprintf(ofp, "  -p, --pid PID            If -u, apply on a specific PID\n");
+       fprintf(ofp, "                           If no CMD, the domain used is UST global\n");
+       fprintf(ofp, "                           or else the domain is UST EXEC_NAME\n");
+       fprintf(ofp, "  -p, --pid PID            If -u, apply to specific PID (domain: UST PID)\n");
+#else
+       fprintf(ofp, "  -u, --userspace          Apply for the user-space tracer\n");
+#endif
        fprintf(ofp, "\n");
        fprintf(ofp, "Calibrate options:\n");
        fprintf(ofp, "    --tracepoint           Tracepoint event (default)\n");
@@ -143,17 +154,11 @@ static int calibrate_lttng(void)
                        DBG("Calibrating kernel syscall");
                        break;
                default:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        goto end;
                }
        } else if (opt_userspace) {             /* User-space tracer action */
-               /*
-                * TODO: Waiting on lttng UST 2.0
-                */
-               if (opt_pid_all) {
-               } else if (opt_pid != 0) {
-               }
-               ret = CMD_NOT_IMPLEMENTED;
+               ret = CMD_UNDEFINED;
                goto end;
        } else {
                ERR("Please specify a tracer (--kernel or --userspace)");
@@ -188,22 +193,22 @@ int cmd_calibrate(int argc, const char **argv)
                        ret = CMD_SUCCESS;
                        goto end;
                case OPT_TRACEPOINT:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_MARKER:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        goto end;
                case OPT_PROBE:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_FUNCTION:
                        opt_event_type = LTTNG_EVENT_FUNCTION;
                        break;
                case OPT_FUNCTION_ENTRY:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_SYSCALL:
-                       ret = CMD_NOT_IMPLEMENTED;
+                       ret = CMD_UNDEFINED;
                        break;
                case OPT_USERSPACE:
                        opt_userspace = 1;
This page took 0.025316 seconds and 4 git commands to generate.