LTTNG_ERR_TRACE_ALREADY_STOPPED = 81, /* Tracing already stopped */
LTTNG_ERR_KERN_EVENT_ENOSYS = 82, /* Kernel event type not supported */
LTTNG_ERR_NEED_CHANNEL_NAME = 83, /* Non-default channel exists within session: channel name needs to be specified with '-c name' */
- /* 84 */
+ LTTNG_ERR_NO_UST = 84, /* LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled. */
/* 85 */
/* 86 */
/* 87 */
break;
case LTTNG_DOMAIN_UST:
{
+ if (!ust_app_supported()) {
+ ret = LTTNG_ERR_NO_UST;
+ goto error;
+ }
/* Consumer is in an ERROR state. Report back to client */
if (uatomic_read(&ust_consumerd_state) == CONSUMER_ERROR) {
ret = LTTNG_ERR_NO_USTCONSUMERD;
struct snapshot_output *output, int wait, unsigned int nb_streams);
unsigned int ust_app_get_nb_stream(struct ltt_ust_session *usess);
+static inline
+int ust_app_supported(void)
+{
+ return 1;
+}
+
#else /* HAVE_LIBLTTNG_UST_CTL */
static inline
return 0;
}
+static inline
+int ust_app_supported(void)
+{
+ return 0;
+}
+
#endif /* HAVE_LIBLTTNG_UST_CTL */
#endif /* _LTT_UST_APP_H */
[ ERROR_INDEX(LTTNG_ERR_UST_CONTEXT_EXIST)] = "UST context already exist",
[ ERROR_INDEX(LTTNG_ERR_UST_CONTEXT_INVAL)] = "UST invalid context",
[ ERROR_INDEX(LTTNG_ERR_NEED_ROOT_SESSIOND) ] = "Tracing the kernel requires a root lttng-sessiond daemon, as well as \"tracing\" group membership or root user ID for the lttng client.",
+ [ ERROR_INDEX(LTTNG_ERR_NO_UST) ] = "LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.",
[ ERROR_INDEX(LTTNG_ERR_TRACE_ALREADY_STARTED) ] = "Tracing already started",
[ ERROR_INDEX(LTTNG_ERR_TRACE_ALREADY_STOPPED) ] = "Tracing already stopped",
[ ERROR_INDEX(LTTNG_ERR_KERN_EVENT_ENOSYS) ] = "Kernel event type not supported",