#undef ctf_array_nowrite
#define ctf_array_nowrite(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, none, 1)
+ _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, _length, none, 1, 10)
#undef ctf_array_text_nowrite
#define ctf_array_text_nowrite(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, UTF8, 1)
+ _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, _length, UTF8, 1, 10)
#undef ctf_sequence_nowrite
#define ctf_sequence_nowrite(_type, _item, _src, _length_type, _src_length) \
#define _ctf_float(_type, _item, _src, _nowrite)
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, \
- _nowrite)
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, _encoding, \
+ _nowrite, _elem_type_base)
#undef _ctf_sequence_encoded
#define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type, \
#undef ctf_array
#define ctf_array(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, none, 0)
+ _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, \
+ _length, none, 0, 10)
+
+#undef ctf_array_hex
+#define ctf_array_hex(_type, _item, _src, _length) \
+ _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, \
+ _length, none, 0, 16)
+
+#undef ctf_array_network
+#define ctf_array_network(_type, _item, _src, _length) \
+ _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN, \
+ _length, none, 0, 10)
+
+#undef ctf_array_network_hex
+#define ctf_array_network_hex(_type, _item, _src, _length) \
+ _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN, \
+ _length, none, 0, 16)
#undef ctf_array_text
#define ctf_array_text(_type, _item, _src, _length) \
- _ctf_array_encoded(_type, _item, _src, _length, UTF8, 0)
+ _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, \
+ _length, UTF8, 0, 10)
#undef ctf_sequence
#define ctf_sequence(_type, _item, _src, _length_type, _src_length) \
},
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, \
+ _length, _encoding, _nowrite, \
+ _elem_type_base) \
{ \
.name = #_item, \
.type = \
{ \
.array = \
{ \
- .elem_type = __type_integer(_type, BYTE_ORDER, 10, _encoding), \
+ .elem_type = __type_integer(_type, _byte_order, _elem_type_base, _encoding), \
.length = _length, \
} \
} \
__event_len += sizeof(_type);
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, _encoding, \
+ _nowrite, _elem_type_base) \
__event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
__event_len += sizeof(_type) * (_length);
}
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, \
+ _encoding, _nowrite, _elem_type_base) \
{ \
unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \
const void *__ctf_tmp_ptr = (_src); \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, \
+ _encoding, _nowrite, _elem_type_base) \
__event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
#undef _ctf_sequence_encoded
}
#undef _ctf_array_encoded
-#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _nowrite) \
+#define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, \
+ _encoding, _nowrite, _elem_type_base) \
lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \
__chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length));
ctf_integer_network(int, netintfield, netint)
ctf_integer_network_hex(int, netintfieldhex, netint)
ctf_array(long, arrfield1, values, 3)
+ ctf_array_hex(long, arrfield1_hex, values, 3)
+ ctf_array_network(long, arrfield1_network, values, 3)
+ ctf_array_network_hex(long, arrfield1_network_hex, values, 3)
ctf_array_text(char, arrfield2, text, 10)
ctf_sequence(char, seqfield1, text,
size_t, textlen)
+ ctf_sequence_hex(char, seqfield1_hex, text,
+ size_t, textlen)
ctf_sequence_text(char, seqfield2, text,
size_t, textlen)
ctf_sequence_network(long, seqfield_network_3, values,