[lttng-dev] lttng-tools 2.6-rc vs. lttng-ust master
Nathan_Lynch at mentor.com
Fri Dec 12 13:36:54 EST 2014
By accident I attempted to build lttng-tools stable-2.6 branch
against current lttng-ust master, and got:
trace-ust.c: In function 'trace_ust_create_event':
trace-ust.c:430:11: error: 'struct lttng_ust_event' has no member named 'disabled'
lue->attr.disabled = 1;
I found the commit below, which seems to indicate that this may be
anticipated/intentional, but I figured I'd raise the issue in case
it's not. Breaking source compatibility with lttng-tools doesn't
seem like a big deal, but does the removal of the 'disabled' field in
lttng-ust/master present a problem for other users of the library?
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date: Wed Nov 12 18:18:32 2014 -0500
Fix: filter attach vs event enable race
In order to correctly handle the use-case where events are enabled
_after_ trace is started, and _after_ applications are already being
traced, the event should be created in a "disabled" state, so that it
does not trace events until its filter is attached.
This fix needs to be done both in lttng-tools and lttng-ust. In order to
keep ABI compatibility between tools and ust within a stable release
cycle, we introduce a new "disabled" within struct lttng_ust_event
padding (previously zeroed). Newer LTTng-UST checks this flag, and
fallback on the old racy behavior (enabling the event on creation) if it
Therefore, old session daemon works with newer lttng-ust of the same
stable release, and vice-versa. However, building lttng-tools requires
an upgraded lttng-ust, which contains the communication protocol with
the new "disabled" field.
This patch should be backported to stable-2.4, stable-2.5, stable-2.6
More information about the lttng-dev