sequence type: use previous field for length if length_name is NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 12 Apr 2021 18:04:36 +0000 (14:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Apr 2021 00:13:00 +0000 (20:13 -0400)
commit28db08270297a0e0654ce359069954bdc6c904f1
tree0915b1705434022010c220403be6b293369ca0f3
parent8812e921083147264ac4a299748ca6d4077e5233
sequence type: use previous field for length if length_name is NULL

A common use-case for sequences is to use the field located immediately
prior to the sequence as sequence length.

The fact that the sequence type needs to explicitly contain its length
name ties the sequence type to where it is placed within the structure
fields, preventing re-use of the sequence 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 to
use the field prior to the sequence as length.

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

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5f2ae22ecc4d872d56f9302751990452fc34cb15
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
src/common/ustcomm.c
This page took 0.024924 seconds and 4 git commands to generate.