extern const char * const mi_lttng_element_perf_counter_context;
/* Strings related to pid */
-extern const char * const mi_lttng_element_pids;
-extern const char * const mi_lttng_element_pid;
extern const char * const mi_lttng_element_pid_id;
/* Strings related to save command */
const char *mi_lttng_buffertype_string(enum lttng_buffer_type value);
const char *mi_lttng_calibratetype_string(enum lttng_calibrate_type val);
+/* String related to track/untrack command */
+const char * const mi_lttng_element_track_untrack_all_wildcard;
+
/*
* Create an instance of a machine interface writer.
*
*/
int mi_lttng_event_fields_open(struct mi_writer *writer);
+/*
+ * Machine interface: open a trackers element.
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_trackers_open(struct mi_writer *writer);
+
+/*
+ * Machine interface: open a pid_tracker element.
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ *
+ * Note: A targets element is also opened for each tracker definition
+ */
+int mi_lttng_pid_tracker_open(struct mi_writer *writer);
+
/*
* Machine interface: open a PIDs element.
*
int mi_lttng_pids_open(struct mi_writer *writer);
/*
- * Machine interface of a PID.
+ * Machine interface: open a processes element.
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_processes_open(struct mi_writer *writer);
+
+/*
+ * Machine interface of a Process.
*
* writer An instance of a machine interface writer.
* pid A PID.
* Returns zero if the element's value could be written.
* Negative values indicate an error.
*/
-int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *cmdline,
+int mi_lttng_process(struct mi_writer *writer, pid_t pid , const char *name,
int is_open);
+/*
+ * TODO: move pid of lttng list -u to process semantic on mi api bump
+ * Machine interface of a Process.
+ *
+ * writer An instance of a machine interface writer.
+ * pid A PID.
+ *
+ * is_open Defines whether or not the session element shall be closed.
+ * This should be used carefully and the client
+ * must close the pid element.
+ * Use case: nested addition information on a domain
+ * ex: channel event.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *name,
+ int is_open);
+/*
+ * Machine interface: open a targets element.
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_targets_open(struct mi_writer *writer);
+
+/*
+ * Machine interface for track/untrack a pid_target
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_pid_target(struct mi_writer *writer, pid_t pid, int is_open);
+
/*
* Machine interface for struct lttng_calibrate.
*