From 92495593f8a331d04f993e396de9f2caa748fb6f Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 28 Apr 2020 16:19:24 -0400 Subject: [PATCH] Cleanup: hide `lttng_ust_{filter_bytecode,excluder}_node` Those two structs are not used in the external API so we better hide them in internal files. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I9fee32ab4cc4ac7a440ad57d344b1a369a121313 --- include/lttng/ust-events.h | 21 ++------------------- liblttng-ust/lttng-filter-specialize.c | 1 + liblttng-ust/lttng-filter-validator.c | 1 + liblttng-ust/lttng-ust-comm.c | 1 + liblttng-ust/ust-events-internal.h | 20 ++++++++++++++++++++ 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 36534695..1e359b00 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -424,25 +424,6 @@ struct lttng_ust_field_list { struct ust_pending_probe; struct lttng_event; -struct lttng_ust_filter_bytecode_node { - struct cds_list_head node; - struct lttng_enabler *enabler; - /* - * struct lttng_ust_filter_bytecode has var. sized array, must - * be last field. - */ - struct lttng_ust_filter_bytecode bc; -}; - -struct lttng_ust_excluder_node { - struct cds_list_head node; - struct lttng_enabler *enabler; - /* - * struct lttng_ust_event_exclusion had variable sized array, - * must be last field. - */ - struct lttng_ust_event_exclusion excluder; -}; /* * Filter return value masks. */ @@ -807,6 +788,8 @@ void lttng_ust_fixup_fd_tracker_tls(void); /* For backward compatibility. Leave those exported symbols in place. */ extern struct lttng_ctx *lttng_static_ctx; +struct lttng_ust_filter_bytecode_node; +struct lttng_ust_excluder_node; void lttng_context_init(void); void lttng_context_exit(void); void lttng_filter_event_link_bytecode(struct lttng_event *event); diff --git a/liblttng-ust/lttng-filter-specialize.c b/liblttng-ust/lttng-filter-specialize.c index 0a19896b..d4f8a957 100644 --- a/liblttng-ust/lttng-filter-specialize.c +++ b/liblttng-ust/lttng-filter-specialize.c @@ -30,6 +30,7 @@ #include "lttng-filter.h" #include +#include "ust-events-internal.h" static int lttng_fls(int val) { diff --git a/liblttng-ust/lttng-filter-validator.c b/liblttng-ust/lttng-filter-validator.c index 953bbdd7..c1fed3ed 100644 --- a/liblttng-ust/lttng-filter-validator.c +++ b/liblttng-ust/lttng-filter-validator.c @@ -35,6 +35,7 @@ #include "lttng-filter.h" #include "lttng-hash-helper.h" #include "string-utils.h" +#include "ust-events-internal.h" /* * Number of merge points for hash table size. Hash table initialized to diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 4432a5da..87657ef8 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -61,6 +61,7 @@ #include "clock.h" #include "../libringbuffer/getcpu.h" #include "getenv.h" +#include "ust-events-internal.h" /* Concatenate lttng ust shared library name with its major version number. */ #define LTTNG_UST_LIB_SO_NAME "liblttng-ust.so." __ust_stringify(CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR) diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index f93305ed..dbd998e8 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -44,6 +44,26 @@ struct lttng_event_enabler { struct lttng_ctx *ctx; }; +struct lttng_ust_filter_bytecode_node { + struct cds_list_head node; + struct lttng_enabler *enabler; + /* + * struct lttng_ust_filter_bytecode has var. sized array, must + * be last field. + */ + struct lttng_ust_filter_bytecode bc; +}; + +struct lttng_ust_excluder_node { + struct cds_list_head node; + struct lttng_enabler *enabler; + /* + * struct lttng_ust_event_exclusion had variable sized array, + * must be last field. + */ + struct lttng_ust_event_exclusion excluder; +}; + static inline struct lttng_enabler *lttng_event_enabler_as_enabler( struct lttng_event_enabler *event_enabler) -- 2.34.1