relayd: share the same output directory handle accross sessions
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 Dec 2019 06:41:37 +0000 (01:41 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
commit7ceefac4c8474606312e25ab822e510c41a3d644
treeaf9c3f578b159846f160f0fca3b3522ca01a5b6f
parent53eb691c0c1d42e5b3f70697d8295ca4014e1dbc
relayd: share the same output directory handle accross sessions

Now that lttng_directory_handles are reference counted, they can be
shared by multiple sessions and trace chunks.  These modifications
cause sessions that share a trace chunk to share their session output
directory handle.

Moreover, the session output directory handle is now created on
session creation. Hence, a directory handle (fd) is not created
everytime a trace chunk is created.

The goal of this modification is to make it easier to track file
descriptors in the relay daemon, but it is also more efficient
overall (less opening of file descriptors) and will error-out during
the creation of a session rather than a trace chunk which is handled
more gracefully accross the toolchain.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I47e46ee253db646da1490380612def741c2f4102
src/bin/lttng-relayd/main.c
src/bin/lttng-relayd/session.c
src/bin/lttng-relayd/session.h
src/common/trace-chunk.c
src/common/trace-chunk.h
This page took 0.02528 seconds and 4 git commands to generate.