uint32_t version_major; /* LTTng-Tools major version number */
uint32_t version_minor; /* LTTng-Tools minor version number */
uint32_t version_patchlevel; /* LTTng-Tools patchlevel version number */
+ char version_commit[NAME_MAX]; /* Commit hash of the current version */
char version_name[NAME_MAX];
char package_url[NAME_MAX]; /* Define to the home page for this package. */
};
/* Strings related to command */
const char * const mi_lttng_element_command;
+const char * const mi_lttng_element_command_name;
const char * const mi_lttng_element_command_version;
+const char * const mi_lttng_element_command_enable_event;
const char * const mi_lttng_element_command_list;
-const char * const mi_lttng_element_command_name;
+const char * const mi_lttng_element_command_save;
+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;
-/* Strings related to command: version */
+/* Strings related to version command */
const char * const mi_lttng_element_version;
const char * const mi_lttng_element_version_str;
const char * const mi_lttng_element_version_web;
const char * const mi_lttng_element_version_major;
const char * const mi_lttng_element_version_minor;
const char * const mi_lttng_element_version_license;
+const char * const mi_lttng_element_version_commit;
const char * const mi_lttng_element_version_patch_level;
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;
const char * const mi_lttng_element_pid_id;
+/* Strings related to save command */
+const char * const mi_lttng_element_save;
+
+/* Strings related to load command */
+const char * const mi_lttng_element_load;
+
/* General element of mi_lttng */
const char * const mi_lttng_element_type_other;
const char * const mi_lttng_element_type_integer;
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;
const char * const mi_lttng_loglevel_str_unknown;
const char * const mi_lttng_loglevel_str_warning;
+/* String related to loglevel type */
const char * const mi_lttng_loglevel_type_all;
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.
*
* 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);
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 */