Port: Add Solaris support to socket compat
[lttng-tools.git] / src / common / mi-lttng.c
index f2d223f86d95878693996e8fadc48a2b2b320515..7662c110619fc214edb6387a7aaa92dfcea6890c 100644 (file)
@@ -78,8 +78,6 @@ const char * const mi_lttng_context_type_perf_thread_counter = "PERF_THREAD_COUN
 const char * const mi_lttng_element_perf_counter_context = "perf_counter_context";
 
 /* Strings related to pid */
-const char * const mi_lttng_element_processes = "processes";
-const char * const mi_lttng_element_process = "process";
 const char * const mi_lttng_element_pid_id = "id";
 
 /* Strings related to save command */
@@ -165,8 +163,6 @@ const char * const mi_lttng_element_snapshot_session_name = "session_name";
 const char * const mi_lttng_element_snapshots = "snapshots";
 
 /* String related to track/untrack command */
-const char * const mi_lttng_element_track_untrack_targets = "targets";
-const char * const mi_lttng_element_track_untrack_pid_target = "pid_target";
 const char * const mi_lttng_element_track_untrack_all_wildcard = "*";
 
 
@@ -398,6 +394,8 @@ const char *mi_lttng_domaintype_string(enum lttng_domain_type value)
                return config_domain_type_jul;
        case LTTNG_DOMAIN_LOG4J:
                return config_domain_type_log4j;
+       case LTTNG_DOMAIN_PYTHON:
+               return config_domain_type_python;
        default:
                /* Should not have an unknown domain */
                assert(0);
@@ -1154,27 +1152,25 @@ int mi_lttng_pids_open(struct mi_writer *writer)
        return mi_lttng_writer_open_element(writer, config_element_pids);
 }
 
+/*
+ * TODO: move the listing of pid for user agent to process semantic on
+ * mi api bump. The use of process element break the mi api.
+ */
 LTTNG_HIDDEN
-int mi_lttng_processes_open(struct mi_writer *writer)
-{
-       return mi_lttng_writer_open_element(writer, mi_lttng_element_processes);
-}
-
-LTTNG_HIDDEN
-int mi_lttng_process(struct mi_writer *writer, pid_t pid , const char *name,
+int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *name,
                int is_open)
 {
        int ret;
 
-       /* Open element process */
-       ret = mi_lttng_writer_open_element(writer, mi_lttng_element_process);
+       /* Open pid process */
+       ret = mi_lttng_writer_open_element(writer, config_element_pid);
        if (ret) {
                goto end;
        }
 
        /* Writing pid number */
        ret = mi_lttng_writer_write_element_signed_int(writer,
-                       config_element_pid, (int)pid);
+                       mi_lttng_element_pid_id, (int)pid);
        if (ret) {
                goto end;
        }
@@ -1201,7 +1197,7 @@ LTTNG_HIDDEN
 int mi_lttng_targets_open(struct mi_writer *writer)
 {
        return mi_lttng_writer_open_element(writer,
-                       mi_lttng_element_track_untrack_targets);
+                       config_element_targets);
 }
 
 LTTNG_HIDDEN
@@ -1210,7 +1206,7 @@ int mi_lttng_pid_target(struct mi_writer *writer, pid_t pid, int is_open)
        int ret;
 
        ret = mi_lttng_writer_open_element(writer,
-                       mi_lttng_element_track_untrack_pid_target);
+                       config_element_target_pid);
        if (ret) {
                goto end;
        }
This page took 0.024388 seconds and 4 git commands to generate.