[lttng-dev] [lttng-ust] duplicated struct ustctl_consumer_channel_attr

Jonathan Rajotte-Julien jonathan.rajotte-julien at efficios.com
Fri May 10 16:31:20 EDT 2019


On Fri, May 10, 2019 at 03:35:38PM -0400, Sebastien Boisvert wrote:
> Hello,
> 
> As suggested by Jonathan [1], I should start a new email thread.
> 
> Why are there 2 identical declarations of struct ustctl_consumer_channel_attr
> (one in lttng-ust, one in lttng-tools) instead of just one ?
> 

If I remember correctly it is to allow scenario where you want to use
lttng-sessiond as a kernel orchestrator only.

./configure --without-lttng-ust

>From src/bin/lttng-sessiond/ust-ctl.h:

/*
 * FIXME: temporary workaround: we use a lttng-tools local version of
 * lttng-ust-abi.h if UST is not found. Eventually, we should use our
 * own internal structures within lttng-tools instead of relying on the
 * UST ABI.
 */
#ifdef HAVE_LIBLTTNG_UST_CTL

#include <lttng/ust-ctl.h>
#include <lttng/ust-abi.h>
#include <lttng/ust-error.h>

int ust_app_release_object(struct ust_app *app, struct lttng_ust_object_data *data);

#else /* HAVE_LIBLTTNG_UST_CTL */

#include "lttng-ust-ctl.h"
#include "lttng-ust-abi.h"
#include "lttng-ust-error.h"

static inline
int ust_app_release_object(struct ust_app *app, struct lttng_ust_object_data *data)
{
	return 0;
}

#endif /* HAVE_LIBLTTNG_UST_CTL */

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS


More information about the lttng-dev mailing list