sessiond: prepare client replies through an lttng_payload
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 16 Jun 2020 04:14:13 +0000 (00:14 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jul 2020 20:30:53 +0000 (16:30 -0400)
commit3a91de3ac8a651db110efe1214181d75b036b141
tree5786685a75962e1af6aab49128bf1b42b03179ae
parent0d163d5645d20f80a06b4c8d893e6d00036a6235
sessiond: prepare client replies through an lttng_payload

Modify the command context structure to contain an lttng_payload. This
allows commands to return a payload which contains a file descriptor
without accessing the socket directly.

An interesting side-benefit is that, in practice, this eliminates all
dynamic allocations from the client communications beyond the first
command served. The command context is re-used and the reply buffer is
allocated once and not released (only its size is reset to 0).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id37b300648db8a9ebec7522e24c70e377c29cddc
src/bin/lttng-sessiond/client.c
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/lttng-sessiond.h
This page took 0.033488 seconds and 4 git commands to generate.