Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (ret)
goto end;
}
+ ret = lttng_metadata_printf(session, "\"");
+ if (ret)
+ goto end;
+
+ if (entry->options.is_auto) {
+ ret = lttng_metadata_printf(session, ",\n");
+ if (ret)
+ goto end;
+ continue;
+ }
+
ret = lttng_metadata_printf(session,
- "\" = ");
+ " = ");
if (ret)
goto end;
if (entry->start.signedness)
struct lttng_enum_entry {
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, \
.string = (_string), \
},
+/* Enumeration entry (automatic value; follows the rules of CTF) */
+#undef ctf_enum_auto
+#define ctf_enum_auto(_string) \
+ { \
+ .start = { \
+ .signedness = -1, \
+ .value = -1, \
+ }, \
+ .end = { \
+ .signedness = -1, \
+ .value = -1, \
+ }, \
+ .string = (_string), \
+ .options = { \
+ .is_auto = 1, \
+ } \
+ },
+
#undef TP_ENUM_VALUES
#define TP_ENUM_VALUES(...) \
__VA_ARGS__