From: Mathieu Desnoyers Date: Tue, 16 Mar 2021 20:19:34 +0000 (-0400) Subject: Namepace struct lttng_session with lttng_ust_ prefix X-Git-Tag: v2.13.0-rc1~270 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f69fe5fb0a2b0c581f0562bdd04ab2a003d239f9;p=lttng-ust.git Namepace struct lttng_session with lttng_ust_ prefix Signed-off-by: Mathieu Desnoyers Change-Id: I6f35753cda29c51f62cc90ccf7328a7255f77af7 --- diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 0e9d4875..c2a7dd8f 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -41,7 +41,7 @@ extern "C" { #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; @@ -500,7 +500,7 @@ struct lttng_channel { 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; @@ -544,7 +544,7 @@ struct lttng_ust_session_private; * 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 */ diff --git a/include/ust-comm.h b/include/ust-comm.h index b45797ef..da4adc2f 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -45,7 +45,7 @@ struct lttng_ust_event_field; 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; @@ -285,7 +285,7 @@ int ustcomm_send_reg_msg(int sock, */ __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) */ @@ -314,7 +314,7 @@ int ustcomm_register_enum(int sock, */ __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, diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 6a801b5c..e02aaeb6 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -39,11 +39,11 @@ static 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); @@ -987,7 +987,7 @@ int serialize_integer_type(struct ustctl_integer_type *uit, } 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) { @@ -1046,7 +1046,7 @@ int serialize_dynamic_type(struct lttng_session *session, } 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) { @@ -1236,7 +1236,7 @@ int serialize_one_type(struct lttng_session *session, } 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) { @@ -1248,7 +1248,7 @@ int serialize_one_field(struct lttng_session *session, } 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) @@ -1266,7 +1266,7 @@ int serialize_fields(struct lttng_session *session, } 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, @@ -1336,7 +1336,7 @@ int serialize_entries(struct ustctl_enum_entry **_entries, } 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, @@ -1377,7 +1377,7 @@ error_type: * 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) */ @@ -1624,7 +1624,7 @@ error_entries: * 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, diff --git a/liblttng-ust/context-internal.h b/liblttng-ust/context-internal.h index 7060e281..c018e122 100644 --- a/liblttng-ust/context-internal.h +++ b/liblttng-ust/context-internal.h @@ -17,7 +17,7 @@ int lttng_context_init_all(struct lttng_ust_ctx **ctx); __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); diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 03554894..de4d97d1 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -74,9 +74,9 @@ static void _lttng_event_destroy(struct lttng_ust_event_common *event); 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); @@ -127,16 +127,16 @@ int lttng_loglevel_match(int loglevel, } } -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); @@ -285,7 +285,7 @@ void _lttng_event_unregister(struct lttng_ust_event_common *event) 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; @@ -399,7 +399,7 @@ void lttng_enabler_destroy(struct lttng_enabler *enabler) 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; @@ -457,7 +457,7 @@ exist: 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: @@ -498,7 +498,7 @@ int lttng_create_enum_check(const struct lttng_type *type, 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; @@ -517,7 +517,7 @@ int lttng_create_all_event_enums(size_t nr_fields, 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; @@ -537,14 +537,14 @@ int lttng_create_all_ctx_enums(size_t nr_fields, * 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; @@ -619,7 +619,7 @@ end: return ret; } -int lttng_session_disable(struct lttng_session *session) +int lttng_session_disable(struct lttng_ust_session *session) { int ret = 0; @@ -697,7 +697,7 @@ int lttng_event_recorder_create(const struct lttng_ust_event_desc *desc, { 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; @@ -1004,7 +1004,7 @@ struct lttng_enabler_ref *lttng_enabler_ref( 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; @@ -1135,7 +1135,7 @@ void _event_enum_destroy(struct lttng_ust_event_common *event) 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. */ @@ -1202,7 +1202,7 @@ void lttng_probe_provider_unregister_events( 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) @@ -1546,7 +1546,7 @@ int lttng_event_notifier_enabler_attach_exclusion( 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 @@ -1640,7 +1640,7 @@ void lttng_event_enabler_destroy(struct lttng_event_enabler *event_enabler) * 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; @@ -1931,7 +1931,7 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group * "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) diff --git a/liblttng-ust/lttng-tracer-core.h b/liblttng-ust/lttng-tracer-core.h index 325fb5f9..3216cdc1 100644 --- a/liblttng-ust/lttng-tracer-core.h +++ b/liblttng-ust/lttng-tracer-core.h @@ -25,7 +25,7 @@ */ #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; diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 3ed0f198..4674d000 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -301,7 +301,7 @@ int lttng_is_channel_ready(struct lttng_channel *lttng_chan) 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(); @@ -379,7 +379,7 @@ static 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); } @@ -442,7 +442,7 @@ int lttng_abi_map_channel(int session_objd, 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; @@ -597,7 +597,7 @@ static 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: @@ -633,7 +633,7 @@ long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg, 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); diff --git a/liblttng-ust/lttng-ust-statedump-provider.h b/liblttng-ust/lttng-ust-statedump-provider.h index 27405e2d..4529369d 100644 --- a/liblttng-ust/lttng-ust-statedump-provider.h +++ b/liblttng-ust/lttng-ust-statedump-provider.h @@ -25,13 +25,13 @@ extern "C" { #include 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, @@ -51,7 +51,7 @@ TRACEPOINT_EVENT(lttng_ust_statedump, bin_info, 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 @@ -65,7 +65,7 @@ TRACEPOINT_EVENT(lttng_ust_statedump, build_id, 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 @@ -79,7 +79,7 @@ TRACEPOINT_EVENT(lttng_ust_statedump, debug_link, TRACEPOINT_EVENT(lttng_ust_statedump, procname, TP_ARGS( - struct lttng_session *, session, + struct lttng_ust_session *, session, char *, name ), TP_FIELDS( @@ -88,7 +88,7 @@ TRACEPOINT_EVENT(lttng_ust_statedump, procname, ) TRACEPOINT_EVENT(lttng_ust_statedump, end, - TP_ARGS(struct lttng_session *, session), + TP_ARGS(struct lttng_ust_session *, session), TP_FIELDS() ) diff --git a/liblttng-ust/lttng-ust-statedump.c b/liblttng-ust/lttng-ust-statedump.c index ff24e7c8..91d8e279 100644 --- a/liblttng-ust/lttng-ust-statedump.c +++ b/liblttng-ust/lttng-ust-statedump.c @@ -63,7 +63,7 @@ struct lttng_ust_dl_node { #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) @@ -204,7 +204,7 @@ void trace_statedump_event(tracepoint_cb tp_cb, void *owner, void *priv) } 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; @@ -216,7 +216,7 @@ void trace_bin_info_cb(struct lttng_session *session, void *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; @@ -226,7 +226,7 @@ void trace_build_id_cb(struct lttng_session *session, void *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; @@ -236,20 +236,20 @@ void trace_debug_link_cb(struct lttng_session *session, void *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); } diff --git a/liblttng-ust/ust-core.c b/liblttng-ust/ust-core.c index 19f62840..ca44c8f0 100644 --- a/liblttng-ust/ust-core.c +++ b/liblttng-ust/ust-core.c @@ -86,7 +86,7 @@ void lttng_counter_transport_unregister(struct lttng_counter_transport *transpor /* * 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; diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index e568d5ee..252d5d8c 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -282,7 +282,7 @@ struct lttng_ust_bytecode_runtime_private { }; 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 */ @@ -308,7 +308,7 @@ struct lttng_ust_session_private { 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 */ @@ -548,19 +548,19 @@ struct lttng_ust_abi_field_iter * 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. @@ -575,7 +575,7 @@ __attribute__((visibility("hidden"))) 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, @@ -613,7 +613,7 @@ __attribute__((visibility("hidden"))) 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")))