X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Ftrace-ust.h;h=bb092cae56158d98a10dfc623f15532c4ba80845;hp=35683ebce6b95970694da76d7d74de34be36a8e0;hb=daf282ab93462198c6acd16b4aa624635df1bea5;hpb=74d0b6427faafd5f5d59b7e9d5f78ac52924a7a2 diff --git a/lttng-sessiond/trace-ust.h b/lttng-sessiond/trace-ust.h index 35683ebce..bb092cae5 100644 --- a/lttng-sessiond/trace-ust.h +++ b/lttng-sessiond/trace-ust.h @@ -27,7 +27,7 @@ #include "ust-ctl.h" -#include "../hashtable/rculfhash.h" +#include "../common/hashtable.h" /* UST Stream list */ struct ltt_ust_stream_list { @@ -43,6 +43,7 @@ struct ltt_ust_context { /* UST event */ struct ltt_ust_event { + unsigned int enabled; struct lttng_ust_event attr; struct cds_lfht *ctx; struct cds_lfht_node node; @@ -53,11 +54,13 @@ struct ltt_ust_stream { int handle; char pathname[PATH_MAX]; struct lttng_ust_object_data *obj; - struct cds_lfht_node node; + /* Using a list of streams to keep order. */ + struct cds_list_head list; }; /* UST channel */ struct ltt_ust_channel { + unsigned int enabled; char name[LTTNG_UST_SYM_NAME_LEN]; char pathname[PATH_MAX]; struct lttng_ust_channel attr; @@ -96,9 +99,8 @@ struct ltt_ust_domain_exec { /* UST session */ struct ltt_ust_session { - int uid; /* Unique identifier of session */ - int consumer_fds_sent; - int consumer_fd; + int id; /* Unique identifier of session */ + int start_trace; char pathname[PATH_MAX]; struct ltt_ust_domain_global domain_global; /* @@ -108,6 +110,9 @@ struct ltt_ust_session { */ struct cds_lfht *domain_pid; struct cds_lfht *domain_exec; + /* UID/GID of the user owning the session */ + uid_t uid; + gid_t gid; }; #ifdef HAVE_LIBLTTNG_UST_CTL @@ -123,12 +128,14 @@ struct ltt_ust_channel *trace_ust_find_channel_by_name(struct cds_lfht *ht, /* * Create functions malloc() the data structure. */ -struct ltt_ust_session *trace_ust_create_session(char *path, unsigned int uid, +struct ltt_ust_session *trace_ust_create_session(char *path, int session_id, struct lttng_domain *domain); struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr, char *path); struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev); struct ltt_ust_metadata *trace_ust_create_metadata(char *path); +struct ltt_ust_context *trace_ust_create_context( + struct lttng_event_context *ctx); /* * Destroy functions free() the data structure and remove from linked list if @@ -197,6 +204,12 @@ static inline void trace_ust_destroy_event(struct ltt_ust_event *event) { } +static inline +struct ltt_ust_context *trace_ust_create_context( + struct lttng_event_context *ctx) +{ + return NULL; +} #endif /* HAVE_LIBLTTNG_UST_CTL */