sequence and variant types: use previous field for length/tag if NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Apr 2021 00:29:27 +0000 (20:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Apr 2021 17:52:51 +0000 (13:52 -0400)
commit51ef453614a6db2b778595b16d93283d25db974a
tree9f3348a393be1dffe50fe16ea272b31c21de10ad
parent2ad5a97975410b92bfa7ad43f9d639b40c52446f
sequence and variant types: use previous field for length/tag if NULL

A common use-case for sequences and variants is to use the field located
immediately prior to the type as length/tag.

The fact that those types need to explicitly contain their length/tag
name ties the sequence/variant type to where it is placed within the
structure fields, preventing re-use of the sequence/variant type.

In order to reduce the memory footprint of the field descriptions and
allow re-use of common field types, special-case the NULL length name
and tag name to use the field prior to the sequence/variant as length.

This allows more efficient type descriptions without reducing the
overall flexibility of sequence/variant layout.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I27053e8541beb4f8f8226e411c71595f7527f533
include/instrumentation/events/net.h
include/instrumentation/syscalls/headers/syscalls_pointers_override.h
include/lttng/events.h
include/lttng/tracepoint-event-impl.h
src/lttng-context-callstack.c
src/lttng-events.c
This page took 0.026582 seconds and 4 git commands to generate.