enum lttng_ust_output output; /* splice, mmap */
};
-struct object_data {
+struct lttng_ust_object_data {
int handle;
int shm_fd;
int wait_fd;
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);
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;
* 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);
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 */
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;
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;
/* 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));
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));
* 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));
}
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));
}
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));
}
/* 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;
}
/* 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;
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);
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);
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;
/* 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;
/* 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;
#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;
};
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;
}
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;
}
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;
}
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;
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;
"ust_tests_hello_dontexist",
};
-struct object_data {
+struct lttng_ust_object_data {
int handle;
int shm_fd;
int wait_fd;
};
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;
}
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;
}
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;
}
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;
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;