LTTNG_ERR_TRACE_ALREADY_STOPPED = 81, /* Tracing already stopped */
LTTNG_ERR_KERN_EVENT_ENOSYS = 82, /* Kernel event type not supported */
/* 83 */
- /* 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 consumer_socket *socket, int send_zero_data);
void ust_app_destroy(struct ust_app *app);
+static inline
+int ust_app_supported(void)
+{
+ return 1;
+}
+
#else /* HAVE_LIBLTTNG_UST_CTL */
static inline
return;
}
+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",