Mi enable-channel command: support and validation
[lttng-tools.git] / src / common / mi-lttng.h
index 2176b09ad76d70e16cd94863dc6dd6aba08af0cf..4b2b035e04a66d1d55c9036103975e3ce90a3612 100644 (file)
@@ -55,6 +55,10 @@ const char * const mi_lttng_element_command_load;
 const char * const mi_lttng_element_command_stop;
 const char * const mi_lttng_element_command_start;
 const char * const mi_lttng_element_command_create;
+const char * const mi_lttng_element_command_destroy;
+const char * const mi_lttng_element_command_calibrate;
+const char * const mi_lttng_element_command_add_context;
+const char * const mi_lttng_element_command_enable_channels;
 const char * const mi_lttng_element_command_output;
 const char * const mi_lttng_element_command_success;
 
@@ -73,6 +77,14 @@ const char * const mi_lttng_element_version_description;
 const char * const mi_lttng_element_event_field;
 const char * const mi_lttng_element_event_fields;
 
+/* String related to lttng_event_context */
+const char * const mi_lttng_context_type_perf_counter;
+const char * const mi_lttng_context_type_perf_cpu_counter;
+const char * const mi_lttng_context_type_perf_thread_counter;
+
+/* String related to lttng_event_perf_counter_ctx */
+const char * const mi_lttng_element_perf_counter_context;
+
 /* Strings related to pid */
 const char * const mi_lttng_element_pids;
 const char * const mi_lttng_element_pid;
@@ -91,6 +103,7 @@ const char * const mi_lttng_element_type_enum;
 const char * const mi_lttng_element_type_float;
 const char * const mi_lttng_element_type_string;
 const char * const mi_lttng_element_nowrite;
+const char * const mi_lttng_element_success;
 
 /* String related to loglevel */
 const char * const mi_lttng_loglevel_str_alert;
@@ -116,12 +129,17 @@ const char * const mi_lttng_loglevel_type_range;
 const char * const mi_lttng_loglevel_type_single;
 const char * const mi_lttng_loglevel_type_unknown;
 
+/* Sting related to lttng_calibrate */
+const char * const mi_lttng_element_calibrate;
+const char * const mi_lttng_element_calibrate_function;
+
 /* Utility string function  */
 const char *mi_lttng_loglevel_string(int value);
 const char *mi_lttng_logleveltype_string(enum lttng_loglevel_type value);
 const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type value);
 const char *mi_lttng_domaintype_string(enum lttng_domain_type value);
 const char *mi_lttng_buffertype_string(enum lttng_buffer_type value);
+const char *mi_lttng_calibratetype_string(enum lttng_calibrate_type val);
 
 /*
  * Create an instance of a machine interface writer.
@@ -476,7 +494,7 @@ int mi_lttng_event_field(struct mi_writer *writer,
  *
  * writer An instance of a machine interface writer.
  *
- * Returns zero if the element's value could be written.
+ * Returns zero if the element could be written.
  * Negative values indicate an error.
  */
 int mi_lttng_event_fields_open(struct mi_writer *writer);
@@ -509,4 +527,48 @@ int mi_lttng_pids_open(struct mi_writer *writer);
 int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *cmdline,
                int is_open);
 
+/*
+ * Machine interface for struct lttng_calibrate.
+ *
+ * writer An instance of a machine interface writer.
+ *
+ * calibrate A lttng_calibrate instance.
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_calibrate(struct mi_writer *writer,
+               struct lttng_calibrate *calibrate);
+
+/*
+ * Machine interface of a context.
+ *
+ * writer An instance of a machine interface writer
+ *
+ * context An instance of a lttng_event_context
+ *
+ * is_open Define if we close the context element
+ *         This should be used carefully and the client
+ *         need to close the context element.
+ *         0-> False
+ *         1-> True
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_context(struct mi_writer *writer,
+               struct lttng_event_context *context, int is_open);
+
+/*
+ * Machine interface of a perf_counter_context.
+ *
+ * writer An instance of a machine interface writer
+ *
+ * contest An instance of a lttng_event_perf_counter_ctx
+ *
+ * Returns zero if the element's value could be written.
+ * Negative values indicate an error.
+ */
+int mi_lttng_perf_counter_context(struct mi_writer *writer,
+               struct lttng_event_perf_counter_ctx  *perf_context);
+
 #endif /* _MI_LTTNG_H */
This page took 0.026082 seconds and 5 git commands to generate.