#include <glib.h>
#include <babeltrace/common-internal.h>
#include <babeltrace/lib-logging-internal.h>
-#include <babeltrace/ref-internal.h>
#include <babeltrace/values-internal.h>
#include <babeltrace/object-pool-internal.h>
#include <babeltrace/ctf-ir/field-types-internal.h>
static inline void format_connection(char **buf_ch, bool extended,
const char *prefix, struct bt_connection *connection);
-static inline void format_ref_count(char **buf_ch, bool extended,
+static inline void format_object(char **buf_ch, bool extended,
const char *prefix, struct bt_object *obj)
{
- BUF_APPEND(", %sref-count=%lu", prefix, obj->ref_count.count);
+ BUF_APPEND(", %sref-count=%llu", prefix, obj->ref_count);
}
static inline void format_object_pool(char **buf_ch, bool extended,
struct bt_field_common_string *str =
BT_FROM_COMMON(field);
- if (str->payload) {
- BT_ASSERT(str->payload);
+ if (str->buf) {
+ BT_ASSERT(str->buf->data);
BUF_APPEND(", %spartial-value=\"%.32s\"",
- PRFIELD(str->payload->str));
+ PRFIELD(str->buf->data));
}
break;
return;
}
- trace = (void *) bt_object_borrow_parent(stream);
+ trace = (void *) bt_object_borrow_parent(&stream->base);
if (!trace) {
return;
}
BUF_APPEND(", %sstream-addr=%p", PRFIELD(stream));
SET_TMP_PREFIX("stream-");
format_stream(buf_ch, false, tmp_prefix, stream);
- trace = (struct bt_trace *) bt_object_borrow_parent(stream);
+ trace = (struct bt_trace *) bt_object_borrow_parent(&stream->common.base);
if (!trace) {
return;
}
SET_TMP_PREFIX("colander-comp-");
format_component(buf_ch, false, tmp_prefix,
iter_output_port->colander);
- SET_TMP_PREFIX("output-port-");
- format_port(buf_ch, false, tmp_prefix,
- iter_output_port->output_port);
break;
}
default:
switch (cat) {
case CAT_DEFAULT:
switch (*fmt_ch) {
- case 'r':
- format_ref_count(buf_ch, extended, prefix, obj);
- break;
case 'F':
format_field_type(buf_ch, extended, prefix, obj);
break;
case 'o':
format_object_pool(buf_ch, extended, prefix, obj);
break;
+ case 'O':
+ format_object(buf_ch, extended, prefix, obj);
+ break;
default:
abort();
}