Consumer: strip ring buffer header when consuming ctf2 ring buffer packet
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 17 Jun 2022 21:34:46 +0000 (17:34 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 19 Aug 2022 15:54:53 +0000 (11:54 -0400)
commit158776a9795f1678c60bb868b5b8267886e8da78
tree922f89893a23041c3af59a8a7596645923c0b560
parent8696b40b84aefe0800e9e5facb461ef4ad0fd370
Consumer: strip ring buffer header when consuming ctf2 ring buffer packet

On the kernel tracer side, providing a header free packet would be quite
intrusive in term of ABI/API modification. Thus for now, the kernel
tracers keeps the notion of header. On the consumer side, we can drop
the header as necessary based on the format we expect or we could even
inspect the header if necessary. For now, we chose to trust the
configured format for the session since we have access to the
information.

On the userspace side, historically the usage of a "ring buffer" for the
metadata was somewhat driven by the ctf1 "requirement" of providing
header for a given metadata packet. Essentially in ctf1 the ring buffer
packet "metadata" leaks into the actual ctf1 spec. It also happened that
the same machinery could then be reused for both the kernelspace and
userspace metadata ingestions.

CTF2 drop all this so could lttng-tools! But, considering that ctf1
still need to be supported for a while and that we still need to have
all the machinery for consuming from the kernelspace metadata
ringbuffer, keeping the current data path for both userspace and
kernelspace for metadata is probably a safer bet.

The only "drawback" here is that headers for the userspace metadata
ringbuffer contain version fields that will be equivalent to 1.8 despite
the fact that it contains ctf2 metadata. This is because the version is
currently hard coded by lttng-ust into the metadata packet headers.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I761c8a7d9742cbc9c875767233f2d30a43b9743f
src/common/consumer/consumer-stream.cpp
src/common/consumer/consumer.hpp
This page took 0.026728 seconds and 5 git commands to generate.