Fix: libctfcopytrace: replace clock classes in copies
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 2 Feb 2018 21:35:07 +0000 (16:35 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:33 +0000 (18:19 -0400)
commit59d1efc4ca30e0c68df57fdb8ce3b52deabaf151
tree2536ffd89a5df095047221d15a314951cb6c26e1
parentdb3347acf554e4602ae657e9721b95736bfa9c41
Fix: libctfcopytrace: replace clock classes in copies

Issue
=====
Using the functions of libctfcopytrace, some field types are reused as
is in the copied event class/stream class. For example, when we copy a
stream class, we set the copy's packet context field type to the
original packet context field type, without copying it. However, we copy
the clock classes from the original trace to the copy. The result of
this is that the copied packet context field type can contain a mapped
clock class which is not registered to its stream class's trace. This is
considered invalid.

Solution
========
This patch makes those functions systematically copy the all the field
types and then replace the original mapped clock classes to their copy
with replace_clock_classes().

Known drawbacks
===============
None.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/ctf/fs-sink/write.c
plugins/libctfcopytrace/ctfcopytrace.c
plugins/libctfcopytrace/ctfcopytrace.h
plugins/lttng-utils/copy.c
This page took 0.027197 seconds and 4 git commands to generate.