Add ust stop trace feature
[lttng-tools.git] / liblttngctl / liblttngctl.c
index 64764682ba18f6fe124900c4283cf74d8f58aaee..bd02a13b2c451fad17d6b0612472bba7b5652023 100644 (file)
@@ -182,6 +182,21 @@ int lttng_ust_start_trace(pid_t pid)
        return ret;
 }
 
+/*
+ *  lttng_ust_stop_trace
+ *
+ *  Request a trace stop for pid.
+ */
+int lttng_ust_stop_trace(pid_t pid)
+{
+       int ret;
+
+       lsm.pid = pid;
+       ret = ask_sessiond(UST_STOP_TRACE, NULL);
+
+       return ret;
+}
+
 /*
  *  lttng_ust_create_trace
  *
@@ -218,6 +233,28 @@ int lttng_ust_list_apps(pid_t **pids)
        return ret / sizeof(pid_t);
 }
 
+/*
+ *  lttng_list_traces
+ *
+ *  Ask the session daemon for all traces (kernel and ust)
+ *  for the session identified by uuid.
+ *
+ *  Return the number of traces.
+ */
+int lttng_list_traces(uuid_t *uuid, struct lttng_trace **traces)
+{
+       int ret;
+
+       uuid_copy(lsm.session_id, *uuid);
+
+       ret = ask_sessiond(LTTNG_LIST_TRACES, (void **) traces);
+       if (ret < 0) {
+               return ret;
+       }
+
+       return ret / sizeof(struct lttng_trace);
+}
+
 /*
  *  lttng_create_session
  *
This page took 0.028779 seconds and 4 git commands to generate.