X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ustctl%2Fustctl.c;h=48aa758d076519d09103639b3355da602e332e95;hb=72098143aa5d995802b411e152b89ad252dd37ca;hp=50e0d012abff05ff861e0c1f9a9fe4546804975d;hpb=b2fb2f91912b59447459eecc4b41baf8154be1bf;p=ust.git diff --git a/ustctl/ustctl.c b/ustctl/ustctl.c index 50e0d01..48aa758 100644 --- a/ustctl/ustctl.c +++ b/ustctl/ustctl.c @@ -22,8 +22,7 @@ #include #include -#include "ustcomm.h" -#include "ustcmd.h" +#include "ust/ustcmd.h" #include "usterr.h" enum command { @@ -33,6 +32,7 @@ enum command { STOP_TRACE, DESTROY_TRACE, LIST_MARKERS, + LIST_TRACE_EVENTS, ENABLE_MARKER, DISABLE_MARKER, GET_ONLINE_PIDS, @@ -42,6 +42,7 @@ enum command { GET_SUBBUF_NUM, GET_SOCK_PATH, SET_SOCK_PATH, + FORCE_SWITCH, UNKNOWN }; @@ -73,6 +74,8 @@ Commands:\n\ --enable-marker \"CHANNEL/MARKER\"\tEnable a marker\n\ --disable-marker \"CHANNEL/MARKER\"\tDisable a marker\n\ --list-markers\t\t\tList the markers of the process, their\n\t\t\t\t\t state and format string\n\ + --list-trace-events\t\t\tList the trace-events of the process\n\ + --force-switch\t\t\tForce a subbuffer switch\n\ \ "); } @@ -93,6 +96,7 @@ int parse_opts_long(int argc, char **argv, struct ust_opts *opts) { "stop-trace", 0, 0, STOP_TRACE }, { "destroy-trace", 0, 0, DESTROY_TRACE }, { "list-markers", 0, 0, LIST_MARKERS }, + { "list-trace-events", 0, 0, LIST_TRACE_EVENTS}, { "enable-marker", 1, 0, ENABLE_MARKER }, { "disable-marker", 1, 0, DISABLE_MARKER }, { "help", 0, 0, 'h' }, @@ -103,6 +107,7 @@ int parse_opts_long(int argc, char **argv, struct ust_opts *opts) { "get-subbuf-num", 1, 0, GET_SUBBUF_NUM }, { "get-sock-path", 0, 0, GET_SOCK_PATH }, { "set-sock-path", 1, 0, SET_SOCK_PATH }, + { "force-switch", 0, 0, FORCE_SWITCH }, { 0, 0, 0, 0 } }; @@ -145,7 +150,7 @@ int parse_opts_long(int argc, char **argv, struct ust_opts *opts) if (argc - optind > 0 && opts->cmd != GET_ONLINE_PIDS) { int i; int pididx=0; - opts->pids = malloc((argc-optind+1) * sizeof(pid_t)); + opts->pids = zmalloc((argc-optind+1) * sizeof(pid_t)); for(i=optind; i