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)
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>

No differences found
This page took 0.024553 seconds and 4 git commands to generate.