From 7dd08bec735b428479201f9f84d59c78deabdf57 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 12 Nov 2012 16:40:06 -0500 Subject: [PATCH] Cleanup: add lttng_/lttng-/LTTNG_ prefixes ltt_event -> lttng_event mass rename Rename ltt_chan -> lttng_chan Rename ltt_session -> lttng_session Rename enum abstract_types to enum lttng_abstract_types Rename ltt_transport to lttng_transport Rename rest of ltt_ prefixes to lttng_ Complete file and symbol renames from LTT/ltt to LTTNG/lttng Finish ltt->lttng symbol conversion Reviewed-by: David Goulet Reviewed-by: Christian Babeux Signed-off-by: Mathieu Desnoyers --- include/lttng/ust-events.h | 118 +++++------ include/lttng/ust-tracepoint-event.h | 8 +- include/lttng/ust-tracer.h | 6 +- liblttng-ust/Makefile.am | 22 +- liblttng-ust/lttng-context-procname.c | 2 +- liblttng-ust/lttng-context-pthread-id.c | 2 +- liblttng-ust/lttng-context-vpid.c | 2 +- liblttng-ust/lttng-context-vtid.c | 4 +- .../{ltt-context.c => lttng-context.c} | 0 liblttng-ust/{ltt-events.c => lttng-events.c} | 190 +++++++++--------- liblttng-ust/lttng-filter.c | 18 +- liblttng-ust/{ltt-probes.c => lttng-probes.c} | 44 ++-- ...d.c => lttng-ring-buffer-client-discard.c} | 10 +- ...c => lttng-ring-buffer-client-overwrite.c} | 10 +- ...er-client.h => lttng-ring-buffer-client.h} | 136 ++++++------- ....c => lttng-ring-buffer-metadata-client.c} | 10 +- ....h => lttng-ring-buffer-metadata-client.h} | 80 ++++---- ...{ltt-tracer-core.h => lttng-tracer-core.h} | 12 +- liblttng-ust/{ltt-tracer.h => lttng-tracer.h} | 16 +- liblttng-ust/lttng-ust-abi.c | 86 ++++---- liblttng-ust/lttng-ust-comm.c | 30 +-- liblttng-ust/tracepoint.c | 2 +- liblttng-ust/ust-core.c | 18 +- 23 files changed, 417 insertions(+), 409 deletions(-) rename liblttng-ust/{ltt-context.c => lttng-context.c} (100%) rename liblttng-ust/{ltt-events.c => lttng-events.c} (88%) rename liblttng-ust/{ltt-probes.c => lttng-probes.c} (91%) rename liblttng-ust/{ltt-ring-buffer-client-discard.c => lttng-ring-buffer-client-discard.c} (86%) rename liblttng-ust/{ltt-ring-buffer-client-overwrite.c => lttng-ring-buffer-client-overwrite.c} (86%) rename liblttng-ust/{ltt-ring-buffer-client.h => lttng-ring-buffer-client.h} (79%) rename liblttng-ust/{ltt-ring-buffer-metadata-client.c => lttng-ring-buffer-metadata-client.c} (85%) rename liblttng-ust/{ltt-ring-buffer-metadata-client.h => lttng-ring-buffer-metadata-client.h} (79%) rename liblttng-ust/{ltt-tracer-core.h => lttng-tracer-core.h} (88%) rename liblttng-ust/{ltt-tracer.h => lttng-tracer.h} (80%) diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 1378a350..4a7d67f2 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -29,8 +29,8 @@ #define LTTNG_UST_UUID_LEN 16 -struct ltt_channel; -struct ltt_session; +struct lttng_channel; +struct lttng_session; struct lttng_ust_lib_ring_buffer_ctx; /* @@ -52,7 +52,7 @@ enum lttng_client_types { /* Type description */ /* Update the astract_types name table in lttng-types.c along with this enum */ -enum abstract_types { +enum lttng_abstract_types { atype_integer, atype_enum, atype_array, @@ -147,7 +147,7 @@ union _lttng_basic_type { }; struct lttng_basic_type { - enum abstract_types atype; + enum lttng_abstract_types atype; union { union _lttng_basic_type basic; } u; @@ -155,7 +155,7 @@ struct lttng_basic_type { #define LTTNG_UST_TYPE_PADDING 128 struct lttng_type { - enum abstract_types atype; + enum lttng_abstract_types atype; union { union _lttng_basic_type basic; struct { @@ -201,7 +201,7 @@ struct lttng_ctx_field { size_t (*get_size)(size_t offset); void (*record)(struct lttng_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan); + struct lttng_channel *chan); union { char padding[LTTNG_UST_CTX_FIELD_PADDING]; } u; @@ -250,7 +250,7 @@ struct lttng_probe_desc { * be enabled. */ struct session_wildcard { - struct ltt_channel *chan; + struct lttng_channel *chan; struct lttng_ctx *ctx; /* TODO */ struct lttng_ust_event event_param; struct cds_list_head events; /* list of events enabled */ @@ -298,7 +298,7 @@ struct lttng_ust_field_list { }; struct ust_pending_probe; -struct ltt_event; +struct lttng_event; struct lttng_ust_filter_bytecode_node { struct cds_list_head node; @@ -313,17 +313,17 @@ struct lttng_bytecode_runtime { }; /* - * ltt_event structure is referred to by the tracing fast path. It must be - * kept small. + * lttng_event structure is referred to by the tracing fast path. It + * must be kept small. * * IMPORTANT: this structure is part of the ABI between the probe and * UST. Fields need to be only added at the end, never reordered, never * removed. */ -struct ltt_event { +struct lttng_event { /* LTTng-UST 2.0 starts here */ unsigned int id; - struct ltt_channel *chan; + struct lttng_channel *chan; int enabled; const struct lttng_event_desc *desc; void *filter_unused; @@ -350,16 +350,16 @@ struct lttng_ust_shm_handle; * UST. Fields need to be only added at the end, never reordered, never * removed. */ -struct ltt_channel_ops { - struct ltt_channel *(*channel_create)(const char *name, +struct lttng_channel_ops { + struct lttng_channel *(*channel_create)(const char *name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval, int **shm_fd, int **wait_fd, uint64_t **memory_map_size, - struct ltt_channel *chan_priv_init); - void (*channel_destroy)(struct ltt_channel *ltt_chan); + struct lttng_channel *chan_priv_init); + void (*channel_destroy)(struct lttng_channel *lttng_chan); struct lttng_ust_lib_ring_buffer *(*buffer_read_open)(struct channel *chan, struct lttng_ust_shm_handle *handle, int **shm_fd, int **wait_fd, @@ -390,7 +390,7 @@ struct ltt_channel_ops { * UST. Fields need to be only added at the end, never reordered, never * removed. */ -struct ltt_channel { +struct lttng_channel { /* * The pointers located in this private data are NOT safe to be * dereferenced by the consumer. The only operations the @@ -401,12 +401,12 @@ struct ltt_channel { int enabled; struct lttng_ctx *ctx; /* Event ID management */ - struct ltt_session *session; + struct lttng_session *session; int objd; /* Object associated to channel */ unsigned int free_event_id; /* Next event ID to allocate */ unsigned int used_event_id; /* Max allocated event IDs */ struct cds_list_head list; /* Channel list */ - struct ltt_channel_ops *ops; + struct lttng_channel_ops *ops; int header_type; /* 0: unset, 1: compact, 2: large */ struct lttng_ust_shm_handle *handle; /* shared-memory handle */ unsigned int metadata_dumped:1; @@ -422,11 +422,11 @@ struct ltt_channel { * UST. Fields need to be only added at the end, never reordered, never * removed. */ -struct ltt_session { +struct lttng_session { int active; /* Is trace session active ? */ int been_active; /* Has trace session been active ? */ int objd; /* Object associated to session */ - struct ltt_channel *metadata; /* Metadata channel */ + struct lttng_channel *metadata; /* Metadata channel */ struct cds_list_head chan; /* Channel list head */ struct cds_list_head events; /* Event list head */ struct cds_list_head wildcards; /* Wildcard list head */ @@ -436,18 +436,18 @@ struct ltt_session { unsigned int metadata_dumped:1; }; -struct ltt_transport { +struct lttng_transport { char *name; struct cds_list_head node; - struct ltt_channel_ops ops; + struct lttng_channel_ops ops; }; -struct ltt_session *ltt_session_create(void); -int ltt_session_enable(struct ltt_session *session); -int ltt_session_disable(struct ltt_session *session); -void ltt_session_destroy(struct ltt_session *session); +struct lttng_session *lttng_session_create(void); +int lttng_session_enable(struct lttng_session *session); +int lttng_session_disable(struct lttng_session *session); +void lttng_session_destroy(struct lttng_session *session); -struct ltt_channel *ltt_channel_create(struct ltt_session *session, +struct lttng_channel *lttng_channel_create(struct lttng_session *session, const char *transport_name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, @@ -455,8 +455,8 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, unsigned int read_timer_interval, int **shm_fd, int **wait_fd, uint64_t **memory_map_size, - struct ltt_channel *chan_priv_init); -struct ltt_channel *ltt_global_channel_create(struct ltt_session *session, + struct lttng_channel *chan_priv_init); +struct lttng_channel *lttng_global_channel_create(struct lttng_session *session, int overwrite, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, @@ -464,27 +464,27 @@ struct ltt_channel *ltt_global_channel_create(struct ltt_session *session, int **shm_fd, int **wait_fd, uint64_t **memory_map_size); -int ltt_event_create(struct ltt_channel *chan, +int lttng_event_create(struct lttng_channel *chan, struct lttng_ust_event *event_param, - struct ltt_event **event); + struct lttng_event **event); -int ltt_channel_enable(struct ltt_channel *channel); -int ltt_channel_disable(struct ltt_channel *channel); -int ltt_event_enable(struct ltt_event *event); -int ltt_event_disable(struct ltt_event *event); +int lttng_channel_enable(struct lttng_channel *channel); +int lttng_channel_disable(struct lttng_channel *channel); +int lttng_event_enable(struct lttng_event *event); +int lttng_event_disable(struct lttng_event *event); -void ltt_transport_register(struct ltt_transport *transport); -void ltt_transport_unregister(struct ltt_transport *transport); +void lttng_transport_register(struct lttng_transport *transport); +void lttng_transport_unregister(struct lttng_transport *transport); void synchronize_trace(void); -int ltt_probe_register(struct lttng_probe_desc *desc); -void ltt_probe_unregister(struct lttng_probe_desc *desc); +int lttng_probe_register(struct lttng_probe_desc *desc); +void lttng_probe_unregister(struct lttng_probe_desc *desc); int pending_probe_fix_events(const struct lttng_event_desc *desc); -const struct lttng_event_desc *ltt_event_get(const char *name); -void ltt_event_put(const struct lttng_event_desc *desc); -int ltt_probes_init(void); -void ltt_probes_exit(void); +const struct lttng_event_desc *lttng_event_get(const char *name); +void lttng_event_put(const struct lttng_event_desc *desc); +int lttng_probes_init(void); +void lttng_probes_exit(void); int lttng_find_context(struct lttng_ctx *ctx, const char *name); struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx_p); void lttng_remove_context_field(struct lttng_ctx **ctx_p, @@ -501,37 +501,37 @@ extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_ extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_discard; extern const struct lttng_ust_lib_ring_buffer_client_cb *lttng_client_callbacks_overwrite; -struct ltt_transport *ltt_transport_find(const char *name); +struct lttng_transport *lttng_transport_find(const char *name); -int ltt_probes_get_event_list(struct lttng_ust_tracepoint_list *list); -void ltt_probes_prune_event_list(struct lttng_ust_tracepoint_list *list); +int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list); +void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list); struct lttng_ust_tracepoint_iter * lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list); -int ltt_probes_get_field_list(struct lttng_ust_field_list *list); -void ltt_probes_prune_field_list(struct lttng_ust_field_list *list); +int lttng_probes_get_field_list(struct lttng_ust_field_list *list); +void lttng_probes_prune_field_list(struct lttng_ust_field_list *list); struct lttng_ust_field_iter * lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list); -int ltt_wildcard_enable(struct session_wildcard *wildcard); -int ltt_wildcard_disable(struct session_wildcard *wildcard); -int ltt_wildcard_create(struct ltt_channel *chan, +int lttng_wildcard_enable(struct session_wildcard *wildcard); +int lttng_wildcard_disable(struct session_wildcard *wildcard); +int lttng_wildcard_create(struct lttng_channel *chan, struct lttng_ust_event *event_param, struct session_wildcard **sl); -int ltt_loglevel_match(const struct lttng_event_desc *desc, +int lttng_loglevel_match(const struct lttng_event_desc *desc, enum lttng_ust_loglevel_type req_type, int req_loglevel); -void ltt_probes_create_wildcard_events(struct wildcard_entry *entry, +void lttng_probes_create_wildcard_events(struct wildcard_entry *entry, struct session_wildcard *wildcard); -int lttng_filter_event_attach_bytecode(struct ltt_event *event, +int lttng_filter_event_attach_bytecode(struct lttng_event *event, struct lttng_ust_filter_bytecode_node *filter); int lttng_filter_wildcard_attach_bytecode(struct session_wildcard *wildcard, struct lttng_ust_filter_bytecode_node *filter); -void lttng_filter_event_link_bytecode(struct ltt_event *event); -void lttng_filter_event_link_wildcard_bytecode(struct ltt_event *event, +void lttng_filter_event_link_bytecode(struct lttng_event *event); +void lttng_filter_event_link_wildcard_bytecode(struct lttng_event *event, struct session_wildcard *wildcard); void lttng_filter_wildcard_link_bytecode(struct session_wildcard *wildcard); -void lttng_free_event_filter_bytecode(struct ltt_event *event); +void lttng_free_event_filter_bytecode(struct lttng_event *event); void lttng_free_wildcard_filter_bytecode(struct session_wildcard *wildcard); -void lttng_free_event_filter_runtime(struct ltt_event *event); +void lttng_free_event_filter_runtime(struct lttng_event *event); #endif /* _LTTNG_UST_EVENTS_H */ diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 3cecec9b..0be3395b 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -467,8 +467,8 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args)); \ static \ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args)) \ { \ - struct ltt_event *__event = __tp_data; \ - struct ltt_channel *__chan = __event->chan; \ + struct lttng_event *__event = __tp_data; \ + struct lttng_channel *__chan = __event->chan; \ struct lttng_ust_lib_ring_buffer_ctx __ctx; \ size_t __event_len, __event_align; \ size_t __dynamic_len_idx = 0; \ @@ -651,7 +651,7 @@ _TP_COMBINE_TOKENS(__lttng_events_init__, TRACEPOINT_PROVIDER)(void) { int ret; - ret = ltt_probe_register(&_TP_COMBINE_TOKENS(__probe_desc___, TRACEPOINT_PROVIDER)); + ret = lttng_probe_register(&_TP_COMBINE_TOKENS(__probe_desc___, TRACEPOINT_PROVIDER)); assert(!ret); } @@ -660,7 +660,7 @@ _TP_COMBINE_TOKENS(__lttng_events_exit__, TRACEPOINT_PROVIDER)(void); static void _TP_COMBINE_TOKENS(__lttng_events_exit__, TRACEPOINT_PROVIDER)(void) { - ltt_probe_unregister(&_TP_COMBINE_TOKENS(__probe_desc___, TRACEPOINT_PROVIDER)); + lttng_probe_unregister(&_TP_COMBINE_TOKENS(__probe_desc___, TRACEPOINT_PROVIDER)); } int _TP_COMBINE_TOKENS(__tracepoint_provider_, TRACEPOINT_PROVIDER); diff --git a/include/lttng/ust-tracer.h b/include/lttng/ust-tracer.h index 7b371953..a6672c9d 100644 --- a/include/lttng/ust-tracer.h +++ b/include/lttng/ust-tracer.h @@ -1,5 +1,5 @@ -#ifndef _LTTNG_TRACER_H -#define _LTTNG_TRACER_H +#ifndef _LTTNG_UST_TRACER_H +#define _LTTNG_UST_TRACER_H /* * Copyright (C) 2005-2011 Mathieu Desnoyers @@ -39,4 +39,4 @@ #define lttng_is_signed_type(type) (((type)(-1)) < 0) -#endif /* _LTTNG_TRACER_CORE_H */ +#endif /* _LTTNG_UST_TRACER_H */ diff --git a/liblttng-ust/Makefile.am b/liblttng-ust/Makefile.am index dff8b6e9..f8b334aa 100644 --- a/liblttng-ust/Makefile.am +++ b/liblttng-ust/Makefile.am @@ -8,7 +8,7 @@ lib_LTLIBRARIES = liblttng-ust-tracepoint.la liblttng-ust.la liblttng_ust_tracepoint_la_SOURCES = \ tracepoint.c \ tracepoint-internal.h \ - ltt-tracer-core.h \ + lttng-tracer-core.h \ jhash.h \ error.h liblttng_ust_tracepoint_la_LIBADD = \ @@ -19,15 +19,15 @@ liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" -f liblttng_ust_runtime_la_SOURCES = \ lttng-ust-comm.c \ lttng-ust-abi.c \ - ltt-probes.c \ + lttng-probes.c \ probes/lttng-probe-ust.c \ probes/lttng-probe-ust.h \ lttng-context-vtid.c \ lttng-context-vpid.c \ lttng-context-pthread-id.c \ lttng-context-procname.c \ - ltt-context.c \ - ltt-events.c \ + lttng-context.c \ + lttng-events.c \ lttng-filter.c \ lttng-filter.h \ lttng-filter-validator.c \ @@ -44,14 +44,14 @@ liblttng_ust_runtime_la_SOURCES = \ lttng-ust-uuid.h liblttng_ust_support_la_SOURCES = \ - ltt-tracer.h \ - ltt-tracer-core.h \ + lttng-tracer.h \ + lttng-tracer-core.h \ ust-core.c \ - ltt-ring-buffer-client.h \ - ltt-ring-buffer-client-discard.c \ - ltt-ring-buffer-client-overwrite.c \ - ltt-ring-buffer-metadata-client.h \ - ltt-ring-buffer-metadata-client.c + lttng-ring-buffer-client.h \ + lttng-ring-buffer-client-discard.c \ + lttng-ring-buffer-client-overwrite.c \ + lttng-ring-buffer-metadata-client.h \ + lttng-ring-buffer-metadata-client.c liblttng_ust_la_SOURCES = diff --git a/liblttng-ust/lttng-context-procname.c b/liblttng-ust/lttng-context-procname.c index 96cd1ee2..0d42be91 100644 --- a/liblttng-ust/lttng-context-procname.c +++ b/liblttng-ust/lttng-context-procname.c @@ -64,7 +64,7 @@ size_t procname_get_size(size_t offset) static void procname_record(struct lttng_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { char *procname; diff --git a/liblttng-ust/lttng-context-pthread-id.c b/liblttng-ust/lttng-context-pthread-id.c index 44c60c3a..e0f662f2 100644 --- a/liblttng-ust/lttng-context-pthread-id.c +++ b/liblttng-ust/lttng-context-pthread-id.c @@ -38,7 +38,7 @@ size_t pthread_id_get_size(size_t offset) static void pthread_id_record(struct lttng_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { unsigned long pthread_id; diff --git a/liblttng-ust/lttng-context-vpid.c b/liblttng-ust/lttng-context-vpid.c index fdf68fb1..3ab786f4 100644 --- a/liblttng-ust/lttng-context-vpid.c +++ b/liblttng-ust/lttng-context-vpid.c @@ -74,7 +74,7 @@ size_t vpid_get_size(size_t offset) static void vpid_record(struct lttng_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t pid; diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c index 81508515..dd443774 100644 --- a/liblttng-ust/lttng-context-vtid.c +++ b/liblttng-ust/lttng-context-vtid.c @@ -26,7 +26,7 @@ #include #include #include -#include "ltt-tracer-core.h" +#include "lttng-tracer-core.h" /* * We cache the result to ensure we don't trigger a system call for @@ -57,7 +57,7 @@ size_t vtid_get_size(size_t offset) static void vtid_record(struct lttng_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { if (caa_unlikely(!cached_vtid)) cached_vtid = gettid(); diff --git a/liblttng-ust/ltt-context.c b/liblttng-ust/lttng-context.c similarity index 100% rename from liblttng-ust/ltt-context.c rename to liblttng-ust/lttng-context.c diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/lttng-events.c similarity index 88% rename from liblttng-ust/ltt-events.c rename to liblttng-ust/lttng-events.c index ee82413d..24b5c666 100644 --- a/liblttng-ust/ltt-events.c +++ b/liblttng-ust/lttng-events.c @@ -1,5 +1,5 @@ /* - * ltt-events.c + * lttng-events.c * * Holds LTTng per-session event registry. * @@ -50,8 +50,8 @@ #include "lttng-ust-uuid.h" #include "tracepoint-internal.h" -#include "ltt-tracer.h" -#include "ltt-tracer-core.h" +#include "lttng-tracer.h" +#include "lttng-tracer-core.h" #include "wait.h" #include "../libringbuffer/shm.h" #include "jhash.h" @@ -91,25 +91,25 @@ static CDS_LIST_HEAD(wildcard_list); static struct cds_hlist_head pending_probe_table[PENDING_PROBE_HASH_SIZE]; struct ust_pending_probe { - struct ltt_event *event; + struct lttng_event *event; struct cds_hlist_node node; enum lttng_ust_loglevel_type loglevel_type; int loglevel; char name[]; }; -static void _ltt_event_destroy(struct ltt_event *event); -static void _ltt_wildcard_destroy(struct session_wildcard *sw); -static void _ltt_channel_destroy(struct ltt_channel *chan); -static int _ltt_event_unregister(struct ltt_event *event); +static void _lttng_event_destroy(struct lttng_event *event); +static void _lttng_wildcard_destroy(struct session_wildcard *sw); +static void _lttng_channel_destroy(struct lttng_channel *chan); +static int _lttng_event_unregister(struct lttng_event *event); static -int _ltt_event_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan, - struct ltt_event *event); +int _lttng_event_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan, + struct lttng_event *event); static -int _ltt_session_metadata_statedump(struct ltt_session *session); +int _lttng_session_metadata_statedump(struct lttng_session *session); -int ltt_loglevel_match(const struct lttng_event_desc *desc, +int lttng_loglevel_match(const struct lttng_event_desc *desc, enum lttng_ust_loglevel_type req_type, int req_loglevel) { @@ -158,7 +158,7 @@ struct wildcard_entry *match_wildcard(const struct lttng_event_desc *desc) goto possible_match; continue; /* goto next, no match */ possible_match: - if (ltt_loglevel_match(desc, + if (lttng_loglevel_match(desc, e->loglevel_type, e->loglevel)) { return e; @@ -173,7 +173,7 @@ struct wildcard_entry *match_wildcard(const struct lttng_event_desc *desc) * called with session mutex held. */ static -int add_pending_probe(struct ltt_event *event, const char *name, +int add_pending_probe(struct lttng_event *event, const char *name, enum lttng_ust_loglevel_type loglevel_type, int loglevel) { @@ -244,7 +244,7 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc) cds_list_for_each_entry(sw, &wildcard->session_list, session_list) { - struct ltt_event *ev; + struct lttng_event *ev; int ret; memcpy(&event_param, &sw->event_param, @@ -254,7 +254,7 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc) sizeof(event_param.name)); event_param.name[sizeof(event_param.name) - 1] = '\0'; /* create event */ - ret = ltt_event_create(sw->chan, + ret = lttng_event_create(sw->chan, &event_param, &ev); if (ret) { DBG("Error creating event"); @@ -275,10 +275,10 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc) hash = jhash(name, name_len - 1, 0); head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)]; cds_hlist_for_each_entry_safe(e, node, p, head, node) { - struct ltt_event *event; - struct ltt_channel *chan; + struct lttng_event *event; + struct lttng_channel *chan; - if (!ltt_loglevel_match(desc, + if (!lttng_loglevel_match(desc, e->loglevel_type, e->loglevel)) { continue; @@ -300,7 +300,7 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc) if (ret) continue; event->id = chan->free_event_id++; - ret |= _ltt_event_metadata_statedump(chan->session, chan, + ret |= _lttng_event_metadata_statedump(chan->session, chan, event); lttng_filter_event_link_bytecode(event); } @@ -312,12 +312,12 @@ void synchronize_trace(void) synchronize_rcu(); } -struct ltt_session *ltt_session_create(void) +struct lttng_session *lttng_session_create(void) { - struct ltt_session *session; + struct lttng_session *session; int ret; - session = zmalloc(sizeof(struct ltt_session)); + session = zmalloc(sizeof(struct lttng_session)); if (!session) return NULL; CDS_INIT_LIST_HEAD(&session->chan); @@ -331,33 +331,33 @@ struct ltt_session *ltt_session_create(void) return session; } -void ltt_session_destroy(struct ltt_session *session) +void lttng_session_destroy(struct lttng_session *session) { - struct ltt_channel *chan, *tmpchan; - struct ltt_event *event, *tmpevent; + struct lttng_channel *chan, *tmpchan; + struct lttng_event *event, *tmpevent; struct session_wildcard *wildcard, *tmpwildcard; int ret; CMM_ACCESS_ONCE(session->active) = 0; cds_list_for_each_entry(event, &session->events, list) { - ret = _ltt_event_unregister(event); + ret = _lttng_event_unregister(event); WARN_ON(ret); } synchronize_trace(); /* Wait for in-flight events to complete */ cds_list_for_each_entry_safe(wildcard, tmpwildcard, &session->wildcards, list) - _ltt_wildcard_destroy(wildcard); + _lttng_wildcard_destroy(wildcard); cds_list_for_each_entry_safe(event, tmpevent, &session->events, list) - _ltt_event_destroy(event); + _lttng_event_destroy(event); cds_list_for_each_entry_safe(chan, tmpchan, &session->chan, list) - _ltt_channel_destroy(chan); + _lttng_channel_destroy(chan); cds_list_del(&session->list); free(session); } -int ltt_session_enable(struct ltt_session *session) +int lttng_session_enable(struct lttng_session *session) { int ret = 0; - struct ltt_channel *chan; + struct lttng_channel *chan; if (session->active) { ret = -EBUSY; @@ -379,14 +379,14 @@ int ltt_session_enable(struct ltt_session *session) CMM_ACCESS_ONCE(session->active) = 1; CMM_ACCESS_ONCE(session->been_active) = 1; - ret = _ltt_session_metadata_statedump(session); + ret = _lttng_session_metadata_statedump(session); if (ret) CMM_ACCESS_ONCE(session->active) = 0; end: return ret; } -int ltt_session_disable(struct ltt_session *session) +int lttng_session_disable(struct lttng_session *session) { int ret = 0; @@ -399,7 +399,7 @@ end: return ret; } -int ltt_channel_enable(struct ltt_channel *channel) +int lttng_channel_enable(struct lttng_channel *channel) { int old; @@ -411,7 +411,7 @@ int ltt_channel_enable(struct ltt_channel *channel) return 0; } -int ltt_channel_disable(struct ltt_channel *channel) +int lttng_channel_disable(struct lttng_channel *channel) { int old; @@ -423,7 +423,7 @@ int ltt_channel_disable(struct ltt_channel *channel) return 0; } -int ltt_event_enable(struct ltt_event *event) +int lttng_event_enable(struct lttng_event *event) { int old; @@ -435,7 +435,7 @@ int ltt_event_enable(struct ltt_event *event) return 0; } -int ltt_event_disable(struct ltt_event *event) +int lttng_event_disable(struct lttng_event *event) { int old; @@ -447,7 +447,7 @@ int ltt_event_disable(struct ltt_event *event) return 0; } -struct ltt_channel *ltt_channel_create(struct ltt_session *session, +struct lttng_channel *lttng_channel_create(struct lttng_session *session, const char *transport_name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, @@ -455,14 +455,14 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, unsigned int read_timer_interval, int **shm_fd, int **wait_fd, uint64_t **memory_map_size, - struct ltt_channel *chan_priv_init) + struct lttng_channel *chan_priv_init) { - struct ltt_channel *chan = NULL; - struct ltt_transport *transport; + struct lttng_channel *chan = NULL; + struct lttng_transport *transport; if (session->been_active) goto active; /* Refuse to add channel to active session */ - transport = ltt_transport_find(transport_name); + transport = lttng_transport_find(transport_name); if (!transport) { DBG("LTTng transport %s not found\n", transport_name); @@ -496,7 +496,7 @@ active: * Only used internally at session destruction. */ static -void _ltt_channel_destroy(struct ltt_channel *chan) +void _lttng_channel_destroy(struct lttng_channel *chan) { cds_list_del(&chan->list); lttng_destroy_context(chan->ctx); @@ -506,12 +506,12 @@ void _ltt_channel_destroy(struct ltt_channel *chan) /* * Supports event creation while tracing session is active. */ -int ltt_event_create(struct ltt_channel *chan, +int lttng_event_create(struct lttng_channel *chan, struct lttng_ust_event *event_param, - struct ltt_event **_event) + struct lttng_event **_event) { const struct lttng_event_desc *desc = NULL; /* silence gcc */ - struct ltt_event *event; + struct lttng_event *event; int ret = 0; if (chan->used_event_id == -1U) { @@ -537,9 +537,9 @@ int ltt_event_create(struct ltt_channel *chan, * Check if loglevel match. Refuse to connect event if not. */ if (event_param->instrumentation == LTTNG_UST_TRACEPOINT) { - desc = ltt_event_get(event_param->name); + desc = lttng_event_get(event_param->name); if (desc) { - if (!ltt_loglevel_match(desc, + if (!lttng_loglevel_match(desc, event_param->loglevel_type, event_param->loglevel)) { ret = -EPERM; @@ -551,7 +551,7 @@ int ltt_event_create(struct ltt_channel *chan, * pending probes. */ } - event = zmalloc(sizeof(struct ltt_event)); + event = zmalloc(sizeof(struct lttng_event)); if (!event) { ret = -ENOMEM; goto cache_error; @@ -566,7 +566,7 @@ int ltt_event_create(struct ltt_channel *chan, CDS_INIT_LIST_HEAD(&event->filter_bytecode); CDS_INIT_LIST_HEAD(&event->bytecode_runtime); event->instrumentation = event_param->instrumentation; - /* Populate ltt_event structure before tracepoint registration. */ + /* Populate lttng_event structure before tracepoint registration. */ cmm_smp_wmb(); switch (event_param->instrumentation) { case LTTNG_UST_TRACEPOINT: @@ -595,7 +595,7 @@ int ltt_event_create(struct ltt_channel *chan, WARN_ON_ONCE(1); } if (event->desc) { - ret = _ltt_event_metadata_statedump(chan->session, chan, event); + ret = _lttng_event_metadata_statedump(chan->session, chan, event); if (ret) goto statedump_error; } @@ -608,7 +608,7 @@ statedump_error: WARN_ON_ONCE(__tracepoint_probe_unregister(event_param->name, event->desc->probe_callback, event)); - ltt_event_put(event->desc); + lttng_event_put(event->desc); } add_pending_error: register_error: @@ -623,7 +623,7 @@ full: /* * Only used internally at session destruction. */ -int _ltt_event_unregister(struct ltt_event *event) +int _lttng_event_unregister(struct lttng_event *event) { int ret = -EINVAL; @@ -650,12 +650,12 @@ int _ltt_event_unregister(struct ltt_event *event) * Only used internally at session destruction. */ static -void _ltt_event_destroy(struct ltt_event *event) +void _lttng_event_destroy(struct lttng_event *event) { switch (event->instrumentation) { case LTTNG_UST_TRACEPOINT: if (event->desc) { - ltt_event_put(event->desc); + lttng_event_put(event->desc); } break; default: @@ -674,11 +674,11 @@ void _ltt_event_destroy(struct ltt_event *event) * remaining space left in packet and write, since mutual exclusion * protects us from concurrent writes. */ -int lttng_metadata_printf(struct ltt_session *session, +int lttng_metadata_printf(struct lttng_session *session, const char *fmt, ...) { struct lttng_ust_lib_ring_buffer_ctx ctx; - struct ltt_channel *chan = session->metadata; + struct lttng_channel *chan = session->metadata; char *str = NULL; int ret = 0, waitret; size_t len, reserve_len, pos; @@ -730,7 +730,7 @@ end: } static -int _ltt_field_statedump(struct ltt_session *session, +int _lttng_field_statedump(struct lttng_session *session, const struct lttng_event_field *field) { int ret = 0; @@ -865,7 +865,7 @@ int _ltt_field_statedump(struct ltt_session *session, } static -int _ltt_context_metadata_statedump(struct ltt_session *session, +int _lttng_context_metadata_statedump(struct lttng_session *session, struct lttng_ctx *ctx) { int ret = 0; @@ -876,7 +876,7 @@ int _ltt_context_metadata_statedump(struct ltt_session *session, for (i = 0; i < ctx->nr_fields; i++) { const struct lttng_ctx_field *field = &ctx->fields[i]; - ret = _ltt_field_statedump(session, &field->event_field); + ret = _lttng_field_statedump(session, &field->event_field); if (ret) return ret; } @@ -884,8 +884,8 @@ int _ltt_context_metadata_statedump(struct ltt_session *session, } static -int _ltt_fields_metadata_statedump(struct ltt_session *session, - struct ltt_event *event) +int _lttng_fields_metadata_statedump(struct lttng_session *session, + struct lttng_event *event) { const struct lttng_event_desc *desc = event->desc; int ret = 0; @@ -894,7 +894,7 @@ int _ltt_fields_metadata_statedump(struct ltt_session *session, for (i = 0; i < desc->nr_fields; i++) { const struct lttng_event_field *field = &desc->fields[i]; - ret = _ltt_field_statedump(session, field); + ret = _lttng_field_statedump(session, field); if (ret) return ret; } @@ -902,9 +902,9 @@ int _ltt_fields_metadata_statedump(struct ltt_session *session, } static -int _ltt_event_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan, - struct ltt_event *event) +int _lttng_event_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan, + struct lttng_event *event) { int ret = 0; int loglevel = TRACE_DEFAULT; @@ -953,7 +953,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session, if (ret) goto end; } - ret = _ltt_context_metadata_statedump(session, event->ctx); + ret = _lttng_context_metadata_statedump(session, event->ctx); if (ret) goto end; if (event->ctx) { @@ -969,7 +969,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session, if (ret) goto end; - ret = _ltt_fields_metadata_statedump(session, event); + ret = _lttng_fields_metadata_statedump(session, event); if (ret) goto end; @@ -990,8 +990,8 @@ end: } static -int _ltt_channel_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan) +int _lttng_channel_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan) { int ret = 0; @@ -1018,7 +1018,7 @@ int _ltt_channel_metadata_statedump(struct ltt_session *session, if (ret) goto end; } - ret = _ltt_context_metadata_statedump(session, chan->ctx); + ret = _lttng_context_metadata_statedump(session, chan->ctx); if (ret) goto end; if (chan->ctx) { @@ -1037,7 +1037,7 @@ end: } static -int _ltt_stream_packet_context_declare(struct ltt_session *session) +int _lttng_stream_packet_context_declare(struct lttng_session *session) { return lttng_metadata_printf(session, "struct packet_context {\n" @@ -1061,7 +1061,7 @@ int _ltt_stream_packet_context_declare(struct ltt_session *session) * id 65535 is reserved to indicate an extended header. */ static -int _ltt_event_header_declare(struct ltt_session *session) +int _lttng_event_header_declare(struct lttng_session *session) { return lttng_metadata_printf(session, "struct event_header_compact {\n" @@ -1123,13 +1123,13 @@ uint64_t measure_clock_offset(void) * Output metadata into this session's metadata buffers. */ static -int _ltt_session_metadata_statedump(struct ltt_session *session) +int _lttng_session_metadata_statedump(struct lttng_session *session) { unsigned char *uuid_c = session->uuid; char uuid_s[LTTNG_UST_UUID_STR_LEN], clock_uuid_s[LTTNG_UST_UUID_STR_LEN]; - struct ltt_channel *chan; - struct ltt_event *event; + struct lttng_channel *chan; + struct lttng_event *event; int ret = 0; char procname[LTTNG_UST_PROCNAME_LEN] = ""; char hostname[HOST_NAME_MAX]; @@ -1266,23 +1266,23 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) if (ret) goto end; - ret = _ltt_stream_packet_context_declare(session); + ret = _lttng_stream_packet_context_declare(session); if (ret) goto end; - ret = _ltt_event_header_declare(session); + ret = _lttng_event_header_declare(session); if (ret) goto end; skip_session: cds_list_for_each_entry(chan, &session->chan, list) { - ret = _ltt_channel_metadata_statedump(session, chan); + ret = _lttng_channel_metadata_statedump(session, chan); if (ret) goto end; } cds_list_for_each_entry(event, &session->events, list) { - ret = _ltt_event_metadata_statedump(session, event->chan, event); + ret = _lttng_event_metadata_statedump(session, event->chan, event); if (ret) goto end; } @@ -1293,10 +1293,10 @@ end: void lttng_ust_events_exit(void) { - struct ltt_session *session, *tmpsession; + struct lttng_session *session, *tmpsession; cds_list_for_each_entry_safe(session, tmpsession, &sessions, list) - ltt_session_destroy(session); + lttng_session_destroy(session); } /* WILDCARDS */ @@ -1357,7 +1357,7 @@ int wildcard_is_within(struct wildcard_entry *e, * ust lock held. */ static -struct session_wildcard *add_wildcard(struct ltt_channel *chan, +struct session_wildcard *add_wildcard(struct lttng_channel *chan, struct lttng_ust_event *event_param) { struct wildcard_entry *e; @@ -1424,7 +1424,7 @@ struct session_wildcard *add_wildcard(struct ltt_channel *chan, cds_list_add(&sw->list, &chan->session->wildcards); cds_list_add(&sw->session_list, &e->session_list); sw->entry = e; - ltt_probes_create_wildcard_events(e, sw); + lttng_probes_create_wildcard_events(e, sw); return sw; } @@ -1435,7 +1435,7 @@ struct session_wildcard *add_wildcard(struct ltt_channel *chan, static void _remove_wildcard(struct session_wildcard *wildcard) { - struct ltt_event *ev, *tmp; + struct lttng_event *ev, *tmp; /* * Just remove the events owned (for enable/disable) by this @@ -1456,7 +1456,7 @@ void _remove_wildcard(struct session_wildcard *wildcard) free(wildcard); } -int ltt_wildcard_create(struct ltt_channel *chan, +int lttng_wildcard_create(struct lttng_channel *chan, struct lttng_ust_event *event_param, struct session_wildcard **_sw) { @@ -1471,20 +1471,20 @@ int ltt_wildcard_create(struct ltt_channel *chan, } static -void _ltt_wildcard_destroy(struct session_wildcard *sw) +void _lttng_wildcard_destroy(struct session_wildcard *sw) { _remove_wildcard(sw); } -int ltt_wildcard_enable(struct session_wildcard *wildcard) +int lttng_wildcard_enable(struct session_wildcard *wildcard) { - struct ltt_event *ev; + struct lttng_event *ev; int ret; if (wildcard->enabled) return -EEXIST; cds_list_for_each_entry(ev, &wildcard->events, wildcard_list) { - ret = ltt_event_enable(ev); + ret = lttng_event_enable(ev); if (ret) { DBG("Error: enable error.\n"); return ret; @@ -1494,15 +1494,15 @@ int ltt_wildcard_enable(struct session_wildcard *wildcard) return 0; } -int ltt_wildcard_disable(struct session_wildcard *wildcard) +int lttng_wildcard_disable(struct session_wildcard *wildcard) { - struct ltt_event *ev; + struct lttng_event *ev; int ret; if (!wildcard->enabled) return -EEXIST; cds_list_for_each_entry(ev, &wildcard->events, wildcard_list) { - ret = ltt_event_disable(ev); + ret = lttng_event_disable(ev); if (ret) { DBG("Error: disable error.\n"); return ret; diff --git a/liblttng-ust/lttng-filter.c b/liblttng-ust/lttng-filter.c index 6c3eda4b..c298addf 100644 --- a/liblttng-ust/lttng-filter.c +++ b/liblttng-ust/lttng-filter.c @@ -128,7 +128,7 @@ const char *print_op(enum filter_op op) } static -int apply_field_reloc(struct ltt_event *event, +int apply_field_reloc(struct lttng_event *event, struct bytecode_runtime *runtime, uint32_t runtime_len, uint32_t reloc_offset, @@ -216,7 +216,7 @@ int apply_field_reloc(struct ltt_event *event, static int bytecode_is_linked(struct lttng_ust_filter_bytecode_node *filter_bytecode, - struct ltt_event *event) + struct lttng_event *event) { struct lttng_bytecode_runtime *bc_runtime; @@ -232,7 +232,7 @@ int bytecode_is_linked(struct lttng_ust_filter_bytecode_node *filter_bytecode, * bytecode runtime. */ static -int _lttng_filter_event_link_bytecode(struct ltt_event *event, +int _lttng_filter_event_link_bytecode(struct lttng_event *event, struct lttng_ust_filter_bytecode_node *filter_bytecode) { int ret, offset, next_offset; @@ -303,7 +303,7 @@ link_error: return ret; } -void lttng_filter_event_link_bytecode(struct ltt_event *event) +void lttng_filter_event_link_bytecode(struct lttng_event *event) { struct lttng_ust_filter_bytecode_node *filter_bytecode; int ret; @@ -317,7 +317,7 @@ void lttng_filter_event_link_bytecode(struct ltt_event *event) } } -void lttng_filter_event_link_wildcard_bytecode(struct ltt_event *event, +void lttng_filter_event_link_wildcard_bytecode(struct lttng_event *event, struct session_wildcard *wildcard) { struct lttng_ust_filter_bytecode_node *filter_bytecode; @@ -339,7 +339,7 @@ void lttng_filter_event_link_wildcard_bytecode(struct ltt_event *event, */ void lttng_filter_wildcard_link_bytecode(struct session_wildcard *wildcard) { - struct ltt_event *event; + struct lttng_event *event; if (cds_list_empty(&wildcard->filter_bytecode)) return; @@ -354,7 +354,7 @@ void lttng_filter_wildcard_link_bytecode(struct session_wildcard *wildcard) * Need to attach filter to an event before starting tracing for the * session. We own the filter_bytecode if we return success. */ -int lttng_filter_event_attach_bytecode(struct ltt_event *event, +int lttng_filter_event_attach_bytecode(struct lttng_event *event, struct lttng_ust_filter_bytecode_node *filter_bytecode) { cds_list_add(&filter_bytecode->node, &event->filter_bytecode); @@ -372,7 +372,7 @@ int lttng_filter_wildcard_attach_bytecode(struct session_wildcard *wildcard, return 0; } -void lttng_free_event_filter_bytecode(struct ltt_event *event) +void lttng_free_event_filter_bytecode(struct lttng_event *event) { struct lttng_ust_filter_bytecode_node *filter_bytecode, *tmp; @@ -392,7 +392,7 @@ void lttng_free_wildcard_filter_bytecode(struct session_wildcard *wildcard) } } -void lttng_free_event_filter_runtime(struct ltt_event *event) +void lttng_free_event_filter_runtime(struct lttng_event *event) { struct bytecode_runtime *runtime, *tmp; diff --git a/liblttng-ust/ltt-probes.c b/liblttng-ust/lttng-probes.c similarity index 91% rename from liblttng-ust/ltt-probes.c rename to liblttng-ust/lttng-probes.c index aeb6db65..e473b989 100644 --- a/liblttng-ust/ltt-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -1,5 +1,5 @@ /* - * ltt-probes.c + * lttng-probes.c * * Holds LTTng probes registry. * @@ -31,7 +31,7 @@ #include #include -#include "ltt-tracer-core.h" +#include "lttng-tracer-core.h" #include "jhash.h" #include "error.h" @@ -68,7 +68,7 @@ const struct lttng_event_desc *find_event(const char *name) return NULL; } -int ltt_probe_register(struct lttng_probe_desc *desc) +int lttng_probe_register(struct lttng_probe_desc *desc) { struct lttng_probe_desc *iter; int ret = 0; @@ -124,7 +124,13 @@ end: return ret; } -void ltt_probe_unregister(struct lttng_probe_desc *desc) +/* Backward compatibility with UST 2.0 */ +int ltt_probe_register(struct lttng_probe_desc *desc) +{ + return lttng_probe_register(desc); +} + +void lttng_probe_unregister(struct lttng_probe_desc *desc) { ust_lock(); cds_list_del(&desc->head); @@ -132,10 +138,16 @@ void ltt_probe_unregister(struct lttng_probe_desc *desc) ust_unlock(); } +/* Backward compatibility with UST 2.0 */ +void ltt_probe_unregister(struct lttng_probe_desc *desc) +{ + lttng_probe_unregister(desc); +} + /* * called with UST lock held. */ -const struct lttng_event_desc *ltt_event_get(const char *name) +const struct lttng_event_desc *lttng_event_get(const char *name) { const struct lttng_event_desc *event; @@ -145,11 +157,11 @@ const struct lttng_event_desc *ltt_event_get(const char *name) return event; } -void ltt_event_put(const struct lttng_event_desc *event) +void lttng_event_put(const struct lttng_event_desc *event) { } -void ltt_probes_prune_event_list(struct lttng_ust_tracepoint_list *list) +void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list) { struct tp_list_entry *list_entry, *tmp; @@ -162,7 +174,7 @@ void ltt_probes_prune_event_list(struct lttng_ust_tracepoint_list *list) /* * called with UST lock held. */ -int ltt_probes_get_event_list(struct lttng_ust_tracepoint_list *list) +int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list) { struct lttng_probe_desc *probe_desc; int i; @@ -195,7 +207,7 @@ int ltt_probes_get_event_list(struct lttng_ust_tracepoint_list *list) return 0; err_nomem: - ltt_probes_prune_event_list(list); + lttng_probes_prune_event_list(list); return -ENOMEM; } @@ -219,7 +231,7 @@ struct lttng_ust_tracepoint_iter * return &entry->tp; } -void ltt_probes_prune_field_list(struct lttng_ust_field_list *list) +void lttng_probes_prune_field_list(struct lttng_ust_field_list *list) { struct tp_field_list_entry *list_entry, *tmp; @@ -232,7 +244,7 @@ void ltt_probes_prune_field_list(struct lttng_ust_field_list *list) /* * called with UST lock held. */ -int ltt_probes_get_field_list(struct lttng_ust_field_list *list) +int lttng_probes_get_field_list(struct lttng_ust_field_list *list) { struct lttng_probe_desc *probe_desc; int i; @@ -331,7 +343,7 @@ int ltt_probes_get_field_list(struct lttng_ust_field_list *list) return 0; err_nomem: - ltt_probes_prune_field_list(list); + lttng_probes_prune_field_list(list); return -ENOMEM; } @@ -359,7 +371,7 @@ struct lttng_ust_field_iter * * marshall all probes/all events and create those that fit the * wildcard. Add them to the events list as created. */ -void ltt_probes_create_wildcard_events(struct wildcard_entry *entry, +void lttng_probes_create_wildcard_events(struct wildcard_entry *entry, struct session_wildcard *wildcard) { struct lttng_probe_desc *probe_desc; @@ -378,14 +390,14 @@ void ltt_probes_create_wildcard_events(struct wildcard_entry *entry, && (strlen(entry->name) == 1 || !strncmp(event_desc->name, entry->name, strlen(entry->name) - 1))) { - if (ltt_loglevel_match(event_desc, + if (lttng_loglevel_match(event_desc, entry->loglevel_type, entry->loglevel)) { match = 1; } } if (match) { - struct ltt_event *ev; + struct lttng_event *ev; int ret; memcpy(&event_param, &wildcard->event_param, @@ -395,7 +407,7 @@ void ltt_probes_create_wildcard_events(struct wildcard_entry *entry, sizeof(event_param.name)); event_param.name[sizeof(event_param.name) - 1] = '\0'; /* create event */ - ret = ltt_event_create(wildcard->chan, + ret = lttng_event_create(wildcard->chan, &event_param, &ev); if (ret) { DBG("Error creating event"); diff --git a/liblttng-ust/ltt-ring-buffer-client-discard.c b/liblttng-ust/lttng-ring-buffer-client-discard.c similarity index 86% rename from liblttng-ust/ltt-ring-buffer-client-discard.c rename to liblttng-ust/lttng-ring-buffer-client-discard.c index 416984d4..0463864b 100644 --- a/liblttng-ust/ltt-ring-buffer-client-discard.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-discard.c + * lttng-ring-buffer-client-discard.c * * LTTng lib ring buffer client (discard mode). * @@ -21,14 +21,14 @@ */ #define _GNU_SOURCE -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard" #define RING_BUFFER_MODE_TEMPLATE_INIT \ - ltt_ring_buffer_client_discard_init + lttng_ring_buffer_client_discard_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ - ltt_ring_buffer_client_discard_exit + lttng_ring_buffer_client_discard_exit #define LTTNG_CLIENT_TYPE LTTNG_CLIENT_DISCARD #define LTTNG_CLIENT_CALLBACKS lttng_client_callbacks_discard -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" diff --git a/liblttng-ust/ltt-ring-buffer-client-overwrite.c b/liblttng-ust/lttng-ring-buffer-client-overwrite.c similarity index 86% rename from liblttng-ust/ltt-ring-buffer-client-overwrite.c rename to liblttng-ust/lttng-ring-buffer-client-overwrite.c index de9d613a..3d6fdabf 100644 --- a/liblttng-ust/ltt-ring-buffer-client-overwrite.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-overwrite.c + * lttng-ring-buffer-client-overwrite.c * * LTTng lib ring buffer client (overwrite mode). * @@ -21,14 +21,14 @@ */ #define _GNU_SOURCE -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite" #define RING_BUFFER_MODE_TEMPLATE_INIT \ - ltt_ring_buffer_client_overwrite_init + lttng_ring_buffer_client_overwrite_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ - ltt_ring_buffer_client_overwrite_exit + lttng_ring_buffer_client_overwrite_exit #define LTTNG_CLIENT_TYPE LTTNG_CLIENT_OVERWRITE #define LTTNG_CLIENT_CALLBACKS lttng_client_callbacks_overwrite -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" diff --git a/liblttng-ust/ltt-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h similarity index 79% rename from liblttng-ust/ltt-ring-buffer-client.h rename to liblttng-ust/lttng-ring-buffer-client.h index 0e329bad..ad77802f 100644 --- a/liblttng-ust/ltt-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client.h + * lttng-ring-buffer-client.h * * LTTng lib ring buffer client template. * @@ -25,7 +25,7 @@ #include "lttng/bitfield.h" #include "clock.h" #include "lttng-ust-uuid.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" #include "../libringbuffer/frontend_types.h" #define LTTNG_COMPACT_EVENT_BITS 5 @@ -84,7 +84,7 @@ size_t ctx_get_size(size_t offset, struct lttng_ctx *ctx) static inline void ctx_record(struct lttng_ust_lib_ring_buffer_ctx *bufctx, - struct ltt_channel *chan, + struct lttng_channel *chan, struct lttng_ctx *ctx) { int i; @@ -114,16 +114,16 @@ unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config * size_t *pre_header_padding, struct lttng_ust_lib_ring_buffer_ctx *ctx) { - struct ltt_channel *ltt_chan = channel_get_private(chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(chan); + struct lttng_event *event = ctx->priv; size_t orig_offset = offset; size_t padding; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ padding = lib_ring_buffer_align(offset, lttng_alignof(uint32_t)); offset += padding; - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { offset += sizeof(uint32_t); /* id and timestamp */ } else { /* Minimum space taken by LTTNG_COMPACT_EVENT_BITS id */ @@ -139,7 +139,7 @@ unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config * padding = lib_ring_buffer_align(offset, lttng_alignof(uint16_t)); offset += padding; offset += sizeof(uint16_t); - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { offset += lib_ring_buffer_align(offset, lttng_alignof(uint32_t)); offset += sizeof(uint32_t); /* timestamp */ } else { @@ -155,7 +155,7 @@ unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config * WARN_ON_ONCE(1); } offset += ctx_get_size(offset, event->ctx); - offset += ctx_get_size(offset, ltt_chan->ctx); + offset += ctx_get_size(offset, lttng_chan->ctx); *pre_header_padding = padding; return offset - orig_offset; @@ -164,12 +164,12 @@ unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config * #include "../libringbuffer/api.h" static -void ltt_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config *config, +void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id); /* - * ltt_write_event_header + * lttng_write_event_header * * Writes the event header to the offset (already aligned on 32-bits). * @@ -178,17 +178,17 @@ void ltt_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config * * @event_id: event ID */ static __inline__ -void ltt_write_event_header(const struct lttng_ust_lib_ring_buffer_config *config, +void lttng_write_event_header(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); + struct lttng_event *event = ctx->priv; if (caa_unlikely(ctx->rflags)) goto slow_path; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ { uint32_t id_time = 0; @@ -218,27 +218,27 @@ void ltt_write_event_header(const struct lttng_ust_lib_ring_buffer_config *confi WARN_ON_ONCE(1); } - ctx_record(ctx, ltt_chan, ltt_chan->ctx); - ctx_record(ctx, ltt_chan, event->ctx); + ctx_record(ctx, lttng_chan, lttng_chan->ctx); + ctx_record(ctx, lttng_chan, event->ctx); lib_ring_buffer_align_ctx(ctx, ctx->largest_align); return; slow_path: - ltt_write_event_header_slow(config, ctx, event_id); + lttng_write_event_header_slow(config, ctx, event_id); } static -void ltt_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config *config, +void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); + struct lttng_event *event = ctx->priv; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { uint32_t id_time = 0; bt_bitfield_write(&id_time, uint32_t, @@ -268,7 +268,7 @@ void ltt_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config * break; case 2: /* large */ { - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { uint32_t timestamp = (uint32_t) ctx->tsc; uint16_t id = event_id; @@ -291,8 +291,8 @@ void ltt_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config * default: WARN_ON_ONCE(1); } - ctx_record(ctx, ltt_chan, ltt_chan->ctx); - ctx_record(ctx, ltt_chan, event->ctx); + ctx_record(ctx, lttng_chan, lttng_chan->ctx); + ctx_record(ctx, lttng_chan, event->ctx); lib_ring_buffer_align_ctx(ctx, ctx->largest_align); } @@ -335,11 +335,11 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t lib_ring_buffer_offset_address(&buf->backend, subbuf_idx * chan->backend.subbuf_size, handle); - struct ltt_channel *ltt_chan = channel_get_private(chan); + struct lttng_channel *lttng_chan = channel_get_private(chan); header->magic = CTF_MAGIC_NUMBER; - memcpy(header->uuid, ltt_chan->uuid, sizeof(ltt_chan->uuid)); - header->stream_id = ltt_chan->id; + memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid)); + header->stream_id = lttng_chan->id; header->ctx.timestamp_begin = tsc; header->ctx.timestamp_end = 0; header->ctx.content_size = ~0ULL; /* for debugging */ @@ -410,41 +410,41 @@ static const struct lttng_ust_lib_ring_buffer_config client_config = { const struct lttng_ust_lib_ring_buffer_client_cb *LTTNG_CLIENT_CALLBACKS = &client_config.cb; static -struct ltt_channel *_channel_create(const char *name, +struct lttng_channel *_channel_create(const char *name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval, int **shm_fd, int **wait_fd, uint64_t **memory_map_size, - struct ltt_channel *chan_priv_init) + struct lttng_channel *chan_priv_init) { void *priv; - struct ltt_channel *ltt_chan = NULL; + struct lttng_channel *lttng_chan = NULL; struct lttng_ust_shm_handle *handle; handle = channel_create(&client_config, name, - &priv, __alignof__(*ltt_chan), sizeof(*ltt_chan), + &priv, __alignof__(*lttng_chan), sizeof(*lttng_chan), chan_priv_init, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval, shm_fd, wait_fd, memory_map_size); if (!handle) return NULL; - ltt_chan = priv; - ltt_chan->handle = handle; - ltt_chan->chan = shmp(ltt_chan->handle, ltt_chan->handle->chan); - return ltt_chan; + lttng_chan = priv; + lttng_chan->handle = handle; + lttng_chan->chan = shmp(lttng_chan->handle, lttng_chan->handle->chan); + return lttng_chan; } static -void ltt_channel_destroy(struct ltt_channel *ltt_chan) +void lttng_channel_destroy(struct lttng_channel *lttng_chan) { - channel_destroy(ltt_chan->chan, ltt_chan->handle, 0); + channel_destroy(lttng_chan->chan, lttng_chan->handle, 0); } static -struct lttng_ust_lib_ring_buffer *ltt_buffer_read_open(struct channel *chan, +struct lttng_ust_lib_ring_buffer *lttng_buffer_read_open(struct channel *chan, struct lttng_ust_shm_handle *handle, int **shm_fd, int **wait_fd, uint64_t **memory_map_size) @@ -463,17 +463,17 @@ struct lttng_ust_lib_ring_buffer *ltt_buffer_read_open(struct channel *chan, } static -void ltt_buffer_read_close(struct lttng_ust_lib_ring_buffer *buf, +void lttng_buffer_read_close(struct lttng_ust_lib_ring_buffer *buf, struct lttng_ust_shm_handle *handle) { lib_ring_buffer_release_read(buf, handle, 0); } static -int ltt_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, +int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); int ret, cpu; cpu = lib_ring_buffer_get_cpu(&client_config); @@ -481,14 +481,14 @@ int ltt_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, return -EPERM; ctx->cpu = cpu; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ if (event_id > 30) - ctx->rflags |= LTT_RFLAG_EXTENDED; + ctx->rflags |= LTTNG_RFLAG_EXTENDED; break; case 2: /* large */ if (event_id > 65534) - ctx->rflags |= LTT_RFLAG_EXTENDED; + ctx->rflags |= LTTNG_RFLAG_EXTENDED; break; default: WARN_ON_ONCE(1); @@ -497,7 +497,7 @@ int ltt_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, ret = lib_ring_buffer_reserve(&client_config, ctx); if (ret) goto put; - ltt_write_event_header(&client_config, ctx, event_id); + lttng_write_event_header(&client_config, ctx, event_id); return 0; put: lib_ring_buffer_put_cpu(&client_config); @@ -505,14 +505,14 @@ put: } static -void ltt_event_commit(struct lttng_ust_lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lttng_ust_lib_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); lib_ring_buffer_put_cpu(&client_config); } static -void ltt_event_write(struct lttng_ust_lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lttng_ust_lib_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); @@ -520,32 +520,32 @@ void ltt_event_write(struct lttng_ust_lib_ring_buffer_ctx *ctx, const void *src, #if 0 static -wait_queue_head_t *ltt_get_reader_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_reader_wait_queue(struct channel *chan) { return &chan->read_wait; } static -wait_queue_head_t *ltt_get_hp_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_hp_wait_queue(struct channel *chan) { return &chan->hp_wait; } #endif //0 static -int ltt_is_finalized(struct channel *chan) +int lttng_is_finalized(struct channel *chan) { return lib_ring_buffer_channel_is_finalized(chan); } static -int ltt_is_disabled(struct channel *chan) +int lttng_is_disabled(struct channel *chan) { return lib_ring_buffer_channel_is_disabled(chan); } static -int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) +int lttng_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) { struct lttng_ust_lib_ring_buffer *buf; int cpu; @@ -563,33 +563,33 @@ int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) return 0; } -static struct ltt_transport ltt_relay_transport = { +static struct lttng_transport lttng_relay_transport = { .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap", .ops = { .channel_create = _channel_create, - .channel_destroy = ltt_channel_destroy, - .buffer_read_open = ltt_buffer_read_open, - .buffer_read_close = ltt_buffer_read_close, - .event_reserve = ltt_event_reserve, - .event_commit = ltt_event_commit, - .event_write = ltt_event_write, + .channel_destroy = lttng_channel_destroy, + .buffer_read_open = lttng_buffer_read_open, + .buffer_read_close = lttng_buffer_read_close, + .event_reserve = lttng_event_reserve, + .event_commit = lttng_event_commit, + .event_write = lttng_event_write, .packet_avail_size = NULL, /* Would be racy anyway */ - //.get_reader_wait_queue = ltt_get_reader_wait_queue, - //.get_hp_wait_queue = ltt_get_hp_wait_queue, - .is_finalized = ltt_is_finalized, - .is_disabled = ltt_is_disabled, - .flush_buffer = ltt_flush_buffer, + //.get_reader_wait_queue = lttng_get_reader_wait_queue, + //.get_hp_wait_queue = lttng_get_hp_wait_queue, + .is_finalized = lttng_is_finalized, + .is_disabled = lttng_is_disabled, + .flush_buffer = lttng_flush_buffer, }, }; void RING_BUFFER_MODE_TEMPLATE_INIT(void) { DBG("LTT : ltt ring buffer client init\n"); - ltt_transport_register(<t_relay_transport); + lttng_transport_register(<tng_relay_transport); } void RING_BUFFER_MODE_TEMPLATE_EXIT(void) { DBG("LTT : ltt ring buffer client exit\n"); - ltt_transport_unregister(<t_relay_transport); + lttng_transport_unregister(<tng_relay_transport); } diff --git a/liblttng-ust/ltt-ring-buffer-metadata-client.c b/liblttng-ust/lttng-ring-buffer-metadata-client.c similarity index 85% rename from liblttng-ust/ltt-ring-buffer-metadata-client.c rename to liblttng-ust/lttng-ring-buffer-metadata-client.c index cc72a7fe..126c0488 100644 --- a/liblttng-ust/ltt-ring-buffer-metadata-client.c +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-metadata-client.c + * lttng-ring-buffer-metadata-client.c * * LTTng lib ring buffer metadta client. * @@ -21,14 +21,14 @@ */ #define _GNU_SOURCE -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "metadata" #define RING_BUFFER_MODE_TEMPLATE_INIT \ - ltt_ring_buffer_metadata_client_init + lttng_ring_buffer_metadata_client_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ - ltt_ring_buffer_metadata_client_exit + lttng_ring_buffer_metadata_client_exit #define LTTNG_CLIENT_TYPE LTTNG_CLIENT_METADATA #define LTTNG_CLIENT_CALLBACKS lttng_client_callbacks_metadata -#include "ltt-ring-buffer-metadata-client.h" +#include "lttng-ring-buffer-metadata-client.h" diff --git a/liblttng-ust/ltt-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h similarity index 79% rename from liblttng-ust/ltt-ring-buffer-metadata-client.h rename to liblttng-ust/lttng-ring-buffer-metadata-client.h index acc56fdd..8bffe547 100644 --- a/liblttng-ust/ltt-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client.h + * lttng-ring-buffer-client.h * * LTTng lib ring buffer client template. * @@ -23,7 +23,7 @@ #include #include #include "lttng/bitfield.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" #include "../libringbuffer/frontend_types.h" struct metadata_packet_header { @@ -98,10 +98,10 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t lib_ring_buffer_offset_address(&buf->backend, subbuf_idx * chan->backend.subbuf_size, handle); - struct ltt_channel *ltt_chan = channel_get_private(chan); + struct lttng_channel *lttng_chan = channel_get_private(chan); header->magic = TSDL_MAGIC_NUMBER; - memcpy(header->uuid, ltt_chan->uuid, sizeof(ltt_chan->uuid)); + memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid)); header->checksum = 0; /* 0 if unused */ header->content_size = 0xFFFFFFFF; /* in bits, for debugging */ header->packet_size = 0xFFFFFFFF; /* in bits, for debugging */ @@ -178,41 +178,41 @@ static const struct lttng_ust_lib_ring_buffer_config client_config = { const struct lttng_ust_lib_ring_buffer_client_cb *LTTNG_CLIENT_CALLBACKS = &client_config.cb; static -struct ltt_channel *_channel_create(const char *name, +struct lttng_channel *_channel_create(const char *name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval, int **shm_fd, int **wait_fd, uint64_t **memory_map_size, - struct ltt_channel *chan_priv_init) + struct lttng_channel *chan_priv_init) { void *priv; - struct ltt_channel *ltt_chan = NULL; + struct lttng_channel *lttng_chan = NULL; struct lttng_ust_shm_handle *handle; handle = channel_create(&client_config, name, - &priv, __alignof__(*ltt_chan), sizeof(*ltt_chan), + &priv, __alignof__(*lttng_chan), sizeof(*lttng_chan), chan_priv_init, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval, shm_fd, wait_fd, memory_map_size); if (!handle) return NULL; - ltt_chan = priv; - ltt_chan->handle = handle; - ltt_chan->chan = shmp(ltt_chan->handle, ltt_chan->handle->chan); - return ltt_chan; + lttng_chan = priv; + lttng_chan->handle = handle; + lttng_chan->chan = shmp(lttng_chan->handle, lttng_chan->handle->chan); + return lttng_chan; } static -void ltt_channel_destroy(struct ltt_channel *ltt_chan) +void lttng_channel_destroy(struct lttng_channel *lttng_chan) { - channel_destroy(ltt_chan->chan, ltt_chan->handle, 0); + channel_destroy(lttng_chan->chan, lttng_chan->handle, 0); } static -struct lttng_ust_lib_ring_buffer *ltt_buffer_read_open(struct channel *chan, +struct lttng_ust_lib_ring_buffer *lttng_buffer_read_open(struct channel *chan, struct lttng_ust_shm_handle *handle, int **shm_fd, int **wait_fd, uint64_t **memory_map_size) @@ -227,33 +227,33 @@ struct lttng_ust_lib_ring_buffer *ltt_buffer_read_open(struct channel *chan, } static -void ltt_buffer_read_close(struct lttng_ust_lib_ring_buffer *buf, +void lttng_buffer_read_close(struct lttng_ust_lib_ring_buffer *buf, struct lttng_ust_shm_handle *handle) { lib_ring_buffer_release_read(buf, handle, 0); } static -int ltt_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id) +int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx, uint32_t event_id) { return lib_ring_buffer_reserve(&client_config, ctx); } static -void ltt_event_commit(struct lttng_ust_lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lttng_ust_lib_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); } static -void ltt_event_write(struct lttng_ust_lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lttng_ust_lib_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -size_t ltt_packet_avail_size(struct channel *chan, struct lttng_ust_shm_handle *handle) +size_t lttng_packet_avail_size(struct channel *chan, struct lttng_ust_shm_handle *handle) { unsigned long o_begin; @@ -271,32 +271,32 @@ size_t ltt_packet_avail_size(struct channel *chan, struct lttng_ust_shm_handle * #if 0 static -wait_queue_head_t *ltt_get_reader_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_reader_wait_queue(struct channel *chan) { return &chan->read_wait; } static -wait_queue_head_t *ltt_get_hp_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_hp_wait_queue(struct channel *chan) { return &chan->hp_wait; } #endif //0 static -int ltt_is_finalized(struct channel *chan) +int lttng_is_finalized(struct channel *chan) { return lib_ring_buffer_channel_is_finalized(chan); } static -int ltt_is_disabled(struct channel *chan) +int lttng_is_disabled(struct channel *chan) { return lib_ring_buffer_channel_is_disabled(chan); } static -int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) +int lttng_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) { struct lttng_ust_lib_ring_buffer *buf; int *shm_fd, *wait_fd; @@ -310,33 +310,33 @@ int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle) return 0; } -static struct ltt_transport ltt_relay_transport = { +static struct lttng_transport lttng_relay_transport = { .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap", .ops = { .channel_create = _channel_create, - .channel_destroy = ltt_channel_destroy, - .buffer_read_open = ltt_buffer_read_open, - .buffer_read_close = ltt_buffer_read_close, - .event_reserve = ltt_event_reserve, - .event_commit = ltt_event_commit, - .event_write = ltt_event_write, - .packet_avail_size = ltt_packet_avail_size, - //.get_reader_wait_queue = ltt_get_reader_wait_queue, - //.get_hp_wait_queue = ltt_get_hp_wait_queue, - .is_finalized = ltt_is_finalized, - .is_disabled = ltt_is_disabled, - .flush_buffer = ltt_flush_buffer, + .channel_destroy = lttng_channel_destroy, + .buffer_read_open = lttng_buffer_read_open, + .buffer_read_close = lttng_buffer_read_close, + .event_reserve = lttng_event_reserve, + .event_commit = lttng_event_commit, + .event_write = lttng_event_write, + .packet_avail_size = lttng_packet_avail_size, + //.get_reader_wait_queue = lttng_get_reader_wait_queue, + //.get_hp_wait_queue = lttng_get_hp_wait_queue, + .is_finalized = lttng_is_finalized, + .is_disabled = lttng_is_disabled, + .flush_buffer = lttng_flush_buffer, }, }; void RING_BUFFER_MODE_TEMPLATE_INIT(void) { DBG("LTT : ltt ring buffer client init\n"); - ltt_transport_register(<t_relay_transport); + lttng_transport_register(<tng_relay_transport); } void RING_BUFFER_MODE_TEMPLATE_EXIT(void) { DBG("LTT : ltt ring buffer client exit\n"); - ltt_transport_unregister(<t_relay_transport); + lttng_transport_unregister(<tng_relay_transport); } diff --git a/liblttng-ust/ltt-tracer-core.h b/liblttng-ust/lttng-tracer-core.h similarity index 88% rename from liblttng-ust/ltt-tracer-core.h rename to liblttng-ust/lttng-tracer-core.h index 34c5557a..09289c33 100644 --- a/liblttng-ust/ltt-tracer-core.h +++ b/liblttng-ust/lttng-tracer-core.h @@ -1,5 +1,5 @@ -#ifndef _LTT_TRACER_CORE_H -#define _LTT_TRACER_CORE_H +#ifndef _LTTNG_TRACER_CORE_H +#define _LTTNG_TRACER_CORE_H /* * Copyright (C) 2005-2011 Mathieu Desnoyers @@ -30,9 +30,9 @@ #include #include -struct ltt_session; -struct ltt_channel; -struct ltt_event; +struct lttng_session; +struct lttng_channel; +struct lttng_event; void ust_lock(void); void ust_unlock(void); @@ -41,4 +41,4 @@ void lttng_fixup_event_tls(void); void lttng_fixup_vtid_tls(void); void lttng_fixup_procname_tls(void); -#endif /* _LTT_TRACER_CORE_H */ +#endif /* _LTTNG_TRACER_CORE_H */ diff --git a/liblttng-ust/ltt-tracer.h b/liblttng-ust/lttng-tracer.h similarity index 80% rename from liblttng-ust/ltt-tracer.h rename to liblttng-ust/lttng-tracer.h index e3593b18..1bc97bc3 100644 --- a/liblttng-ust/ltt-tracer.h +++ b/liblttng-ust/lttng-tracer.h @@ -1,5 +1,5 @@ -#ifndef _LTT_TRACER_H -#define _LTT_TRACER_H +#ifndef _LTTNG_TRACER_H +#define _LTTNG_TRACER_H /* * Copyright (C) 2005-2011 Mathieu Desnoyers @@ -26,13 +26,9 @@ #include #include #include -#include "ltt-tracer-core.h" +#include "lttng-tracer-core.h" #include "compat.h" -/* Number of bytes to log with a read/write event */ -#define LTT_LOG_RW_SIZE 32L -#define LTT_MAX_SMALL_SIZE 0xFFFFU - /* Tracer properties */ #define CTF_MAGIC_NUMBER 0xC1FC1FC1 #define TSDL_MAGIC_NUMBER 0x75D11D57 @@ -47,7 +43,7 @@ */ #define LTTNG_METADATA_TIMEOUT_MSEC 10000 -#define LTT_RFLAG_EXTENDED RING_BUFFER_RFLAG_END -#define LTT_RFLAG_END (LTT_RFLAG_EXTENDED << 1) +#define LTTNG_RFLAG_EXTENDED RING_BUFFER_RFLAG_END +#define LTTNG_RFLAG_END (LTTNG_RFLAG_EXTENDED << 1) -#endif /* _LTT_TRACER_H */ +#endif /* _LTTNG_TRACER_H */ diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 56d588a8..9b0143cd 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -47,7 +47,7 @@ #include "tracepoint-internal.h" #include #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" static int lttng_ust_abi_close_in_progress; @@ -262,10 +262,10 @@ int lttng_abi_create_root_handle(void) static int lttng_abi_create_session(void *owner) { - struct ltt_session *session; + struct lttng_session *session; int session_objd, ret; - session = ltt_session_create(); + session = lttng_session_create(); if (!session) return -ENOMEM; session_objd = objd_alloc(session, <tng_session_ops, owner); @@ -277,7 +277,7 @@ int lttng_abi_create_session(void *owner) return session_objd; objd_error: - ltt_session_destroy(session); + lttng_session_destroy(session); return ret; } @@ -294,7 +294,7 @@ long lttng_abi_tracer_version(int objd, static long lttng_abi_add_context(int objd, struct lttng_ust_context *context_param, - struct lttng_ctx **ctx, struct ltt_session *session) + struct lttng_ctx **ctx, struct lttng_session *session) { if (session->been_active) return -EPERM; @@ -370,21 +370,21 @@ static const struct lttng_ust_objd_ops lttng_ops = { static void lttng_metadata_create_events(int channel_objd) { - struct ltt_channel *channel = objd_private(channel_objd); + struct lttng_channel *channel = objd_private(channel_objd); static struct lttng_ust_event metadata_params = { .instrumentation = LTTNG_UST_TRACEPOINT, .name = "lttng_ust:metadata", .loglevel_type = LTTNG_UST_LOGLEVEL_ALL, .loglevel = TRACE_DEFAULT, }; - struct ltt_event *event; + struct lttng_event *event; int ret; /* * We tolerate no failure path after event creation. It will stay * invariant for the rest of the session. */ - ret = ltt_event_create(channel, &metadata_params, &event); + ret = lttng_event_create(channel, &metadata_params, &event); if (ret < 0) { goto create_error; } @@ -401,13 +401,13 @@ int lttng_abi_create_channel(int session_objd, union ust_args *uargs, void *owner) { - struct ltt_session *session = objd_private(session_objd); + struct lttng_session *session = objd_private(session_objd); const struct lttng_ust_objd_ops *ops; const char *transport_name; - struct ltt_channel *chan; + struct lttng_channel *chan; int chan_objd; int ret = 0; - struct ltt_channel chan_priv_init; + struct lttng_channel chan_priv_init; switch (channel_type) { case PER_CPU_CHANNEL: @@ -443,7 +443,7 @@ int lttng_abi_create_channel(int session_objd, * We tolerate no failure path after channel creation. It will stay * invariant for the rest of the session. */ - chan = ltt_channel_create(session, transport_name, NULL, + chan = lttng_channel_create(session, transport_name, NULL, chan_param->subbuf_size, chan_param->num_subbuf, chan_param->switch_timer_interval, @@ -503,7 +503,7 @@ static long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg, union ust_args *uargs, void *owner) { - struct ltt_session *session = objd_private(objd); + struct lttng_session *session = objd_private(objd); switch (cmd) { case LTTNG_UST_CHANNEL: @@ -512,10 +512,10 @@ long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg, PER_CPU_CHANNEL, uargs, owner); case LTTNG_UST_SESSION_START: case LTTNG_UST_ENABLE: - return ltt_session_enable(session); + return lttng_session_enable(session); case LTTNG_UST_SESSION_STOP: case LTTNG_UST_DISABLE: - return ltt_session_disable(session); + return lttng_session_disable(session); case LTTNG_UST_METADATA: return lttng_abi_create_channel(objd, (struct lttng_ust_channel *) arg, @@ -536,10 +536,10 @@ long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg, static int lttng_release_session(int objd) { - struct ltt_session *session = objd_private(objd); + struct lttng_session *session = objd_private(objd); if (session) { - ltt_session_destroy(session); + lttng_session_destroy(session); return 0; } else { return -EINVAL; @@ -596,7 +596,7 @@ int lttng_abi_tracepoint_list(void *owner) objd_set_private(list_objd, list); /* populate list by walking on all registered probes. */ - ret = ltt_probes_get_event_list(list); + ret = lttng_probes_get_event_list(list); if (ret) { goto list_error; } @@ -621,7 +621,7 @@ int lttng_release_tracepoint_list(int objd) struct lttng_ust_tracepoint_list *list = objd_private(objd); if (list) { - ltt_probes_prune_event_list(list); + lttng_probes_prune_event_list(list); free(list); return 0; } else { @@ -678,7 +678,7 @@ int lttng_abi_tracepoint_field_list(void *owner) objd_set_private(list_objd, list); /* populate list by walking on all registered probes. */ - ret = ltt_probes_get_field_list(list); + ret = lttng_probes_get_field_list(list); if (ret) { goto list_error; } @@ -703,7 +703,7 @@ int lttng_release_tracepoint_field_list(int objd) struct lttng_ust_field_list *list = objd_private(objd); if (list) { - ltt_probes_prune_field_list(list); + lttng_probes_prune_field_list(list); free(list); return 0; } else { @@ -718,14 +718,14 @@ static const struct lttng_ust_objd_ops lttng_tracepoint_field_list_ops = { struct stream_priv_data { struct lttng_ust_lib_ring_buffer *buf; - struct ltt_channel *ltt_chan; + struct lttng_channel *lttng_chan; }; static int lttng_abi_open_stream(int channel_objd, struct lttng_ust_stream *info, union ust_args *uargs, void *owner) { - struct ltt_channel *channel = objd_private(channel_objd); + struct lttng_channel *channel = objd_private(channel_objd); struct lttng_ust_lib_ring_buffer *buf; struct stream_priv_data *priv; int stream_objd, ret; @@ -743,7 +743,7 @@ int lttng_abi_open_stream(int channel_objd, struct lttng_ust_stream *info, goto alloc_error; } priv->buf = buf; - priv->ltt_chan = channel; + priv->lttng_chan = channel; stream_objd = objd_alloc(priv, &lib_ring_buffer_objd_ops, owner); if (stream_objd < 0) { ret = stream_objd; @@ -765,8 +765,8 @@ int lttng_abi_create_event(int channel_objd, struct lttng_ust_event *event_param, void *owner) { - struct ltt_channel *channel = objd_private(channel_objd); - struct ltt_event *event; + struct lttng_channel *channel = objd_private(channel_objd); + struct lttng_event *event; int event_objd, ret; event_param->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0'; @@ -779,7 +779,7 @@ int lttng_abi_create_event(int channel_objd, * We tolerate no failure path after event creation. It will stay * invariant for the rest of the session. */ - ret = ltt_event_create(channel, event_param, &event); + ret = lttng_event_create(channel, event_param, &event); if (ret < 0) { goto event_error; } @@ -804,7 +804,7 @@ int lttng_abi_create_wildcard(int channel_objd, struct lttng_ust_event *event_param, void *owner) { - struct ltt_channel *channel = objd_private(channel_objd); + struct lttng_channel *channel = objd_private(channel_objd); struct session_wildcard *wildcard; int wildcard_objd, ret; @@ -818,7 +818,7 @@ int lttng_abi_create_wildcard(int channel_objd, * We tolerate no failure path after wildcard creation. It will * stay invariant for the rest of the session. */ - ret = ltt_wildcard_create(channel, event_param, &wildcard); + ret = lttng_wildcard_create(channel, event_param, &wildcard); if (ret < 0) { goto wildcard_error; } @@ -866,7 +866,7 @@ static long lttng_channel_cmd(int objd, unsigned int cmd, unsigned long arg, union ust_args *uargs, void *owner) { - struct ltt_channel *channel = objd_private(objd); + struct lttng_channel *channel = objd_private(objd); switch (cmd) { case LTTNG_UST_STREAM: @@ -895,9 +895,9 @@ long lttng_channel_cmd(int objd, unsigned int cmd, unsigned long arg, (struct lttng_ust_context *) arg, &channel->ctx, channel->session); case LTTNG_UST_ENABLE: - return ltt_channel_enable(channel); + return lttng_channel_enable(channel); case LTTNG_UST_DISABLE: - return ltt_channel_disable(channel); + return lttng_channel_disable(channel); case LTTNG_UST_FLUSH_BUFFER: return channel->ops->flush_buffer(channel->chan, channel->handle); default: @@ -924,7 +924,7 @@ static long lttng_metadata_cmd(int objd, unsigned int cmd, unsigned long arg, union ust_args *uargs, void *owner) { - struct ltt_channel *channel = objd_private(objd); + struct lttng_channel *channel = objd_private(objd); switch (cmd) { case LTTNG_UST_STREAM: @@ -951,7 +951,7 @@ long lttng_metadata_cmd(int objd, unsigned int cmd, unsigned long arg, */ unsigned int lttng_channel_poll(struct file *file, poll_table *wait) { - struct ltt_channel *channel = file->private_data; + struct lttng_channel *channel = file->private_data; unsigned int mask = 0; if (file->f_mode & FMODE_READ) { @@ -975,7 +975,7 @@ unsigned int lttng_channel_poll(struct file *file, poll_table *wait) static int lttng_channel_release(int objd) { - struct ltt_channel *channel = objd_private(objd); + struct lttng_channel *channel = objd_private(objd); if (channel) return lttng_ust_objd_unref(channel->session->objd); @@ -1020,11 +1020,11 @@ int lttng_rb_release(int objd) { struct stream_priv_data *priv = objd_private(objd); struct lttng_ust_lib_ring_buffer *buf; - struct ltt_channel *channel; + struct lttng_channel *channel; if (priv) { buf = priv->buf; - channel = priv->ltt_chan; + channel = priv->lttng_chan; free(priv); /* * If we are at ABI exit, we don't want to close the @@ -1075,7 +1075,7 @@ static long lttng_event_cmd(int objd, unsigned int cmd, unsigned long arg, union ust_args *uargs, void *owner) { - struct ltt_event *event = objd_private(objd); + struct lttng_event *event = objd_private(objd); switch (cmd) { case LTTNG_UST_CONTEXT: @@ -1083,9 +1083,9 @@ long lttng_event_cmd(int objd, unsigned int cmd, unsigned long arg, (struct lttng_ust_context *) arg, &event->ctx, event->chan->session); case LTTNG_UST_ENABLE: - return ltt_event_enable(event); + return lttng_event_enable(event); case LTTNG_UST_DISABLE: - return ltt_event_disable(event); + return lttng_event_disable(event); case LTTNG_UST_FILTER: { int ret; @@ -1104,7 +1104,7 @@ long lttng_event_cmd(int objd, unsigned int cmd, unsigned long arg, static int lttng_event_release(int objd) { - struct ltt_event *event = objd_private(objd); + struct lttng_event *event = objd_private(objd); if (event) return lttng_ust_objd_unref(event->chan->objd); @@ -1152,9 +1152,9 @@ long lttng_wildcard_cmd(int objd, unsigned int cmd, unsigned long arg, &wildcard->ctx, wildcard->chan->session); #endif case LTTNG_UST_ENABLE: - return ltt_wildcard_enable(wildcard); + return lttng_wildcard_enable(wildcard); case LTTNG_UST_DISABLE: - return ltt_wildcard_disable(wildcard); + return lttng_wildcard_disable(wildcard); case LTTNG_UST_FILTER: { int ret; diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 58461462..98483cb8 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -46,7 +46,7 @@ #include #include #include "tracepoint-internal.h" -#include "ltt-tracer-core.h" +#include "lttng-tracer-core.h" #include "compat.h" #include "../libringbuffer/tlsfixup.h" @@ -131,12 +131,12 @@ struct sock_info local_apps = { static int wait_poll_fallback; -extern void ltt_ring_buffer_client_overwrite_init(void); -extern void ltt_ring_buffer_client_discard_init(void); -extern void ltt_ring_buffer_metadata_client_init(void); -extern void ltt_ring_buffer_client_overwrite_exit(void); -extern void ltt_ring_buffer_client_discard_exit(void); -extern void ltt_ring_buffer_metadata_client_exit(void); +extern void lttng_ring_buffer_client_overwrite_init(void); +extern void lttng_ring_buffer_client_discard_init(void); +extern void lttng_ring_buffer_metadata_client_init(void); +extern void lttng_ring_buffer_client_overwrite_exit(void); +extern void lttng_ring_buffer_client_discard_exit(void); +extern void lttng_ring_buffer_metadata_client_exit(void); /* * Force a read (imply TLS fixup for dlopen) of TLS variables. @@ -882,7 +882,7 @@ restart: len = ustcomm_recv_unix_sock(sock, &lum, sizeof(lum)); switch (len) { case 0: /* orderly shutdown */ - DBG("%s ltt-sessiond has performed an orderly shutdown", sock_info->name); + DBG("%s lttng-sessiond has performed an orderly shutdown", sock_info->name); ust_lock(); /* * Either sessiond has shutdown or refused us by closing the socket. @@ -1003,9 +1003,9 @@ void __attribute__((constructor)) lttng_ust_init(void) */ init_usterr(); init_tracepoint(); - ltt_ring_buffer_metadata_client_init(); - ltt_ring_buffer_client_overwrite_init(); - ltt_ring_buffer_client_discard_init(); + lttng_ring_buffer_metadata_client_init(); + lttng_ring_buffer_client_overwrite_init(); + lttng_ring_buffer_client_discard_init(); timeout_mode = get_timeout(&constructor_timeout); @@ -1069,7 +1069,7 @@ void __attribute__((constructor)) lttng_ust_init(void) &constructor_timeout); } while (ret < 0 && errno == EINTR); if (ret < 0 && errno == ETIMEDOUT) { - ERR("Timed out waiting for ltt-sessiond"); + ERR("Timed out waiting for lttng-sessiond"); } else { assert(!ret); } @@ -1101,9 +1101,9 @@ void lttng_ust_cleanup(int exiting) */ lttng_ust_abi_exit(); lttng_ust_events_exit(); - ltt_ring_buffer_client_discard_exit(); - ltt_ring_buffer_client_overwrite_exit(); - ltt_ring_buffer_metadata_client_exit(); + lttng_ring_buffer_client_discard_exit(); + lttng_ring_buffer_client_overwrite_exit(); + lttng_ring_buffer_metadata_client_exit(); exit_tracepoint(); if (!exiting) { /* Reinitialize values for fork */ diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index 85b14d2c..c803f8af 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -38,7 +38,7 @@ #include #include "tracepoint-internal.h" -#include "ltt-tracer-core.h" +#include "lttng-tracer-core.h" #include "jhash.h" #include "error.h" diff --git a/liblttng-ust/ust-core.c b/liblttng-ust/ust-core.c index 7c17a766..f9c00ff0 100644 --- a/liblttng-ust/ust-core.c +++ b/liblttng-ust/ust-core.c @@ -22,7 +22,7 @@ #include #include -static CDS_LIST_HEAD(ltt_transport_list); +static CDS_LIST_HEAD(lttng_transport_list); void init_usterr(void) { @@ -37,11 +37,11 @@ void init_usterr(void) } } -struct ltt_transport *ltt_transport_find(const char *name) +struct lttng_transport *lttng_transport_find(const char *name) { - struct ltt_transport *transport; + struct lttng_transport *transport; - cds_list_for_each_entry(transport, <t_transport_list, node) { + cds_list_for_each_entry(transport, <tng_transport_list, node) { if (!strcmp(transport->name, name)) return transport; } @@ -49,23 +49,23 @@ struct ltt_transport *ltt_transport_find(const char *name) } /** - * ltt_transport_register - LTT transport registration + * lttng_transport_register - LTT transport registration * @transport: transport structure * * Registers a transport which can be used as output to extract the data out of * LTTng. Called with ust_lock held. */ -void ltt_transport_register(struct ltt_transport *transport) +void lttng_transport_register(struct lttng_transport *transport) { - cds_list_add_tail(&transport->node, <t_transport_list); + cds_list_add_tail(&transport->node, <tng_transport_list); } /** - * ltt_transport_unregister - LTT transport unregistration + * lttng_transport_unregister - LTT transport unregistration * @transport: transport structure * Called with ust_lock held. */ -void ltt_transport_unregister(struct ltt_transport *transport) +void lttng_transport_unregister(struct lttng_transport *transport) { cds_list_del(&transport->node); } -- 2.34.1