Fix: sessiond: don't allocate buffers and files for inactive sessions
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Nov 2018 21:13:58 +0000 (16:13 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Dec 2018 21:02:47 +0000 (16:02 -0500)
commit60235eb8831f13eae9b8d323acb6179ce598c688
treef127c828e001d58f436baad60d09f81b97711b98
parent1053a2738df351b0901f87b9ae76ef2fd94ba611
Fix: sessiond: don't allocate buffers and files for inactive sessions

When tracing is inactive (before start/after stop), the current behavior
is to track all applications registered as UST data producers and
allocate buffers and files.

However, we guarantee that the trace is readable (invariant) after a
"stop" command has waited for data pending to complete. Unfortunately,
tracking additional applications (and adding their files) after tracing
is stopped (for each pid in per-pid buffers, for new uid in per-uid
buffers) does not respect this guarantee.

Fix this by *not* allocating channels, events, contexts when tracing
is inactive, but rather allocate those lazily just before tracing
starts.

One reason why this was not originally done was to ensure we could
have a fast start command. There are however other ways to achieve this
in the future that will respect the stop invariant guarantees.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c
This page took 0.025739 seconds and 4 git commands to generate.