#define LTTNG_UST_PROVIDER_MINOR 0
struct lttng_channel;
-struct lttng_session;
+struct lttng_ust_session;
struct lttng_ust_lib_ring_buffer_ctx;
struct lttng_ust_event_field;
struct lttng_event_notifier_group;
int enabled;
struct lttng_ust_ctx *ctx;
/* Event ID management */
- struct lttng_session *session;
+ struct lttng_ust_session *session;
int objd; /* Object associated to channel */
struct cds_list_head node; /* Channel list in session */
const struct lttng_ust_channel_ops *ops;
* structure. It should be queried before using additional fields added
* at the end of the structure.
*/
-struct lttng_session {
+struct lttng_ust_session {
uint32_t struct_size; /* Size of this structure */
struct lttng_ust_session_private *priv; /* Private session interface */
struct lttng_ust_ctx_field;
struct lttng_ust_enum_entry;
struct lttng_integer_type;
-struct lttng_session;
+struct lttng_ust_session;
struct ustctl_reg_msg {
uint32_t magic;
*/
__attribute__((visibility("hidden")))
int ustcomm_register_event(int sock,
- struct lttng_session *session,
+ struct lttng_ust_session *session,
int session_objd, /* session descriptor */
int channel_objd, /* channel descriptor */
const char *event_name, /* event name (input) */
*/
__attribute__((visibility("hidden")))
int ustcomm_register_channel(int sock,
- struct lttng_session *session,
+ struct lttng_ust_session *session,
int session_objd, /* session descriptor */
int channel_objd, /* channel descriptor */
size_t nr_ctx_fields,
ssize_t count_fields_recursive(size_t nr_fields,
const struct lttng_ust_event_field **lttng_fields);
static
-int serialize_one_field(struct lttng_session *session,
+int serialize_one_field(struct lttng_ust_session *session,
struct ustctl_field *fields, size_t *iter_output,
const struct lttng_ust_event_field *lf);
static
-int serialize_fields(struct lttng_session *session,
+int serialize_fields(struct lttng_ust_session *session,
struct ustctl_field *ustctl_fields,
size_t *iter_output, size_t nr_lttng_fields,
const struct lttng_ust_event_field **lttng_fields);
}
static
-int serialize_dynamic_type(struct lttng_session *session,
+int serialize_dynamic_type(struct lttng_ust_session *session,
struct ustctl_field *fields, size_t *iter_output,
const char *field_name)
{
}
static
-int serialize_one_type(struct lttng_session *session,
+int serialize_one_type(struct lttng_ust_session *session,
struct ustctl_field *fields, size_t *iter_output,
const char *field_name, const struct lttng_type *lt)
{
}
static
-int serialize_one_field(struct lttng_session *session,
+int serialize_one_field(struct lttng_ust_session *session,
struct ustctl_field *fields, size_t *iter_output,
const struct lttng_ust_event_field *lf)
{
}
static
-int serialize_fields(struct lttng_session *session,
+int serialize_fields(struct lttng_ust_session *session,
struct ustctl_field *ustctl_fields,
size_t *iter_output, size_t nr_lttng_fields,
const struct lttng_ust_event_field **lttng_fields)
}
static
-int alloc_serialize_fields(struct lttng_session *session,
+int alloc_serialize_fields(struct lttng_ust_session *session,
size_t *_nr_write_fields,
struct ustctl_field **ustctl_fields,
size_t nr_fields,
}
static
-int serialize_ctx_fields(struct lttng_session *session,
+int serialize_ctx_fields(struct lttng_ust_session *session,
size_t *_nr_write_fields,
struct ustctl_field **ustctl_fields,
size_t nr_fields,
* Returns 0 on success, negative error value on error.
*/
int ustcomm_register_event(int sock,
- struct lttng_session *session,
+ struct lttng_ust_session *session,
int session_objd, /* session descriptor */
int channel_objd, /* channel descriptor */
const char *event_name, /* event name (input) */
* Returns -EPIPE or -ECONNRESET if other end has hung up.
*/
int ustcomm_register_channel(int sock,
- struct lttng_session *session,
+ struct lttng_ust_session *session,
int session_objd, /* session descriptor */
int channel_objd, /* channel descriptor */
size_t nr_ctx_fields,
__attribute__((visibility("hidden")))
int lttng_attach_context(struct lttng_ust_abi_context *context_param,
union lttng_ust_abi_args *uargs,
- struct lttng_ust_ctx **ctx, struct lttng_session *session);
+ struct lttng_ust_ctx **ctx, struct lttng_ust_session *session);
__attribute__((visibility("hidden")))
int lttng_find_context(struct lttng_ust_ctx *ctx, const char *name);
static void _lttng_enum_destroy(struct lttng_enum *_enum);
static
-void lttng_session_lazy_sync_event_enablers(struct lttng_session *session);
+void lttng_session_lazy_sync_event_enablers(struct lttng_ust_session *session);
static
-void lttng_session_sync_event_enablers(struct lttng_session *session);
+void lttng_session_sync_event_enablers(struct lttng_ust_session *session);
static
void lttng_event_notifier_group_sync_enablers(
struct lttng_event_notifier_group *event_notifier_group);
}
}
-struct lttng_session *lttng_session_create(void)
+struct lttng_ust_session *lttng_session_create(void)
{
- struct lttng_session *session;
+ struct lttng_ust_session *session;
struct lttng_ust_session_private *session_priv;
int i;
- session = zmalloc(sizeof(struct lttng_session));
+ session = zmalloc(sizeof(struct lttng_ust_session));
if (!session)
return NULL;
- session->struct_size = sizeof(struct lttng_session);
+ session->struct_size = sizeof(struct lttng_ust_session);
session_priv = zmalloc(sizeof(struct lttng_ust_session_private));
if (!session_priv) {
free(session);
unregister_event(event);
}
-void lttng_session_destroy(struct lttng_session *session)
+void lttng_session_destroy(struct lttng_ust_session *session)
{
struct lttng_channel *chan, *tmpchan;
struct lttng_ust_event_recorder_private *event_recorder_priv, *tmpevent_recorder_priv;
static
int lttng_enum_create(const struct lttng_ust_enum_desc *desc,
- struct lttng_session *session)
+ struct lttng_ust_session *session)
{
const char *enum_name = desc->name;
struct lttng_enum *_enum;
static
int lttng_create_enum_check(const struct lttng_type *type,
- struct lttng_session *session)
+ struct lttng_ust_session *session)
{
switch (type->atype) {
case atype_enum_nestable:
static
int lttng_create_all_event_enums(size_t nr_fields,
const struct lttng_ust_event_field **event_fields,
- struct lttng_session *session)
+ struct lttng_ust_session *session)
{
size_t i;
int ret;
static
int lttng_create_all_ctx_enums(size_t nr_fields,
struct lttng_ust_ctx_field **ctx_fields,
- struct lttng_session *session)
+ struct lttng_ust_session *session)
{
size_t i;
int ret;
* Ensure that a state-dump will be performed for this session at the end
* of the current handle_message().
*/
-int lttng_session_statedump(struct lttng_session *session)
+int lttng_session_statedump(struct lttng_ust_session *session)
{
session->priv->statedump_pending = 1;
lttng_ust_sockinfo_session_enabled(session->priv->owner);
return 0;
}
-int lttng_session_enable(struct lttng_session *session)
+int lttng_session_enable(struct lttng_ust_session *session)
{
int ret = 0;
struct lttng_channel *chan;
return ret;
}
-int lttng_session_disable(struct lttng_session *session)
+int lttng_session_disable(struct lttng_ust_session *session)
{
int ret = 0;
{
struct lttng_ust_event_recorder *event_recorder;
struct lttng_ust_event_recorder_private *event_recorder_priv;
- struct lttng_session *session = chan->session;
+ struct lttng_ust_session *session = chan->session;
struct cds_hlist_head *head;
int ret = 0;
int notify_socket, loglevel;
static
void lttng_create_event_recorder_if_missing(struct lttng_event_enabler *event_enabler)
{
- struct lttng_session *session = event_enabler->chan->session;
+ struct lttng_ust_session *session = event_enabler->chan->session;
struct lttng_ust_probe_desc *probe_desc;
const struct lttng_ust_event_desc *desc;
struct lttng_ust_event_recorder_private *event_recorder_priv;
case LTTNG_UST_EVENT_TYPE_RECORDER:
{
struct lttng_ust_event_recorder *event_recorder = event->child;
- struct lttng_session *session = event_recorder->chan->session;
+ struct lttng_ust_session *session = event_recorder->chan->session;
unsigned int i;
/* Destroy enums of the current event. */
static
int lttng_event_enabler_ref_event_recorders(struct lttng_event_enabler *event_enabler)
{
- struct lttng_session *session = event_enabler->chan->session;
+ struct lttng_ust_session *session = event_enabler->chan->session;
struct lttng_ust_event_recorder_private *event_recorder_priv;
if (!lttng_event_enabler_as_enabler(event_enabler)->enabled)
int lttng_attach_context(struct lttng_ust_abi_context *context_param,
union lttng_ust_abi_args *uargs,
- struct lttng_ust_ctx **ctx, struct lttng_session *session)
+ struct lttng_ust_ctx **ctx, struct lttng_ust_session *session)
{
/*
* We cannot attach a context after trace has been started for a
* session.
*/
static
-void lttng_session_sync_event_enablers(struct lttng_session *session)
+void lttng_session_sync_event_enablers(struct lttng_ust_session *session)
{
struct lttng_event_enabler *event_enabler;
struct lttng_ust_event_recorder_private *event_recorder_priv;
* "lazy" sync means we only sync if required.
*/
static
-void lttng_session_lazy_sync_event_enablers(struct lttng_session *session)
+void lttng_session_lazy_sync_event_enablers(struct lttng_ust_session *session)
{
/* We can skip if session is not active */
if (!session->active)
*/
#define LTTNG_PROC_NS_PATH_MAX 40
-struct lttng_session;
+struct lttng_ust_session;
struct lttng_channel;
struct lttng_event;
struct lttng_ust_ctx_field;
static
int lttng_abi_create_session(void *owner)
{
- struct lttng_session *session;
+ struct lttng_ust_session *session;
int session_objd, ret;
session = lttng_session_create();
long lttng_abi_add_context(int objd,
struct lttng_ust_abi_context *context_param,
union lttng_ust_abi_args *uargs,
- struct lttng_ust_ctx **ctx, struct lttng_session *session)
+ struct lttng_ust_ctx **ctx, struct lttng_ust_session *session)
{
return lttng_attach_context(context_param, uargs, ctx, session);
}
union lttng_ust_abi_args *uargs,
void *owner)
{
- struct lttng_session *session = objd_private(session_objd);
+ struct lttng_ust_session *session = objd_private(session_objd);
const char *transport_name;
const struct lttng_transport *transport;
const char *chan_name;
long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg,
union lttng_ust_abi_args *uargs, void *owner)
{
- struct lttng_session *session = objd_private(objd);
+ struct lttng_ust_session *session = objd_private(objd);
switch (cmd) {
case LTTNG_UST_ABI_CHANNEL:
static
int lttng_release_session(int objd)
{
- struct lttng_session *session = objd_private(objd);
+ struct lttng_ust_session *session = objd_private(objd);
if (session) {
lttng_session_destroy(session);
#include <lttng/tracepoint.h>
TRACEPOINT_EVENT(lttng_ust_statedump, start,
- TP_ARGS(struct lttng_session *, session),
+ TP_ARGS(struct lttng_ust_session *, session),
TP_FIELDS()
)
TRACEPOINT_EVENT(lttng_ust_statedump, bin_info,
TP_ARGS(
- struct lttng_session *, session,
+ struct lttng_ust_session *, session,
void *, baddr,
const char*, path,
uint64_t, memsz,
TRACEPOINT_EVENT(lttng_ust_statedump, build_id,
TP_ARGS(
- struct lttng_session *, session,
+ struct lttng_ust_session *, session,
void *, baddr,
uint8_t *, build_id,
size_t, build_id_len
TRACEPOINT_EVENT(lttng_ust_statedump, debug_link,
TP_ARGS(
- struct lttng_session *, session,
+ struct lttng_ust_session *, session,
void *, baddr,
char *, filename,
uint32_t, crc
TRACEPOINT_EVENT(lttng_ust_statedump, procname,
TP_ARGS(
- struct lttng_session *, session,
+ struct lttng_ust_session *, session,
char *, name
),
TP_FIELDS(
)
TRACEPOINT_EVENT(lttng_ust_statedump, end,
- TP_ARGS(struct lttng_session *, session),
+ TP_ARGS(struct lttng_ust_session *, session),
TP_FIELDS()
)
#define UST_DL_STATE_TABLE_SIZE (1 << UST_DL_STATE_HASH_BITS)
struct cds_hlist_head dl_state_table[UST_DL_STATE_TABLE_SIZE];
-typedef void (*tracepoint_cb)(struct lttng_session *session, void *priv);
+typedef void (*tracepoint_cb)(struct lttng_ust_session *session, void *priv);
static
struct lttng_ust_dl_node *alloc_dl_node(const struct bin_info_data *bin_data)
}
static
-void trace_bin_info_cb(struct lttng_session *session, void *priv)
+void trace_bin_info_cb(struct lttng_ust_session *session, void *priv)
{
struct bin_info_data *bin_data = (struct bin_info_data *) priv;
}
static
-void trace_build_id_cb(struct lttng_session *session, void *priv)
+void trace_build_id_cb(struct lttng_ust_session *session, void *priv)
{
struct bin_info_data *bin_data = (struct bin_info_data *) priv;
}
static
-void trace_debug_link_cb(struct lttng_session *session, void *priv)
+void trace_debug_link_cb(struct lttng_ust_session *session, void *priv)
{
struct bin_info_data *bin_data = (struct bin_info_data *) priv;
}
static
-void procname_cb(struct lttng_session *session, void *priv)
+void procname_cb(struct lttng_ust_session *session, void *priv)
{
char *procname = (char *) priv;
tracepoint(lttng_ust_statedump, procname, session, procname);
}
static
-void trace_start_cb(struct lttng_session *session, void *priv)
+void trace_start_cb(struct lttng_ust_session *session, void *priv)
{
tracepoint(lttng_ust_statedump, start, session);
}
static
-void trace_end_cb(struct lttng_session *session, void *priv)
+void trace_end_cb(struct lttng_ust_session *session, void *priv)
{
tracepoint(lttng_ust_statedump, end, session);
}
/*
* Needed by comm layer.
*/
-struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_session *session,
+struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
const struct lttng_ust_enum_desc *enum_desc)
{
struct lttng_enum *_enum;
};
struct lttng_ust_session_private {
- struct lttng_session *pub; /* Public session interface */
+ struct lttng_ust_session *pub; /* Public session interface */
int been_active; /* Been active ? */
int objd; /* Object associated */
struct lttng_enum {
const struct lttng_ust_enum_desc *desc;
- struct lttng_session *session;
+ struct lttng_ust_session *session;
struct cds_list_head node; /* Enum list in session */
struct cds_hlist_node hlist; /* Session ht of enums */
uint64_t id; /* Enumeration ID in sessiond */
lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list);
__attribute__((visibility("hidden")))
-struct lttng_session *lttng_session_create(void);
+struct lttng_ust_session *lttng_session_create(void);
__attribute__((visibility("hidden")))
-int lttng_session_enable(struct lttng_session *session);
+int lttng_session_enable(struct lttng_ust_session *session);
__attribute__((visibility("hidden")))
-int lttng_session_disable(struct lttng_session *session);
+int lttng_session_disable(struct lttng_ust_session *session);
__attribute__((visibility("hidden")))
-int lttng_session_statedump(struct lttng_session *session);
+int lttng_session_statedump(struct lttng_ust_session *session);
__attribute__((visibility("hidden")))
-void lttng_session_destroy(struct lttng_session *session);
+void lttng_session_destroy(struct lttng_ust_session *session);
/*
* Called with ust lock held.
void lttng_handle_pending_statedump(void *owner);
__attribute__((visibility("hidden")))
-struct lttng_channel *lttng_channel_create(struct lttng_session *session,
+struct lttng_channel *lttng_channel_create(struct lttng_ust_session *session,
const char *transport_name,
void *buf_addr,
size_t subbuf_size, size_t num_subbuf,
struct cds_list_head *lttng_get_probe_list_head(void);
__attribute__((visibility("hidden")))
-struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_session *session,
+struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session,
const struct lttng_ust_enum_desc *enum_desc);
__attribute__((visibility("hidden")))