#include <babeltrace/graph/message-packet-internal.h>
#include <babeltrace/graph/message-stream-internal.h>
#include <babeltrace/graph/message-stream-activity-internal.h>
+#include <babeltrace/graph/message-discarded-items-internal.h>
#include <babeltrace/graph/port-internal.h>
#include <babeltrace/plugin/plugin-internal.h>
#include <babeltrace/plugin/plugin-so-internal.h>
return;
}
- BUF_APPEND(", %sassigns-auto-ec-id=%d, %sassigns-auto-stream-id=%d, "
- "%spackets-have-discarded-ev-counter-snapshot=%d, "
- "%spackets-have-packet-counter-snapshot=%d, "
- "%spackets-have-default-begin-cs=%d, "
- "%spackets-have-default-end-cs=%d",
+ BUF_APPEND(", %sassigns-auto-ec-id=%d, %sassigns-auto-stream-id=%d",
PRFIELD(stream_class->assigns_automatic_event_class_id),
- PRFIELD(stream_class->assigns_automatic_stream_id),
- PRFIELD(stream_class->packets_have_discarded_event_counter_snapshot),
- PRFIELD(stream_class->packets_have_packet_counter_snapshot),
- PRFIELD(stream_class->packets_have_default_beginning_cs),
- PRFIELD(stream_class->packets_have_default_end_cs));
+ PRFIELD(stream_class->assigns_automatic_stream_id));
BUF_APPEND(", %strace-class-addr=%p", PRFIELD(trace_class));
SET_TMP_PREFIX("trace-class-");
format_trace_class(buf_ch, false, tmp_prefix, trace_class);
return;
}
- if (packet->default_beginning_cs) {
- SET_TMP_PREFIX("default-begin-cs-");
- format_clock_snapshot(buf_ch, true, tmp_prefix,
- packet->default_beginning_cs);
- }
-
- if (packet->default_end_cs) {
- SET_TMP_PREFIX("default-end-cs-");
- format_clock_snapshot(buf_ch, true, tmp_prefix,
- packet->default_end_cs);
- }
-
- if (packet->discarded_event_counter_snapshot.base.avail) {
- BUF_APPEND(", %sdiscarded-ev-counter-snapshot=%" PRIu64,
- PRFIELD(packet->discarded_event_counter_snapshot.value));
- }
-
- if (packet->packet_counter_snapshot.base.avail) {
- BUF_APPEND(", %spacket-counter-snapshot=%" PRIu64,
- PRFIELD(packet->packet_counter_snapshot.value));
- }
-
BUF_APPEND(", %sstream-addr=%p", PRFIELD(stream));
SET_TMP_PREFIX("stream-");
format_stream(buf_ch, false, tmp_prefix, stream);
}
}
- if (event->default_cs) {
- SET_TMP_PREFIX("default-cs-");
- format_clock_snapshot(buf_ch, true, tmp_prefix,
- event->default_cs);
- }
-
packet = bt_event_borrow_packet_const(event);
if (!packet) {
return;
msg_event->event);
}
+ if (msg_event->default_cs) {
+ SET_TMP_PREFIX("default-cs-");
+ format_clock_snapshot(buf_ch, true, tmp_prefix,
+ msg_event->default_cs);
+ }
+
break;
}
case BT_MESSAGE_TYPE_STREAM_BEGINNING:
msg_packet->packet);
}
+ if (msg_packet->default_cs) {
+ SET_TMP_PREFIX("default-cs-");
+ format_clock_snapshot(buf_ch, true, tmp_prefix,
+ msg_packet->default_cs);
+ }
+
+ break;
+ }
+ case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
+ case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
+ {
+ const struct bt_message_discarded_items *msg_disc_items =
+ (const void *) msg;
+
+ if (msg_disc_items->stream) {
+ SET_TMP_PREFIX("stream-");
+ format_stream(buf_ch, true, tmp_prefix,
+ msg_disc_items->stream);
+ }
+
+ if (msg_disc_items->default_begin_cs) {
+ SET_TMP_PREFIX("default-begin-cs-");
+ format_clock_snapshot(buf_ch, true, tmp_prefix,
+ msg_disc_items->default_begin_cs);
+ }
+
+ if (msg_disc_items->default_end_cs) {
+ SET_TMP_PREFIX("default-end-cs-");
+ format_clock_snapshot(buf_ch, true, tmp_prefix,
+ msg_disc_items->default_end_cs);
+ }
+
+ if (msg_disc_items->count.base.avail) {
+ BUF_APPEND(", %scount=%" PRIu64,
+ PRFIELD(msg_disc_items->count.value));
+ }
+
break;
}
default: