Fix: sync event enablers before choosing header type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 Oct 2018 19:48:16 +0000 (15:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 Oct 2018 21:06:12 +0000 (17:06 -0400)
commit3ff7660f2ce6362de87a48bc45c9a98b9c785472
treed428a3d7601e048bef17f21100feaad2a55f8a89
parent9f1f640062354364e282f7d18f0e2b0b6eb4a9b7
Fix: sync event enablers before choosing header type

On session start, we should allocate the event IDs before figuring
out the number of events per channel and select the proper header
type.

Without this, the number of events is always perceived to be 0,
which selects the "compact" header type.

With UST, the order of those two actions is not the only one
affecting the chosen header type: UST can receive the session
start command before all probe provider library constructors
have completed running, therefore finding less events than
eventually enabled within the process. Moreover, with per-uid
buffers, many processes end up registering events into shared
buffers. Therefore, the guess based on number of events from
the first process to use the buffer is incorrect.

Considering that we typically have applications with more than
30 events, we will modify the session daemon so it selects the
"large" header type independently of the number of events.

We still want to swap the order of the enablers sync vs header
type getter because we may revisit how session enabling is done
in a process wrt constructor completion, which may allow us to
do a more precise choice for per-pid buffers in the future.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-events.c
This page took 0.028203 seconds and 4 git commands to generate.