X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Ftrace-ust.h;h=abbf9a9d191a8498f1e714e4435fa4df50acda56;hp=9a236626931f58fbe566cd1b5a3fe301c9a85e2d;hb=3bd1e0819b577ffcb44acd7c2f8e02ff09654b7b;hpb=f84efadf55274918ca038a4e06e0a8af1a320654 diff --git a/ltt-sessiond/trace-ust.h b/ltt-sessiond/trace-ust.h index 9a2366269..abbf9a9d1 100644 --- a/ltt-sessiond/trace-ust.h +++ b/ltt-sessiond/trace-ust.h @@ -19,11 +19,22 @@ #ifndef _LTT_TRACE_UST_H #define _LTT_TRACE_UST_H +#include #include #include - #include -#include + +/* + * 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 CONFIG_CONFIG_LTTNG_TOOLS_HAVE_UST +#include +#else +#include "lttng-ust-abi.h" +#endif /* * UST session list. @@ -77,7 +88,7 @@ struct ltt_ust_metadata { struct ltt_ust_session { int handle; int enabled; - int uconsumer_fds_sent; + int consumer_fds_sent; char path[PATH_MAX]; struct lttng_domain domain; struct ltt_ust_metadata *metadata; @@ -85,6 +96,8 @@ struct ltt_ust_session { struct cds_list_head list; }; +#ifdef CONFIG_LTTNG_TOOLS_HAVE_UST + /* * Lookup functions. NULL is returned if not found. */ @@ -114,4 +127,67 @@ void trace_ust_destroy_metadata(struct ltt_ust_metadata *metadata); void trace_ust_destroy_channel(struct ltt_ust_channel *channel); void trace_ust_destroy_event(struct ltt_ust_event *event); +#else + +static inline +struct ltt_ust_event *trace_ust_get_event_by_name( + char *name, struct ltt_ust_channel *channel) +{ + return NULL; +} +static inline +struct ltt_ust_channel *trace_ust_get_channel_by_name( + char *name, struct ltt_ust_session *session) +{ + return NULL; +} +static inline +struct ltt_ust_session *trace_ust_get_session_by_pid( + struct ltt_ust_session_list *session_list, pid_t pid) +{ + return NULL; +} + +static inline +struct ltt_ust_session *trace_ust_create_session(char *path, pid_t pid, + struct lttng_domain *domain) +{ + return NULL; +} +static inline +struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr, + char *path) +{ + return NULL; +} +static inline +struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev) +{ + return NULL; +} +static inline +struct ltt_ust_metadata *trace_ust_create_metadata(char *path) +{ + return NULL; +} + +static inline +void trace_ust_destroy_session(struct ltt_ust_session *session) +{ +} +static inline +void trace_ust_destroy_metadata(struct ltt_ust_metadata *metadata) +{ +} +static inline +void trace_ust_destroy_channel(struct ltt_ust_channel *channel) +{ +} +static inline +void trace_ust_destroy_event(struct ltt_ust_event *event) +{ +} + +#endif + #endif /* _LTT_TRACE_UST_H */