X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Flib-logging.c;h=91db4a31e4cc43fc504c92243db310cff12e6feb;hb=1e92035335352f8a67cbc3de28a0ad44b7ee02a1;hp=fe72253d7f8eaa9edd42165081454e7e4c078327;hpb=45c51519900e100d9acda4acb9516ef69bc2d045;p=babeltrace.git diff --git a/src/lib/lib-logging.c b/src/lib/lib-logging.c index fe72253d..91db4a31 100644 --- a/src/lib/lib-logging.c +++ b/src/lib/lib-logging.c @@ -39,7 +39,9 @@ #include "assert-pre.h" #include "assert-post.h" #include "value.h" +#include "integer-range-set.h" #include "object-pool.h" +#include "graph/interrupter.h" #include "graph/component-class.h" #include "graph/component-class-sink-colander.h" #include "graph/component-filter.h" @@ -231,7 +233,7 @@ static inline void format_field_class(char **buf_ch, bool extended, } case BT_FIELD_CLASS_TYPE_STATIC_ARRAY: { - const struct bt_field_class_static_array *array_fc = + const struct bt_field_class_array_static *array_fc = (const void *) field_class; format_array_field_class(buf_ch, extended, prefix, field_class); @@ -240,7 +242,7 @@ static inline void format_field_class(char **buf_ch, bool extended, } case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY: { - const struct bt_field_class_dynamic_array *array_fc = + const struct bt_field_class_array_dynamic *array_fc = (const void *) field_class; format_array_field_class(buf_ch, extended, prefix, field_class); @@ -806,6 +808,12 @@ static inline void format_clock_snapshot(char **buf_ch, bool extended, } } +static inline void format_interrupter(char **buf_ch, bool extended, + const char *prefix, const struct bt_interrupter *intr) +{ + BUF_APPEND(", %sis-set=%d", PRFIELD(intr->is_set)); +} + static inline void format_value(char **buf_ch, bool extended, const char *prefix, const struct bt_value *value) { @@ -827,13 +835,13 @@ static inline void format_value(char **buf_ch, bool extended, case BT_VALUE_TYPE_UNSIGNED_INTEGER: { BUF_APPEND(", %svalue=%" PRIu64, - PRFIELD(bt_value_unsigned_integer_get(value))); + PRFIELD(bt_value_integer_unsigned_get(value))); break; } case BT_VALUE_TYPE_SIGNED_INTEGER: { BUF_APPEND(", %svalue=%" PRId64, - PRFIELD(bt_value_signed_integer_get(value))); + PRFIELD(bt_value_integer_signed_get(value))); break; } case BT_VALUE_TYPE_REAL: @@ -871,6 +879,19 @@ static inline void format_value(char **buf_ch, bool extended, } } +static inline void format_integer_range_set(char **buf_ch, bool extended, + const char *prefix, + const struct bt_integer_range_set *range_set) +{ + BUF_APPEND(", %srange-count=%u", PRFIELD(range_set->ranges->len)); + + if (!extended) { + return; + } + + BUF_APPEND(", %sis-frozen=%d", PRFIELD(range_set->frozen)); +} + static inline void format_message(char **buf_ch, bool extended, const char *prefix, const struct bt_message *msg) { @@ -1405,6 +1426,9 @@ static inline void handle_conversion_specifier_bt(void *priv_data, case 'v': format_value(buf_ch, extended, prefix, obj); break; + case 'R': + format_integer_range_set(buf_ch, extended, prefix, obj); + break; case 'n': format_message(buf_ch, extended, prefix, obj); break; @@ -1429,6 +1453,9 @@ static inline void handle_conversion_specifier_bt(void *priv_data, case 'g': format_graph(buf_ch, extended, prefix, obj); break; + case 'z': + format_interrupter(buf_ch, extended, prefix, obj); + break; case 'o': format_object_pool(buf_ch, extended, prefix, obj); break;