Add --create-trace option to ustctl
[ust.git] / libustcmd / ustcmd.c
index 49b76f541af9f5c8bd883093d117f4c7e8b4d09d..d22fb5236f4b01f707a554c313216f4e84cfeec2 100644 (file)
@@ -111,7 +111,7 @@ int ustcmd_destroy_trace(pid_t pid)
 {
        int result;
 
-       result = ustcmd_send_cmd("destroy", pid, NULL);
+       result = ustcmd_send_cmd("trace_destroy", pid, NULL);
        if (result) {
                return USTCMD_ERR_GEN;
        }
@@ -137,6 +137,24 @@ int ustcmd_setup_and_start(pid_t pid)
        return 0;
 }
 
+/**
+ * Creates an UST trace according to a PID.
+ *
+ * @param pid  Traced process ID
+ * @return     0 if successful, or error USTCMD_ERR_GEN
+ */
+int ustcmd_create_trace(pid_t pid)
+{
+       int result;
+
+       result = ustcmd_send_cmd("trace_create", pid, NULL);
+       if (result) {
+               return USTCMD_ERR_GEN;
+       }
+
+       return 0;
+}
+
 /**
  * Starts an UST trace according to a PID.
  *
This page took 0.022292 seconds and 4 git commands to generate.