* SOFTWARE.
*/
-#define BT_LOG_TAG "PLUGIN-CTF-FS-SINK-STREAM"
+#define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/STREAM"
#include "logging.h"
#include <babeltrace2/babeltrace.h>
bt_field_array_borrow_element_field_by_index_const(
field, i);
ret = write_field(stream, fc->elem_fc, elem_field);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
if (fc->length_is_before) {
ret = bt_ctfser_write_unsigned_int(&stream->ctfser,
bt_field_array_get_length(field), 8, 32, BYTE_ORDER);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
int ret = 0;
uint64_t i;
- if (likely(align_struct)) {
+ if (G_LIKELY(align_struct)) {
ret = bt_ctfser_align_offset_in_current_packet(&stream->ctfser,
fc->base.alignment);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
fc, i)->fc;
ret = write_field(stream, member_fc, memb_field);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
if (fc->tag_is_before) {
ret = bt_ctfser_write_unsigned_int(&stream->ctfser,
opt_index, 8, 16, BYTE_ORDER);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
/* Event class ID */
ret = bt_ctfser_write_byte_aligned_unsigned_int(&stream->ctfser,
bt_event_class_get_id(ec->ir_ec), 8, 64, BYTE_ORDER);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
BT_ASSERT(cs);
ret = bt_ctfser_write_byte_aligned_unsigned_int(&stream->ctfser,
bt_clock_snapshot_get_value(cs), 8, 64, BYTE_ORDER);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
/* Header */
ret = write_event_header(stream, cs, ec);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
ret = write_struct_field(stream,
(void *) stream->sc->event_common_context_fc,
field, true);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
BT_ASSERT(field);
ret = write_struct_field(stream, (void *) ec->spec_context_fc,
field, true);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}
BT_ASSERT(field);
ret = write_struct_field(stream, (void *) ec->payload_fc,
field, true);
- if (unlikely(ret)) {
+ if (G_UNLIKELY(ret)) {
goto end;
}
}