Fix: Ensure stream endianness is set when initializing event class
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 13 Mar 2015 05:09:20 +0000 (01:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 13 Mar 2015 05:17:44 +0000 (01:17 -0400)
commit5ca83563b477b7e35d96631dedcdff9e050e2a38
tree19d9d59d35100d814b392816301d134ff4571c88
parent0e45d3083900e5a33e1ab6a08dce546a9269f932
Fix: Ensure stream endianness is set when initializing event class

This fixes a problem encountered by perf-to-ctf which would cause
an assert to hit whenever an event was instanciated before its
stream class was added to the trace.

This would cause the stream class to set its events' "native"
byte order with the "unknown endianness" value.

This modification ensures that an event's native endianness is
either set on addition to a stream class (when the stream is
already paired to a trace) or when the stream is added to a
trace.

Reported-by: Wang Nan <wangnan0@huawei.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/stream-class.c
formats/ctf/ir/trace.c
include/babeltrace/ctf-ir/stream-class-internal.h
This page took 0.024912 seconds and 4 git commands to generate.