Fix: libctfcopytrace: replace clock classes in copies
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 2 Feb 2018 21:35:07 +0000 (16:35 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 03:32:03 +0000 (23:32 -0400)
commit4a2fffdb3c120ac5f16d4308b2da375fbe9def20
tree4cc35b7db9920304a7ac208e8d013f6b1b2da004
parent93dda9014cf4c4f5365a6af73594a543ec642cb9
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.025301 seconds and 4 git commands to generate.