From: Mathieu Desnoyers Date: Wed, 2 Nov 2011 17:26:06 +0000 (-0400) Subject: rename object_data to lttng_ust_object_data X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=61f02aea2c4336e2789e2dc97380835b17e5a427;p=ust.git rename object_data to lttng_ust_object_data Signed-off-by: Mathieu Desnoyers --- diff --git a/include/ust/lttng-ust-ctl.h b/include/ust/lttng-ust-ctl.h index ef5aa67..c37aa00 100644 --- a/include/ust/lttng-ust-ctl.h +++ b/include/ust/lttng-ust-ctl.h @@ -34,7 +34,7 @@ struct lttng_ust_channel_attr { enum lttng_ust_output output; /* splice, mmap */ }; -struct object_data { +struct lttng_ust_object_data { int handle; int shm_fd; int wait_fd; @@ -45,21 +45,21 @@ int ustctl_register_done(int sock); int ustctl_create_session(int sock); int ustctl_open_metadata(int sock, int session_handle, struct lttng_ust_channel_attr *chops, - struct object_data **metadata_data); + struct lttng_ust_object_data **metadata_data); int ustctl_create_channel(int sock, int session_handle, struct lttng_ust_channel_attr *chops, - struct object_data **channel_data); -int ustctl_create_stream(int sock, struct object_data *channel_data, - struct object_data **stream_data); + struct lttng_ust_object_data **channel_data); +int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data, + struct lttng_ust_object_data **stream_data); int ustctl_create_event(int sock, struct lttng_ust_event *ev, - struct object_data *channel_data, - struct object_data **event_data); + struct lttng_ust_object_data *channel_data, + struct lttng_ust_object_data **event_data); int ustctl_add_context(int sock, struct lttng_ust_context *ctx, - struct object_data *obj_data, - struct object_data **context_data); + struct lttng_ust_object_data *obj_data, + struct lttng_ust_object_data **context_data); -int ustctl_enable(int sock, struct object_data *object); -int ustctl_disable(int sock, struct object_data *object); +int ustctl_enable(int sock, struct lttng_ust_object_data *object); +int ustctl_disable(int sock, struct lttng_ust_object_data *object); int ustctl_start_session(int sock, int handle); int ustctl_stop_session(int sock, int handle); @@ -68,7 +68,7 @@ int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v); int ustctl_wait_quiescent(int sock); /* Flush each buffers in this channel */ -int ustctl_flush_buffer(int sock, struct object_data *channel_data); +int ustctl_flush_buffer(int sock, struct lttng_ust_object_data *channel_data); /* not implemented yet */ struct lttng_ust_calibrate; @@ -78,11 +78,11 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate); * Map channel shm_handle and add streams. Typically performed by the * consumer to map the objects into its memory space. */ -struct shm_handle *ustctl_map_channel(struct object_data *chan_data); +struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data); int ustctl_add_stream(struct shm_handle *shm_handle, - struct object_data *stream_data); + struct lttng_ust_object_data *stream_data); /* - * Note: the object_data from which the shm_handle is derived can only + * Note: the lttng_ust_object_data from which the shm_handle is derived can only * be released after unmapping the handle. */ void ustctl_unmap_channel(struct shm_handle *shm_handle); @@ -137,6 +137,6 @@ int ustctl_put_subbuf(struct shm_handle *handle, struct lib_ring_buffer *buf); /* Release object created by members of this API */ -void release_object(int sock, struct object_data *data); +void release_object(int sock, struct lttng_ust_object_data *data); #endif /* _LTTNG_UST_CTL_H */ diff --git a/libustctl/ustctl.c b/libustctl/ustctl.c index 429cc44..8e6e2f3 100644 --- a/libustctl/ustctl.c +++ b/libustctl/ustctl.c @@ -29,7 +29,7 @@ volatile enum ust_loglevel ust_loglevel; static -void init_object(struct object_data *data) +void init_object(struct lttng_ust_object_data *data) { data->handle = -1; data->shm_fd = -1; @@ -37,7 +37,7 @@ void init_object(struct object_data *data) data->memory_map_size = 0; } -void release_object(int sock, struct object_data *data) +void release_object(int sock, struct lttng_ust_object_data *data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; @@ -105,11 +105,11 @@ int ustctl_create_session(int sock) /* open the metadata global channel */ int ustctl_open_metadata(int sock, int session_handle, struct lttng_ust_channel_attr *chops, - struct object_data **_metadata_data) + struct lttng_ust_object_data **_metadata_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; - struct object_data *metadata_data; + struct lttng_ust_object_data *metadata_data; int ret; metadata_data = malloc(sizeof(*metadata_data)); @@ -158,11 +158,11 @@ error: int ustctl_create_channel(int sock, int session_handle, struct lttng_ust_channel_attr *chops, - struct object_data **_channel_data) + struct lttng_ust_object_data **_channel_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; - struct object_data *channel_data; + struct lttng_ust_object_data *channel_data; int ret; channel_data = malloc(sizeof(*channel_data)); @@ -214,12 +214,12 @@ error: * Return 0 on success. * Return negative error value on error. */ -int ustctl_create_stream(int sock, struct object_data *channel_data, - struct object_data **_stream_data) +int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data, + struct lttng_ust_object_data **_stream_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; - struct object_data *stream_data; + struct lttng_ust_object_data *stream_data; int ret, fd; stream_data = malloc(sizeof(*stream_data)); @@ -261,12 +261,12 @@ error: } int ustctl_create_event(int sock, struct lttng_ust_event *ev, - struct object_data *channel_data, - struct object_data **_event_data) + struct lttng_ust_object_data *channel_data, + struct lttng_ust_object_data **_event_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; - struct object_data *event_data; + struct lttng_ust_object_data *event_data; int ret; event_data = malloc(sizeof(*event_data)); @@ -291,12 +291,12 @@ int ustctl_create_event(int sock, struct lttng_ust_event *ev, } int ustctl_add_context(int sock, struct lttng_ust_context *ctx, - struct object_data *obj_data, - struct object_data **_context_data) + struct lttng_ust_object_data *obj_data, + struct lttng_ust_object_data **_context_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; - struct object_data *context_data; + struct lttng_ust_object_data *context_data; int ret; context_data = malloc(sizeof(*context_data)); @@ -319,7 +319,7 @@ int ustctl_add_context(int sock, struct lttng_ust_context *ctx, } /* Enable event, channel and session ioctl */ -int ustctl_enable(int sock, struct object_data *object) +int ustctl_enable(int sock, struct lttng_ust_object_data *object) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; @@ -336,7 +336,7 @@ int ustctl_enable(int sock, struct object_data *object) } /* Disable event, channel and session ioctl */ -int ustctl_disable(int sock, struct object_data *object) +int ustctl_disable(int sock, struct lttng_ust_object_data *object) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; @@ -354,7 +354,7 @@ int ustctl_disable(int sock, struct object_data *object) int ustctl_start_session(int sock, int handle) { - struct object_data obj; + struct lttng_ust_object_data obj; obj.handle = handle; return ustctl_enable(sock, &obj); @@ -362,7 +362,7 @@ int ustctl_start_session(int sock, int handle) int ustctl_stop_session(int sock, int handle) { - struct object_data obj; + struct lttng_ust_object_data obj; obj.handle = handle; return ustctl_disable(sock, &obj); @@ -407,7 +407,7 @@ int ustctl_wait_quiescent(int sock) return 0; } -int ustctl_flush_buffer(int sock, struct object_data *channel_data) +int ustctl_flush_buffer(int sock, struct lttng_ust_object_data *channel_data) { struct ustcomm_ust_msg lum; struct ustcomm_ust_reply lur; @@ -426,7 +426,7 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate) /* Buffer operations */ /* Map channel shm into process memory */ -struct shm_handle *ustctl_map_channel(struct object_data *chan_data) +struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data) { struct shm_handle *handle; struct channel *chan; @@ -465,7 +465,7 @@ struct shm_handle *ustctl_map_channel(struct object_data *chan_data) /* Add stream to channel shm and map its shm into process memory */ int ustctl_add_stream(struct shm_handle *handle, - struct object_data *stream_data) + struct lttng_ust_object_data *stream_data) { int ret; diff --git a/tests/ust-basic-tracing/ust-basic-tracing.c b/tests/ust-basic-tracing/ust-basic-tracing.c index a0ed979..d9339e9 100644 --- a/tests/ust-basic-tracing/ust-basic-tracing.c +++ b/tests/ust-basic-tracing/ust-basic-tracing.c @@ -43,7 +43,7 @@ #define MAX_NR_STREAMS 64 #define MAX_NR_EVENTS 128 -struct object_data { +struct lttng_ust_object_data { int handle; int shm_fd; int wait_fd; @@ -51,10 +51,10 @@ struct object_data { }; static int session_handle; -static struct object_data metadata_stream_data; -static struct object_data metadata_data; -static struct object_data channel_data; -static struct object_data stream_data[MAX_NR_STREAMS]; +static struct lttng_ust_object_data metadata_stream_data; +static struct lttng_ust_object_data metadata_data; +static struct lttng_ust_object_data channel_data; +static struct lttng_ust_object_data stream_data[MAX_NR_STREAMS]; static int event_handle[MAX_NR_EVENTS]; static int context_handle; @@ -70,7 +70,7 @@ static void handle_signals(int signo) } static -int open_streams(int sock, int channel_handle, struct object_data *stream_datas, +int open_streams(int sock, int channel_handle, struct lttng_ust_object_data *stream_datas, int nr_check) { int ret, k = 0; @@ -114,7 +114,7 @@ int open_streams(int sock, int channel_handle, struct object_data *stream_datas, } static -int close_streams(int sock, struct object_data *stream_datas, int nr_check) +int close_streams(int sock, struct lttng_ust_object_data *stream_datas, int nr_check) { int ret, k; @@ -151,8 +151,8 @@ int close_streams(int sock, struct object_data *stream_datas, int nr_check) } static -struct shm_handle *map_channel(struct object_data *chan_data, - struct object_data *stream_datas, int nr_check) +struct shm_handle *map_channel(struct lttng_ust_object_data *chan_data, + struct lttng_ust_object_data *stream_datas, int nr_check) { struct shm_handle *handle; struct channel *chan; @@ -171,7 +171,7 @@ struct shm_handle *map_channel(struct object_data *chan_data, chan = shmp(handle, handle->chan); for (k = 0; k < nr_check; k++) { - struct object_data *stream_data = &stream_datas[k]; + struct lttng_ust_object_data *stream_data = &stream_datas[k]; if (!stream_data->handle) break; diff --git a/tests/ust-multi-test/ust-multi-test.c b/tests/ust-multi-test/ust-multi-test.c index 21cefa1..130da70 100644 --- a/tests/ust-multi-test/ust-multi-test.c +++ b/tests/ust-multi-test/ust-multi-test.c @@ -51,7 +51,7 @@ const char *evname[] = { "ust_tests_hello_dontexist", }; -struct object_data { +struct lttng_ust_object_data { int handle; int shm_fd; int wait_fd; @@ -59,10 +59,10 @@ struct object_data { }; static int session_handle[NR_SESSIONS]; -static struct object_data metadata_stream_data[NR_SESSIONS]; -static struct object_data metadata_data[NR_SESSIONS]; -static struct object_data channel_data[NR_SESSIONS][NR_CHANNELS]; -static struct object_data stream_data[NR_SESSIONS][NR_CHANNELS][MAX_NR_STREAMS]; +static struct lttng_ust_object_data metadata_stream_data[NR_SESSIONS]; +static struct lttng_ust_object_data metadata_data[NR_SESSIONS]; +static struct lttng_ust_object_data channel_data[NR_SESSIONS][NR_CHANNELS]; +static struct lttng_ust_object_data stream_data[NR_SESSIONS][NR_CHANNELS][MAX_NR_STREAMS]; static int event_handle[NR_SESSIONS][NR_CHANNELS][NR_EVENTS]; static int apps_socket = -1; @@ -77,7 +77,7 @@ static void handle_signals(int signo) } static -int open_streams(int sock, int channel_handle, struct object_data *stream_datas, +int open_streams(int sock, int channel_handle, struct lttng_ust_object_data *stream_datas, int nr_check) { int ret, k = 0; @@ -121,7 +121,7 @@ int open_streams(int sock, int channel_handle, struct object_data *stream_datas, } static -int close_streams(int sock, struct object_data *stream_datas, int nr_check) +int close_streams(int sock, struct lttng_ust_object_data *stream_datas, int nr_check) { int ret, k; @@ -158,8 +158,8 @@ int close_streams(int sock, struct object_data *stream_datas, int nr_check) } static -struct shm_handle *map_channel(struct object_data *chan_data, - struct object_data *stream_datas, int nr_check) +struct shm_handle *map_channel(struct lttng_ust_object_data *chan_data, + struct lttng_ust_object_data *stream_datas, int nr_check) { struct shm_handle *handle; struct channel *chan; @@ -178,7 +178,7 @@ struct shm_handle *map_channel(struct object_data *chan_data, chan = shmp(handle, handle->chan); for (k = 0; k < nr_check; k++) { - struct object_data *stream_data = &stream_datas[k]; + struct lttng_ust_object_data *stream_data = &stream_datas[k]; if (!stream_data->handle) break;