CTF writer: restore native byte order is the CPU's native byte order
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 3 Apr 2017 22:05:19 +0000 (18:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:40 +0000 (12:57 -0400)
commit3f5808e584c030d29db447ecffd42496d09b85fb
treef6960ca5a7edb4360a6153366a08918509738d2e
parent391c8f0d0c4232a94f64a8ca0bc9590c5545388c
CTF writer: restore native byte order is the CPU's native byte order

To remain compatible with the first experiments of CTF writer, let's
restore this legacy behaviour in which a native byte order means the
native byte order of the CPU running the Babeltrace library.

This only applies to bt_ctf_writer_set_byte_order() when you pass
BT_CTF_BYTE_ORDER_NATIVE: bt_ctf_trace_set_native_byte_order() does
not accept BT_CTF_BYTE_ORDER_NATIVE. Thus, when you create a CTF writer
object with bt_ctf_writer_create(), it sets its trace's native byte
order to the CPU's native byte order.

perf is a CTF writer user known to not call
bt_ctf_writer_set_byte_order() manually: in this case the CTF IR trace
would be invalid because its native byte order would still be set to
BT_CTF_BYTE_ORDER_NATIVE.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/endian.h
lib/ctf-writer/serialize.c
lib/ctf-writer/writer.c
This page took 0.024633 seconds and 4 git commands to generate.