X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng%2Foptions.c;h=a24de718964376414d80aae7e9cfcab26b5d5192;hb=d686b40f66ea5df5ac0b9405991bbc33348b0a88;hp=bb0233e7e7f79270b8831c231011f0cd549f2d59;hpb=894be886aae0f1a1f49e63723511fcb15e816e7e;p=lttng-tools.git diff --git a/lttng/options.c b/lttng/options.c index bb0233e7e..a24de7189 100644 --- a/lttng/options.c +++ b/lttng/options.c @@ -19,7 +19,7 @@ #include #include -#include "lttng.h" +#include "options.h" /* Option variables */ char *opt_event_list; @@ -30,20 +30,22 @@ char *opt_trace_name; int opt_destroy_trace; int opt_create_session; int opt_destroy_session; -int opt_trace_kernel = 0; -int opt_quiet = 0; -int opt_verbose = 0; -int opt_list_apps = 0; -int opt_no_sessiond = 0; -int opt_list_session = 0; -int opt_list_traces = 0; +int opt_trace_kernel; +int opt_quiet; +int opt_verbose; +int opt_list_apps; +int opt_list_events; +int opt_no_sessiond; +int opt_list_session; +int opt_list_traces; int opt_create_trace; -int opt_start_trace = 0; -int opt_stop_trace = 0; +int opt_start_trace; +int opt_stop_trace; int opt_enable_event; +int opt_enable_all_event; int opt_disable_event; -int opt_create_channel; -pid_t opt_trace_pid = 0; +int opt_kern_create_channel; +pid_t opt_trace_pid; enum { OPT_HELP = 1, @@ -65,10 +67,13 @@ static struct poptOption long_options[] = { {"destroy-session", 'd', POPT_ARG_STRING, 0, OPT_DESTROY_SESSION, 0, 0}, {"disable-event", 0, POPT_ARG_STRING, 0, OPT_DISABLE_EVENT, 0, 0}, {"enable-event", 'e', POPT_ARG_STRING, 0, OPT_ENABLE_EVENT, 0, 0}, + {"enable-all-event",'a', POPT_ARG_VAL, &opt_enable_all_event, 1, 0, 0}, {"group", 0, POPT_ARG_STRING, &opt_tracing_group, 0, 0, 0}, {"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0}, {"kernel", 'k', POPT_ARG_VAL, &opt_trace_kernel, 1, 0, 0}, + {"kern-create-channel",0, POPT_ARG_VAL, &opt_kern_create_channel, 1, 0, 0}, {"list-apps", 'L', POPT_ARG_VAL, &opt_list_apps, 1, 0, 0}, + {"list-events", 0, POPT_ARG_VAL, &opt_list_events, 1, 0, 0}, {"list-sessions", 'l', POPT_ARG_VAL, &opt_list_session, 1, 0, 0}, {"list-traces", 't', POPT_ARG_VAL, &opt_list_traces, 1, 0, 0}, {"no-kernel", 0, POPT_ARG_VAL, &opt_trace_kernel, 0, 0, 0}, @@ -111,7 +116,9 @@ static void usage(FILE *ofp) fprintf(ofp, "Tracing options:\n"); fprintf(ofp, " -p, --pid PID Specify action on user-space tracer for PID\n"); fprintf(ofp, " -k, --kernel Specify action on kernel tracer\n"); + fprintf(ofp, " --list-events List all available tracing events\n"); fprintf(ofp, " -e, --enable-event LIST Enable tracing event (support marker and tracepoint)\n"); + fprintf(ofp, " -a, --enable-all-event Enable all tracing event\n"); fprintf(ofp, " --disable-event LIST Disable tracing event (support marker and tracepoint)\n"); fprintf(ofp, " -C, --create-trace Create a trace. Allocate and setup a trace\n"); fprintf(ofp, " -D, --destroy-trace [NAME] Destroy a trace. Use NAME to identify user-space trace\n"); @@ -119,7 +126,7 @@ static void usage(FILE *ofp) fprintf(ofp, " --stop [NAME] Stop tracing. Use NAME to identify user-space trace\n"); fprintf(ofp, "\n"); fprintf(ofp, "Kernel tracing options:\n"); - fprintf(ofp, " --create-channel Create kernel channel\n"); + fprintf(ofp, " --kern-create-channel Create a kernel channel\n"); fprintf(ofp, "\n"); fprintf(ofp, "User-space tracing options:\n"); fprintf(ofp, "\n");