X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-events.h;h=42a7b24bbb35f103e771d8488cf11ffc6273f265;hb=c6a2b846473fa2a196a2bd95e8245ed98b83adba;hp=56f5d3ac2a0670ac2ed4edfbc731e2aa6a8f5a59;hpb=114667d5aa4ec11334787e04a9f90fe9184fc16f;p=lttng-modules.git diff --git a/lttng-events.h b/lttng-events.h index 56f5d3ac..42a7b24b 100644 --- a/lttng-events.h +++ b/lttng-events.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -52,6 +53,7 @@ enum abstract_types { atype_struct, atype_array_compound, /* Array of compound types. */ atype_sequence_compound, /* Sequence of compound types. */ + atype_variant, NR_ABSTRACT_TYPES, }; @@ -67,9 +69,17 @@ enum channel_type { METADATA_CHANNEL, }; +struct lttng_enum_value { + unsigned long long value; + unsigned int signedness:1; +}; + struct lttng_enum_entry { - unsigned long long start, end; /* start and end are inclusive */ + struct lttng_enum_value start, end; /* start and end are inclusive */ const char *string; + struct { + unsigned int is_auto:1; + } options; }; #define __type_integer(_type, _size, _alignment, _signedness, \ @@ -99,7 +109,8 @@ struct lttng_integer_type { union _lttng_basic_type { struct lttng_integer_type integer; struct { - const char *name; + const struct lttng_enum_desc *desc; /* Enumeration mapping */ + struct lttng_integer_type container_type; } enumeration; struct { enum lttng_string_encodings encoding; @@ -139,14 +150,18 @@ struct lttng_type { struct lttng_type *elem_type; const char *length_name; } sequence_compound; + struct { + const char *tag_name; + struct lttng_event_field *choices; /* Array of fields. */ + uint32_t nr_choices; + } variant; } u; }; -struct lttng_enum { +struct lttng_enum_desc { const char *name; - struct lttng_type container_type; const struct lttng_enum_entry *entries; - unsigned int len; + unsigned int nr_entries; }; /* Event field description */ @@ -521,6 +536,7 @@ int lttng_session_enable(struct lttng_session *session); int lttng_session_disable(struct lttng_session *session); void lttng_session_destroy(struct lttng_session *session); int lttng_session_metadata_regenerate(struct lttng_session *session); +int lttng_session_statedump(struct lttng_session *session); void metadata_cache_destroy(struct kref *kref); struct lttng_channel *lttng_channel_create(struct lttng_session *session,