Keep them in lttng.h to retain values for future development.
Also fix define alignment in lttng.h
Note that at this commit, "Not implemented" error is still returned.
This will be fix to "Unknown command" in next commit.
Signed-off-by: David Goulet <dgoulet@efficios.com>
enum lttng_domain_type {
LTTNG_DOMAIN_KERNEL = 1,
LTTNG_DOMAIN_UST = 2,
+
+ /*
+ * For now, the domains below are not implemented. However, we keep them
+ * here in order to retain their enum values for future development. Note
+ * that it is on the roadmap to implement them.
+ *
LTTNG_DOMAIN_UST_EXEC_NAME = 3,
LTTNG_DOMAIN_UST_PID = 4,
LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN = 5,
+ */
};
/*
* LTTng consumer mode
*/
enum lttng_event_output {
- LTTNG_EVENT_SPLICE = 0,
- LTTNG_EVENT_MMAP = 1,
+ LTTNG_EVENT_SPLICE = 0,
+ LTTNG_EVENT_MMAP = 1,
};
/* Event context possible type */
enum lttng_event_context_type {
- LTTNG_EVENT_CONTEXT_PID = 0,
- LTTNG_EVENT_CONTEXT_PERF_COUNTER = 1,
- LTTNG_EVENT_CONTEXT_COMM = 2,
- LTTNG_EVENT_CONTEXT_PRIO = 3,
- LTTNG_EVENT_CONTEXT_NICE = 4,
- LTTNG_EVENT_CONTEXT_VPID = 5,
- LTTNG_EVENT_CONTEXT_TID = 6,
- LTTNG_EVENT_CONTEXT_VTID = 7,
- LTTNG_EVENT_CONTEXT_PPID = 8,
- LTTNG_EVENT_CONTEXT_VPPID = 9,
+ LTTNG_EVENT_CONTEXT_PID = 0,
+ LTTNG_EVENT_CONTEXT_PERF_COUNTER = 1,
+ LTTNG_EVENT_CONTEXT_COMM = 2,
+ LTTNG_EVENT_CONTEXT_PRIO = 3,
+ LTTNG_EVENT_CONTEXT_NICE = 4,
+ LTTNG_EVENT_CONTEXT_VPID = 5,
+ LTTNG_EVENT_CONTEXT_TID = 6,
+ LTTNG_EVENT_CONTEXT_VTID = 7,
+ LTTNG_EVENT_CONTEXT_PPID = 8,
+ LTTNG_EVENT_CONTEXT_VPPID = 9,
};
enum lttng_calibrate_type {
- LTTNG_CALIBRATE_FUNCTION = 0,
+ LTTNG_CALIBRATE_FUNCTION = 0,
};
struct lttng_domain {
chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
break;
case LTTNG_DOMAIN_UST:
+#if 0
case LTTNG_DOMAIN_UST_PID:
+ case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+ case LTTNG_DOMAIN_UST_EXEC_NAME:
+#endif
chan->attr.subbuf_size = DEFAULT_UST_CHANNEL_SUBBUF_SIZE;
chan->attr.num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
chan->attr.output = DEFAULT_UST_CHANNEL_OUTPUT;
/* Enable channel for global domain */
ret = ust_app_enable_channel_glb(usess, uchan);
break;
+#if 0
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
+#endif
+ default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
/* Enable channel for global domain */
ret = ust_app_create_channel_glb(usess, uchan);
break;
+#if 0
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error_free_chan;
/* Disable channel for global domain */
ret = ust_app_disable_channel_glb(usess, uchan);
break;
+#if 0
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
+#endif
+ default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
case LTTNG_DOMAIN_UST:
chan_ht = usess->domain_global.channels;
break;
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
free(events);
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto end;
goto error;
}
break;
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
free(events);
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
break;
}
+#if 0
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
- ret = LTTCOMM_NOT_IMPLEMENTED;
- goto error;
+#endif
default:
ret = LTTCOMM_UNKNOWN_DOMAIN;
goto error;
}
break;
}
+#if 0
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
- ret = LTTCOMM_NOT_IMPLEMENTED;
- goto error;
+#endif
default:
ret = LTTCOMM_UNKNOWN_DOMAIN;
goto error;
channel_name);
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
}
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
break;
}
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
default:
ret = LTTCOMM_NOT_IMPLEMENTED;
goto error;
static char *opt_session_name;
static int opt_kernel;
static int opt_userspace;
+static char *opt_type;
+#if 0
+/* Not implemented yet */
static char *opt_cmd_name;
static pid_t opt_pid;
-static char *opt_type;
+#endif
enum {
OPT_HELP = 1,
{"channel", 'c', POPT_ARG_STRING, &opt_channel_name, 0, 0, 0},
{"event", 'e', POPT_ARG_STRING, &opt_event_name, 0, 0, 0},
{"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
- {"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
+#if 0
+ /* Not implemented yet */
{"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+ {"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
+#else
+ {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
{"type", 't', POPT_ARG_STRING, &opt_type, OPT_TYPE, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
};
fprintf(ofp, " -c, --channel NAME Apply on channel\n");
fprintf(ofp, " -e, --event NAME Apply on event\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, " 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, " -t, --type TYPE Context type. You can repeat that option on\n");
fprintf(ofp, " the command line.\n");
fprintf(ofp, " TYPE can be one of the strings below:\n");
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
- } else if (opt_pid != 0) {
- dom.type = LTTNG_DOMAIN_UST_PID;
- dom.attr.pid = opt_pid;
- DBG("PID %d set to lttng handle", opt_pid);
- } else if (opt_userspace && opt_cmd_name == NULL) {
+ } else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
- } else if (opt_userspace && opt_cmd_name != NULL) {
- dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
- strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_NOT_IMPLEMENTED;
break;
case OPT_USERSPACE:
opt_userspace = 1;
+#if 0
opt_cmd_name = poptGetOptArg(pc);
+#endif
break;
default:
usage(stderr);
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,
/* 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},
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");
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;
goto end;
} else {
static int opt_kernel;
static char *opt_session_name;
static int opt_userspace;
+#if 0
+/* Not implemented yet */
static char *opt_cmd_name;
static pid_t opt_pid;
+#endif
enum {
OPT_HELP = 1,
{"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0},
{"session", 's', POPT_ARG_STRING, &opt_session_name, 0, 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},
{"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#else
+ {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
{0, 0, 0, 0, 0, 0, 0}
};
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " -s, --session Apply on session name\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, " 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");
}
char *channel_name;
struct lttng_domain dom;
+ /* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
- } else if (opt_pid != 0) {
- dom.type = LTTNG_DOMAIN_UST_PID;
- dom.attr.pid = opt_pid;
- DBG("PID %d set to lttng handle", opt_pid);
- } else if (opt_userspace && opt_cmd_name == NULL) {
+ } else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
- } else if (opt_userspace && opt_cmd_name != NULL) {
- dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
- strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_NOT_IMPLEMENTED;
static char *opt_channel_name;
static char *opt_session_name;
static int opt_userspace;
-static char *opt_cmd_name;
static int opt_disable_all;
+#if 0
+/* Not implemented yet */
+static char *opt_cmd_name;
static pid_t opt_pid;
+#endif
enum {
OPT_HELP = 1,
{"all-events", 'a', POPT_ARG_VAL, &opt_disable_all, 1, 0, 0},
{"channel", 'c', POPT_ARG_STRING, &opt_channel_name, 0, 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},
{"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#else
+ {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
{0, 0, 0, 0, 0, 0, 0}
};
fprintf(ofp, " -c, --channel Apply on this channel\n");
fprintf(ofp, " -a, --all-events Disable all tracepoints\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, " 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");
}
goto error;
}
+ /* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
- } else if (opt_pid != 0) {
- dom.type = LTTNG_DOMAIN_UST_PID;
- dom.attr.pid = opt_pid;
- DBG("PID %d set to lttng handle", opt_pid);
- } else if (opt_userspace && opt_cmd_name == NULL) {
+ } else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
- DBG("UST global domain selected");
- } else if (opt_userspace && opt_cmd_name != NULL) {
- dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
- strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
- dom.attr.exec_name[NAME_MAX - 1] = '\0';
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_NOT_IMPLEMENTED;
DBG("Disabling kernel event %s in channel %s",
event_name, channel_name);
} else if (opt_userspace) { /* User-space tracer action */
+#if 0
if (opt_cmd_name != NULL || opt_pid) {
MSG("Only supporting tracing all UST processes (-u) for now.");
ret = CMD_NOT_IMPLEMENTED;
goto error;
}
+#endif
DBG("Disabling UST event %s in channel %s",
event_name, channel_name);
} else {
static char *opt_channels;
static int opt_kernel;
-static char *opt_cmd_name;
static char *opt_session_name;
static int opt_userspace;
+static struct lttng_channel chan;
+#if 0
+/* Not implemented yet */
static char *opt_cmd_name;
static pid_t opt_pid;
-static struct lttng_channel chan;
+#endif
enum {
OPT_HELP = 1,
{"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0},
{"session", 's', POPT_ARG_STRING, &opt_session_name, 0, 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},
{"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#else
+ {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
{"discard", 0, POPT_ARG_NONE, 0, OPT_DISCARD, 0, 0},
{"overwrite", 0, POPT_ARG_NONE, 0, OPT_OVERWRITE, 0, 0},
{"subbuf-size", 0, POPT_ARG_DOUBLE, 0, OPT_SUBBUF_SIZE, 0, 0},
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " -s, --session Apply on session name\n");
fprintf(ofp, " -k, --kernel Apply on the kernel tracer\n");
+#if 0
fprintf(ofp, " -u, --userspace [CMD] Apply for the user-space tracer\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, "Channel options:\n");
fprintf(ofp, " --discard Discard event when buffers are full%s\n",
char *channel_name;
struct lttng_domain dom;
+ /* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
- } else if (opt_pid != 0) {
- dom.type = LTTNG_DOMAIN_UST_PID;
- dom.attr.pid = opt_pid;
- DBG("PID %d set to lttng handle", opt_pid);
- } else if (opt_userspace && opt_cmd_name == NULL) {
+ } else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
- } else if (opt_userspace && opt_cmd_name != NULL) {
- dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
- strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_NOT_IMPLEMENTED;
static int opt_kernel;
static char *opt_session_name;
static int opt_userspace;
-static char *opt_cmd_name;
static int opt_enable_all;
-static pid_t opt_pid;
static char *opt_probe;
static char *opt_function;
static char *opt_function_entry_symbol;
static char *opt_channel_name;
+#if 0
+/* Not implemented yet */
+static char *opt_cmd_name;
+static pid_t opt_pid;
+#endif
enum {
OPT_HELP = 1,
{"all", 'a', POPT_ARG_VAL, &opt_enable_all, 1, 0, 0},
{"channel", 'c', POPT_ARG_STRING, &opt_channel_name, 0, 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},
{"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},
{"probe", 0, POPT_ARG_STRING, &opt_probe, OPT_PROBE, 0, 0},
{"function", 0, POPT_ARG_STRING, &opt_function, OPT_FUNCTION, 0, 0},
fprintf(ofp, " -c, --channel Apply on this channel\n");
fprintf(ofp, " -a, --all Enable all tracepoints\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, " 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, "Event options:\n");
fprintf(ofp, " --tracepoint Tracepoint event (default)\n");
/* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
- } else if (opt_pid != 0) {
- dom.type = LTTNG_DOMAIN_UST_PID;
- dom.attr.pid = opt_pid;
- DBG("PID %d set to lttng handle", opt_pid);
- } else if (opt_userspace && opt_cmd_name == NULL) {
+ } else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
- } else if (opt_userspace && opt_cmd_name != NULL) {
- dom.type = LTTNG_DOMAIN_UST_EXEC_NAME;
- strncpy(dom.attr.exec_name, opt_cmd_name, NAME_MAX);
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_NOT_IMPLEMENTED;
goto error;
}
} else if (opt_userspace) { /* User-space tracer action */
+#if 0
if (opt_cmd_name != NULL || opt_pid) {
MSG("Only supporting tracing all UST processes (-u) for now.");
ret = CMD_NOT_IMPLEMENTED;
goto error;
}
+#endif
DBG("Enabling UST event %s for channel %s", event_name,
channel_name);
#include "../command.h"
-static int opt_pid;
static int opt_userspace;
-static char *opt_cmd_name;
static int opt_kernel;
static char *opt_channel;
static int opt_domain;
+#if 0
+/* Not implemented yet */
+static char *opt_cmd_name;
+static pid_t opt_pid;
+#endif
const char *indent4 = " ";
const char *indent6 = " ";
/* 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},
- {"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
- {"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#if 0
+ /* Not implemented yet */
+ {"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
+ {"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0},
+#else
+ {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
+#endif
{"channel", 'c', POPT_ARG_STRING, &opt_channel, 0, 0, 0},
{"domain", 'd', POPT_ARG_VAL, &opt_domain, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
fprintf(ofp, " -h, --help Show this help\n");
fprintf(ofp, " -k, --kernel Select kernel domain\n");
fprintf(ofp, " -u, --userspace Select user-space domain.\n");
+#if 0
fprintf(ofp, " -p, --pid PID List user-space events by PID\n");
+#endif
fprintf(ofp, "\n");
fprintf(ofp, "Options:\n");
fprintf(ofp, " -c, --channel NAME List details of a channel\n");
}
}
- if (opt_pid != 0) {
- MSG("*** Userspace tracing not implemented for PID ***\n");
- }
-
/* Get session name (trailing argument) */
session_name = poptGetArg(pc);
DBG2("Session name: %s", session_name);
switch (src->type) {
case LTTNG_DOMAIN_KERNEL:
case LTTNG_DOMAIN_UST:
+ /*
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+ */
memcpy(dst, src, sizeof(struct lttng_domain));
break;
default:
attr->output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
break;
case LTTNG_DOMAIN_UST:
+#if 0
case LTTNG_DOMAIN_UST_EXEC_NAME:
case LTTNG_DOMAIN_UST_PID:
case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
+#endif
attr->overwrite = DEFAULT_CHANNEL_OVERWRITE;
attr->switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
attr->read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;