From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Thu, 18 Apr 2019 15:50:17 -0400 (EDT) Subject: [lttng-dev] [RFC PATCH lttng-tools 16/18] Add serialized versions of lttng_event structs In-Reply-To: <20190418161850.1536-17-ylamarre@efficios.com> References: <20190418161850.1536-1-ylamarre@efficios.com> <20190418161850.1536-17-ylamarre@efficios.com> Message-ID: <23293796.1621.1555617017184.JavaMail.zimbra@efficios.com> ----- On Apr 18, 2019, at 12:18 PM, Yannick Lamarre ylamarre at efficios.com wrote: > Serialized version of lttng_snapshot_output is a packed structure to be > used in communication protocols for consistent size across platforms. > The serialized version is stripped of pointers and padding. > > Pointers are removed since their size can vary on platforms supporting > variable sized registers (x86-64). > Padding is also removed since it defeats the purpose of a packed struct. Same questions about explanation of "variable sized registers" and how we extend without padding as prior commits. Thanks, Mathieu > > Signed-off-by: Yannick Lamarre > --- > include/lttng/snapshot-internal.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/lttng/snapshot-internal.h > b/include/lttng/snapshot-internal.h > index b7391c22..bf9dfbe4 100644 > --- a/include/lttng/snapshot-internal.h > +++ b/include/lttng/snapshot-internal.h > @@ -45,6 +45,14 @@ struct lttng_snapshot_output { > char data_url[PATH_MAX]; > }; > > +struct lttng_snapshot_output_serialized { > + uint32_t id; > + uint64_t max_size; > + char name[LTTNG_NAME_MAX]; > + char ctrl_url[PATH_MAX]; > + char data_url[PATH_MAX]; > +} LTTNG_PACKED; > + > /* > * Snapshot output list object opaque to the user. > */ > -- > 2.11.0 > > _______________________________________________ > lttng-dev mailing list > lttng-dev at lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com