From: David Goulet Date: Mon, 21 Jan 2013 20:20:52 +0000 (-0500) Subject: Rename ltt_ust_stream to ust_app_stream X-Git-Tag: v2.2.0-rc1~101 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=030a66fa43d2f6666afa9e4a90ca755eb5670555;p=lttng-tools.git Rename ltt_ust_stream to ust_app_stream This data structure only have sense on the application registry side. The tracing registry does not directly handle stream anymore. This patch also move it from trace-ust.h to ust-app.h. No code was changed nor any behaviors altered. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/trace-ust.h b/src/bin/lttng-sessiond/trace-ust.h index 4004f9af2..ab8fbe105 100644 --- a/src/bin/lttng-sessiond/trace-ust.h +++ b/src/bin/lttng-sessiond/trace-ust.h @@ -35,12 +35,6 @@ struct ltt_ust_ht_key { enum lttng_ust_loglevel_type loglevel; }; -/* UST Stream list */ -struct ltt_ust_stream_list { - unsigned int count; - struct cds_list_head head; -}; - /* Context hash table nodes */ struct ltt_ust_context { struct lttng_ust_context ctx; @@ -55,17 +49,6 @@ struct ltt_ust_event { struct lttng_ust_filter_bytecode *filter; }; -/* UST stream */ -struct ltt_ust_stream { - int handle; - char pathname[PATH_MAX]; - /* Format is %s_%d respectively channel name and CPU number. */ - char name[DEFAULT_STREAM_NAME_LEN]; - struct lttng_ust_object_data *obj; - /* Using a list of streams to keep order. */ - struct cds_list_head list; -}; - /* UST channel */ struct ltt_ust_channel { unsigned int enabled; diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 374360e48..397a2dfab 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -155,7 +155,7 @@ void delete_ust_app_event(int sock, struct ust_app_event *ua_event) * this function. */ static -void delete_ust_app_stream(int sock, struct ltt_ust_stream *stream) +void delete_ust_app_stream(int sock, struct ust_app_stream *stream) { if (stream->obj) { ustctl_release_object(sock, stream->obj); @@ -176,7 +176,7 @@ void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan) struct lttng_ht_iter iter; struct ust_app_event *ua_event; struct ust_app_ctx *ua_ctx; - struct ltt_ust_stream *stream, *stmp; + struct ust_app_stream *stream, *stmp; /* Wipe stream */ cds_list_for_each_entry_safe(stream, stmp, &ua_chan->streams.head, list) { @@ -757,7 +757,7 @@ error: * On error, return a negative value. */ static int create_ust_stream(struct ust_app *app, - struct ust_app_channel *ua_chan, struct ltt_ust_stream *stream) + struct ust_app_channel *ua_chan, struct ust_app_stream *stream) { int ret; @@ -2314,7 +2314,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app) struct lttng_ht_iter iter; struct ust_app_session *ua_sess; struct ust_app_channel *ua_chan; - struct ltt_ust_stream *ustream; + struct ust_app_stream *ustream; struct consumer_socket *socket; DBG("Starting tracing for ust app pid %d", app->pid); diff --git a/src/bin/lttng-sessiond/ust-app.h b/src/bin/lttng-sessiond/ust-app.h index 8c23c319d..d4ed5a6f8 100644 --- a/src/bin/lttng-sessiond/ust-app.h +++ b/src/bin/lttng-sessiond/ust-app.h @@ -65,6 +65,12 @@ struct lttng_ht *ust_app_ht; */ struct lttng_ht *ust_app_ht_by_sock; +/* Stream list containing ust_app_stream. */ +struct ust_app_stream_list { + unsigned int count; + struct cds_list_head head; +}; + struct ust_app_ctx { int handle; struct lttng_ust_context ctx; @@ -82,13 +88,23 @@ struct ust_app_event { struct lttng_ust_filter_bytecode *filter; }; +struct ust_app_stream { + int handle; + char pathname[PATH_MAX]; + /* Format is %s_%d respectively channel name and CPU number. */ + char name[DEFAULT_STREAM_NAME_LEN]; + struct lttng_ust_object_data *obj; + /* Using a list of streams to keep order. */ + struct cds_list_head list; +}; + struct ust_app_channel { int enabled; int handle; char name[LTTNG_UST_SYM_NAME_LEN]; struct lttng_ust_channel attr; struct lttng_ust_object_data *obj; - struct ltt_ust_stream_list streams; + struct ust_app_stream_list streams; struct lttng_ht *ctx; struct lttng_ht *events; struct lttng_ht_node_str node; diff --git a/src/bin/lttng-sessiond/ust-consumer.c b/src/bin/lttng-sessiond/ust-consumer.c index e804f4b5a..ffa642937 100644 --- a/src/bin/lttng-sessiond/ust-consumer.c +++ b/src/bin/lttng-sessiond/ust-consumer.c @@ -83,7 +83,7 @@ error: */ static int send_channel_stream(struct consumer_socket *sock, struct ust_app_channel *uchan, struct ust_app_session *usess, - struct ltt_ust_stream *stream, struct consumer_output *consumer, + struct ust_app_stream *stream, struct consumer_output *consumer, const char *pathname) { int ret, fds[2]; @@ -140,7 +140,7 @@ static int send_channel_streams(struct consumer_socket *sock, int ret; char tmp_path[PATH_MAX]; const char *pathname; - struct ltt_ust_stream *stream, *tmp; + struct ust_app_stream *stream, *tmp; assert(sock);