#define LTTNG_UST_COMM_MAGIC 0xC57C57C5
/* Version for ABI between liblttng-ust, sessiond, consumerd */
-#define LTTNG_UST_ABI_MAJOR_VERSION 6
+#define LTTNG_UST_ABI_MAJOR_VERSION 7
#define LTTNG_UST_ABI_MINOR_VERSION 1
enum lttng_ust_instrumentation {
char padding[USTCTL_UST_ENUM_VALUE_PADDING];
} LTTNG_PACKED;
+enum ustctl_ust_enum_entry_options {
+ USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0,
+};
+
#define USTCTL_UST_ENUM_ENTRY_PADDING 32
struct ustctl_enum_entry {
struct ustctl_enum_value start, end; /* start and end are inclusive */
char string[LTTNG_UST_SYM_NAME_LEN];
- char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+ union {
+ struct {
+ uint32_t options;
+ } LTTNG_PACKED extra;
+ char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+ } u;
} LTTNG_PACKED;
#define USTCTL_UST_BASIC_TYPE_PADDING 296
unsigned int signedness:1;
};
+enum lttng_enum_entry_options {
+ LTTNG_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0,
+};
+
#define LTTNG_UST_ENUM_ENTRY_PADDING 16
struct lttng_enum_entry {
struct lttng_enum_value start, end; /* start and end are inclusive */
const char *string;
- char padding[LTTNG_UST_ENUM_ENTRY_PADDING];
+ union {
+ struct {
+ unsigned int options;
+ } LTTNG_PACKED extra;
+ char padding[LTTNG_UST_ENUM_ENTRY_PADDING];
+ } u;
};
#define __type_integer(_type, _byte_order, _base, _encoding) \
.string = (_string), \
},
+/* Enumeration entry (automatic value; follows the rules of CTF) */
+#undef ctf_enum_auto
+#define ctf_enum_auto(_string) \
+ { \
+ .start = { \
+ .value = -1ULL, \
+ .signedness = 0, \
+ }, \
+ .end = { \
+ .value = -1ULL, \
+ .signedness = 0, \
+ }, \
+ .string = (_string), \
+ .u = { \
+ .extra = { \
+ .options = LTTNG_ENUM_ENTRY_OPTION_IS_AUTO, \
+ }, \
+ }, \
+ },
+
#undef TP_ENUM_VALUES
#define TP_ENUM_VALUES(...) \
__VA_ARGS__
uentry->end.signedness = lentry->end.signedness;
strncpy(uentry->string, lentry->string, LTTNG_UST_SYM_NAME_LEN);
uentry->string[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
+
+ if (lentry->u.extra.options & LTTNG_ENUM_ENTRY_OPTION_IS_AUTO) {
+ uentry->u.extra.options |=
+ USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO;
+ }
}
*_entries = entries;
return 0;