/* Strings related to command */
const char * const mi_lttng_element_command = "command";
-const char * const mi_lttng_element_command_name = "name";
-const char * const mi_lttng_element_command_version = "version";
+const char * const mi_lttng_element_command_action = "snapshot_action";
+const char * const mi_lttng_element_command_add_context = "add-context";
+const char * const mi_lttng_element_command_calibrate = "calibrate";
+const char * const mi_lttng_element_command_create = "create";
+const char * const mi_lttng_element_command_destroy = "destroy";
+const char * const mi_lttng_element_command_disable_channel = "disable-channel";
+const char * const mi_lttng_element_command_disable_event = "disable-event";
+const char * const mi_lttng_element_command_enable_channels = "enable-channel";
const char * const mi_lttng_element_command_enable_event = "enable-event";
const char * const mi_lttng_element_command_list = "list";
-const char * const mi_lttng_element_command_save = "save";
const char * const mi_lttng_element_command_load = "load";
+const char * const mi_lttng_element_command_name = "name";
+const char * const mi_lttng_element_command_output = "output";
+const char * const mi_lttng_element_command_save = "save";
+const char * const mi_lttng_element_command_set_session = "set-session";
+const char * const mi_lttng_element_command_snapshot = "snapshot";
+const char * const mi_lttng_element_command_snapshot_add = "add_snapshot";
+const char * const mi_lttng_element_command_snapshot_del = "del_snapshot";
+const char * const mi_lttng_element_command_snapshot_list = "list_snapshot";
+const char * const mi_lttng_element_command_snapshot_record = "record_snapshot";
const char * const mi_lttng_element_command_start = "start";
const char * const mi_lttng_element_command_stop = "stop";
-const char * const mi_lttng_element_command_create = "create";
-const char * const mi_lttng_element_command_destroy = "destroy";
-const char * const mi_lttng_element_command_calibrate = "calibrate";
-const char * const mi_lttng_element_command_add_context = "add-context";
-const char * const mi_lttng_element_command_enable_channels = "enable-channel";
-const char * const mi_lttng_element_command_set_session = "set-session";
-const char * const mi_lttng_element_command_disable_event = "disable-event";
-const char * const mi_lttng_element_command_disable_channel = "disable-channel";
-const char * const mi_lttng_element_command_action = "snapshot_action";
-const char * const mi_lttng_element_command_output = "output";
const char * const mi_lttng_element_command_success = "success";
+const char * const mi_lttng_element_command_version = "version";
/* Strings related to version command */
const char * const mi_lttng_element_version = "version";
-const char * const mi_lttng_element_version_str = "string";
-const char * const mi_lttng_element_version_web = "url";
-const char * const mi_lttng_element_version_major = "major";
-const char * const mi_lttng_element_version_minor = "minor";
const char * const mi_lttng_element_version_commit = "commit";
+const char * const mi_lttng_element_version_description = "description";
const char * const mi_lttng_element_version_license = "license";
+const char * const mi_lttng_element_version_major = "major";
+const char * const mi_lttng_element_version_minor = "minor";
const char * const mi_lttng_element_version_patch_level = "patchLevel";
-const char * const mi_lttng_element_version_description = "description";
-const char * const mi_lttng_element_command_snapshot = "snapshot";
-const char * const mi_lttng_element_command_list_snapshot = "list_snapshot";
-const char * const mi_lttng_element_command_del_snapshot = "del_snapshot";
-const char * const mi_lttng_element_command_add_snapshot = "add_snapshot";
-const char * const mi_lttng_element_command_record_snapshot = "record_snapshot";
-
-/* Strings related to pid */
-const char * const mi_lttng_element_pids = "pids";
-const char * const mi_lttng_element_pid = "pid";
-
-/* Strings related to save command */
-const char * const mi_lttng_element_save = "save";
-
-/* Strings related to load command */
-const char * const mi_lttng_element_load = "load";
+const char * const mi_lttng_element_version_str = "string";
+const char * const mi_lttng_element_version_web = "url";
/* String related to a lttng_event_field */
const char * const mi_lttng_element_event_field = "event_field";
/* String related to lttng_event_perf_counter_ctx */
const char * const mi_lttng_element_perf_counter_context = "perf_counter_context";
+/* Strings related to pid */
+const char * const mi_lttng_element_pids = "pids";
+const char * const mi_lttng_element_pid = "pid";
+const char * const mi_lttng_element_pid_id = "id";
+
+/* Strings related to save command */
+const char * const mi_lttng_element_save = "save";
+
+/* Strings related to load command */
+const char * const mi_lttng_element_load = "load";
+
/* General elements of mi_lttng */
-const char * const mi_lttng_element_type_other = "OTHER";
-const char * const mi_lttng_element_type_integer = "INTEGER";
+const char * const mi_lttng_element_empty = "";
+const char * const mi_lttng_element_id = "id";
+const char * const mi_lttng_element_nowrite = "nowrite";
+const char * const mi_lttng_element_success = "success";
const char * const mi_lttng_element_type_enum = "ENUM";
const char * const mi_lttng_element_type_float = "FLOAT";
+const char * const mi_lttng_element_type_integer = "INTEGER";
+const char * const mi_lttng_element_type_other = "OTHER";
const char * const mi_lttng_element_type_string = "STRING";
-const char * const mi_lttng_element_nowrite = "nowrite";
-const char * const mi_lttng_element_success = "success";
-const char * const mi_lttng_element_id = "id";
-const char * const mi_lttng_element_empty = "";
/* String related to loglevel */
const char * const mi_lttng_loglevel_str_alert = "TRACE_ALERT";
const char * const mi_lttng_element_calibrate_function = "FUNCTION";
/* String related to a lttng_snapshot_output */
-const char * const mi_lttng_element_snapshots = "snapshots";
-const char * const mi_lttng_element_snapshot_session_name = "session_name";
-const char * const mi_lttng_element_snapshot_n_ptr = "n_ptr";
-const char * const mi_lttng_element_snapshot_data_url = "data_url";
const char * const mi_lttng_element_snapshot_ctrl_url = "ctrl_url";
+const char * const mi_lttng_element_snapshot_data_url = "data_url";
const char * const mi_lttng_element_snapshot_max_size = "max_size";
+const char * const mi_lttng_element_snapshot_n_ptr = "n_ptr";
+const char * const mi_lttng_element_snapshot_session_name = "session_name";
+const char * const mi_lttng_element_snapshots = "snapshots";
const char *mi_lttng_loglevel_string(int value)
{
goto end;
}
- /* event name */
+ /* Event name */
ret = mi_lttng_writer_write_element_string(writer,
config_element_name, event->name);
if (ret) {
goto end;
}
- /* event type */
+ /* Event type */
ret = mi_lttng_writer_write_element_string(writer,
config_element_type, mi_lttng_eventtype_string(event->type));
if (ret) {
goto end;
}
- /* is event enabled */
+ /* Is event enabled */
ret = mi_lttng_writer_write_element_bool(writer,
config_element_enabled, event->enabled);
if (ret) {
goto end;
}
- /* event filter enabled? */
+ /* Event filter enabled? */
ret = mi_lttng_writer_write_element_bool(writer,
config_element_filter, event->filter);
{
int ret;
- /* event loglevel */
+ /* Event loglevel */
ret = mi_lttng_writer_write_element_string(writer,
config_element_loglevel, mi_lttng_loglevel_string(event->loglevel));
if (ret) {
goto end;
}
+ /* Log level type */
ret = mi_lttng_writer_write_element_string(writer,
config_element_loglevel_type,
mi_lttng_logleveltype_string(event->loglevel_type));
int ret;
if (!field->field_name[0]) {
- /* To Review: not sure if legal david ?
- * how should this be handle ?
- */
ret = 0;
goto end;
}
/* 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_action;
-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_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_add_context;
+const char * const mi_lttng_element_command_calibrate;
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_disable_channel;
+const char * const mi_lttng_element_command_disable_event;
const char * const mi_lttng_element_command_enable_channels;
+const char * const mi_lttng_element_command_enable_event;
+const char * const mi_lttng_element_command_list;
+const char * const mi_lttng_element_command_load;
+const char * const mi_lttng_element_command_name;
+const char * const mi_lttng_element_command_output;
+const char * const mi_lttng_element_command_save;
const char * const mi_lttng_element_command_set_session;
-const char * const mi_lttng_element_command_disable_event;
-const char * const mi_lttng_element_command_disable_channel;
const char * const mi_lttng_element_command_snapshot;
-const char * const mi_lttng_element_command_list_snapshot;
-const char * const mi_lttng_element_command_del_snapshot;
-const char * const mi_lttng_element_command_add_snapshot;
-const char * const mi_lttng_element_command_record_snapshot;
-const char * const mi_lttng_element_command_output;
+const char * const mi_lttng_element_command_snapshot_add;
+const char * const mi_lttng_element_command_snapshot_del;
+const char * const mi_lttng_element_command_snapshot_list;
+const char * const mi_lttng_element_command_snapshot_record;
+const char * const mi_lttng_element_command_start;
+const char * const mi_lttng_element_command_stop;
const char * const mi_lttng_element_command_success;
+const char * const mi_lttng_element_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_commit;
+const char * const mi_lttng_element_version_description;
+const char * const mi_lttng_element_version_license;
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_version_str;
+const char * const mi_lttng_element_version_web;
/* String related to a lttng_event_field */
const char * const mi_lttng_element_event_field;
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_empty;
+const char * const mi_lttng_element_id;
+const char * const mi_lttng_element_nowrite;
+const char * const mi_lttng_element_success;
const char * const mi_lttng_element_type_enum;
const char * const mi_lttng_element_type_float;
+const char * const mi_lttng_element_type_integer;
+const char * const mi_lttng_element_type_other;
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_element_calibrate_function;
/* String related to a lttng_snashot */
-const char * const mi_lttng_element_snapshots;
-const char * const mi_lttng_element_snapshot_session_name;
-const char * const mi_lttng_element_snapshot_n_ptr;
-const char * const mi_lttng_element_snapshot_data_url;
const char * const mi_lttng_element_snapshot_ctrl_url;
+const char * const mi_lttng_element_snapshot_data_url;
const char * const mi_lttng_element_snapshot_max_size;
+const char * const mi_lttng_element_snapshot_n_ptr;
+const char * const mi_lttng_element_snapshot_session_name;
+const char * const mi_lttng_element_snapshots;
/* Utility string function */
const char *mi_lttng_loglevel_string(int value);
</xs:choice>
</xs:complexType>
+ <!-- Maps to exclusion type -->
<xs:complexType name="event_exclusion_list_type">
<xs:sequence>
<xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:all>
</xs:complexType>
+ <!-- Maps to an array of event -->
<xs:complexType name="event_list_type">
<xs:sequence>
<xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded" />
</xs:restriction>
</xs:simpleType>
+ <!-- Maps to the type mode of a channel -->
<xs:simpleType name="channel_overwrite_mode_type">
<xs:restriction base="xs:string">
<xs:enumeration value="DISCARD" />
</xs:restriction>
</xs:simpleType>
+ <!-- map to a pid -->
<xs:complexType name="pid_type">
<xs:all>
- <xs:element name="id" type="xs:int"/>
- <xs:element name="name" type="name_type"/>
+ <xs:element name="id" type="xs:int" />
+ <xs:element name="name" type="name_type" />
<xs:element name="events" type="event_list_type" minOccurs="0" />
</xs:all>
</xs:complexType>
+ <!-- maps to an array of pid -->
<xs:complexType name="pids_type">
<xs:sequence>
<xs:element name="pid" type="pid_type" minOccurs="0" maxOccurs="unbounded" />
<!-- Maps to struct lttng_domain and contains channels -->
<xs:complexType name="domain_type">
<xs:all>
- <xs:element name="type" type="domain_type_type"/>
+ <xs:element name="type" type="domain_type_type" />
<xs:element name="buffer_type" type="domain_buffer_type" />
<xs:element name="pids" type="pids_type" minOccurs="0" />
<xs:element name="channels" type="channels_type" minOccurs="0" />
<!-- Maps to struct lttng_channel -->
<xs:complexType name="channel_type">
<xs:all>
- <xs:element name="name" type="name_type"/>
- <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
- <xs:element name="attributes" type="channel_attributes_type" minOccurs="0"/>
- <xs:element name="events" type="event_list_type" minOccurs="0"/>
+ <xs:element name="name" type="name_type" />
+ <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0" />
+ <xs:element name="attributes" type="channel_attributes_type" minOccurs="0" />
+ <xs:element name="events" type="event_list_type" minOccurs="0" />
</xs:all>
</xs:complexType>
<!-- Maps to struct lttng_channel_attr -->
<xs:complexType name="channel_attributes_type">
<xs:all>
- <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
- <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
- <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
- <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
- <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
- <xs:element name="output_type" type="event_output_type"/>
- <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
- <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
- <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
+ <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0" />
+ <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0" /> <!-- bytes -->
+ <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0" />
+ <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
+ <xs:element name="read_timer_interval" type="uint32_type" /> <!-- usec -->
+ <xs:element name="output_type" type="event_output_type" />
+ <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0" /> <!-- bytes -->
+ <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0" />
+ <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0" /> <!-- usec -->
</xs:all>
</xs:complexType>
<xs:element name="max_size" type="uint64_type" minOccurs="0" />
<xs:element name="name" type="name_type" minOccurs="0" />
<xs:element name="session_name" type="name_type" minOccurs="0" />
- <xs:element name="ctrl_url" type="name_type" minOccurs="0"/>
- <xs:element name="data_url" type="name_type" minOccurs="0"/>
+ <xs:element name="ctrl_url" type="name_type" minOccurs="0" />
+ <xs:element name="data_url" type="name_type" minOccurs="0" />
</xs:all>
</xs:complexType>
</xs:sequence>
</xs:complexType>
+ <!-- Maps to a lttng_session -->
<xs:complexType name="session_type">
<xs:all>
<xs:element name="name" type="name_type" />
</xs:all>
</xs:complexType>
+ <!-- Maps to a lttng_event_field -->
<xs:complexType name="event_field_type">
<xs:all>
<xs:element name="name" type="name_type" />
- <xs:element name="type" type="event_field_type_type"/>
- <xs:element name="nowrite" type="xs:int"/>
+ <xs:element name="type" type="event_field_type_type" />
+ <xs:element name="nowrite" type="xs:int" />
</xs:all>
</xs:complexType>
- <!-- map to the save command -->
+ <!-- Map to the save command -->
<xs:complexType name="save_type">
<xs:all>
<xs:element name="session" type="session_type" />
- <xs:element name="path" type="name_type"/>
+ <xs:element name="path" type="name_type" />
</xs:all>
</xs:complexType>
- <!-- map to the load command -->
+ <!-- Map to the load command -->
<xs:complexType name="load_type">
<xs:all>
<xs:element name="session" type="session_type" />
- <xs:element name="path" type="name_type"/>
+ <xs:element name="path" type="name_type" />
</xs:all>
</xs:complexType>
<xs:all>
<xs:element name="type" type="context_type_type" />
<xs:element name="perf_counter_context" type="perf_counter_context_type" minOccurs="0" />
- <!-- The success element is present only for lttng cli command add-context -->
<xs:element name="success" type="xs:boolean" default="false" minOccurs="0" />
</xs:all>
</xs:complexType>
+ <!-- Maps to an array of domain -->
<xs:complexType name="domains_type">
<xs:sequence>
<xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
+ <!-- Maps to an array of session -->
<xs:complexType name="sessions_type">
<xs:sequence>
<xs:element name="session" type="session_type" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
+ <!-- Maps to an array of event_field -->
<xs:complexType name="event_fields_type">
<xs:sequence>
<xs:element name="event_field" type="event_field_type" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
+ <!-- Maps to an array of context -->
<xs:complexType name="contexts_type">
<xs:sequence>
<xs:element name="context" type="context_type" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
+ <!-- Maps to an action dutring snapshot command -->
<xs:complexType name="snapshot_action_type">
<xs:sequence>
<xs:element name="name" type="snapshot_actiontype_type" minOccurs="0" />
<!-- Type of snapshot commands -->
<xs:simpleType name="snapshot_actiontype_type">
<xs:restriction base="xs:string">
- <xs:enumeration value="list-output"/>
- <xs:enumeration value="del-output"/>
- <xs:enumeration value="add-output"/>
- <xs:enumeration value="record-output"/>
+ <xs:enumeration value="list-output" />
+ <xs:enumeration value="del-output" />
+ <xs:enumeration value="add-output" />
+ <xs:enumeration value="record-output" />
</xs:restriction>
</xs:simpleType>