Project

General

Profile

Actions

Bug #586

closed

Hidden command option for lttng calibrate

Added by Daniel U. Thibault over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Target version:
Start date:
07/08/2013
Due date:
% Done:

100%

Estimated time:

Description

This is pretty harmless but s also easily fixed. In lttng-tools-2.2.0\src\bin\lttng\commands\calibrate.c, we have:

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 */
...
#else
    {"userspace",      'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
    {"function",       0,   POPT_ARG_NONE, 0, OPT_FUNCTION, 0, 0},
#endif
#if 0
    /*
     * Removed from options to discourage its use. Not in kernel
     * tracer anymore.
     */
    {"function:entry", 0,   POPT_ARG_NONE, 0, OPT_FUNCTION_ENTRY, 0, 0},
#endif
    {"syscall",        0,   POPT_ARG_NONE, 0, OPT_SYSCALL, 0, 0},
    {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL},
    {0, 0, 0, 0, 0, 0, 0}
};

/*
 * usage
 */
static void usage(FILE *ofp)
{
    fprintf(ofp, "usage: lttng calibrate [-k|-u] [OPTIONS]\n");
    fprintf(ofp, "\n");
    fprintf(ofp, "Options:\n");
...
#if 0
    fprintf(ofp, "    --tracepoint           Tracepoint event (default)\n");
    fprintf(ofp, "    --probe\n");
    fprintf(ofp, "                           Dynamic probe.\n");
#if 0
    fprintf(ofp, "    --function:entry symbol\n");
    fprintf(ofp, "                           Function tracer event\n");
#endif
    fprintf(ofp, "    --syscall              System call eventl\n");
    fprintf(ofp, "    --marker               User-space marker (deprecated)\n");
#endif
    fprintf(ofp, "\n");
}

The static struct poptOption long_options[] includes the --syscall command option but the static void usage(FILE *ofp) excludes it from the displayed help. Using it on the command line yields CMD_UNDEFINED, which is fine.

Actions

Also available in: Atom PDF