From: Francis Deslauriers Date: Thu, 5 Dec 2019 19:37:57 +0000 (-0500) Subject: Rename `enum lttng_enabler_type` to `_format_type` X-Git-Tag: v2.13.0-rc1~157 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3b861b22481a3ea9664c59b8cdeb1e49077e5ed5;p=lttng-modules.git Rename `enum lttng_enabler_type` to `_format_type` This will avoid confusion between the different types of enablers (event notifier enablers and event enablers). - Enabler format types describe the way the event name matching is done. - Enabler types will describe the type of enablers (event notifier vs event) Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: Ic71d05159c5f244d0b1ad74f9c0ee6247fcdfbbb --- diff --git a/include/lttng/events.h b/include/lttng/events.h index 3ba8525f..72a12857 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -327,9 +327,9 @@ struct lttng_event { int has_enablers_without_bytecode; }; -enum lttng_enabler_type { - LTTNG_ENABLER_STAR_GLOB, - LTTNG_ENABLER_NAME, +enum lttng_enabler_format_type { + LTTNG_ENABLER_FORMAT_STAR_GLOB, + LTTNG_ENABLER_FORMAT_NAME, }; /* @@ -339,7 +339,7 @@ enum lttng_enabler_type { struct lttng_enabler { enum lttng_event_type evtype; /* First field. */ - enum lttng_enabler_type type; + enum lttng_enabler_format_type format_type; struct list_head node; /* per-session list of enablers */ /* head list of struct lttng_ust_filter_bytecode_node */ @@ -558,7 +558,7 @@ void lttng_unlock_sessions(void); struct list_head *lttng_get_probe_list_head(void); -struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type, +struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_format_type format_type, struct lttng_kernel_event *event_param, struct lttng_channel *chan); diff --git a/src/lttng-abi.c b/src/lttng-abi.c index 219d20a0..1ef5ae43 100644 --- a/src/lttng-abi.c +++ b/src/lttng-abi.c @@ -1359,10 +1359,10 @@ int lttng_abi_create_event(struct file *channel_file, * If the event name is a star globbing pattern, * we create the special star globbing enabler. */ - enabler = lttng_enabler_create(LTTNG_ENABLER_STAR_GLOB, + enabler = lttng_enabler_create(LTTNG_ENABLER_FORMAT_STAR_GLOB, event_param, channel); } else { - enabler = lttng_enabler_create(LTTNG_ENABLER_NAME, + enabler = lttng_enabler_create(LTTNG_ENABLER_FORMAT_NAME, event_param, channel); } priv = enabler; diff --git a/src/lttng-events.c b/src/lttng-events.c index 5023d450..05abc817 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -1237,10 +1237,10 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc, switch (enabler->event_param.instrumentation) { case LTTNG_KERNEL_TRACEPOINT: desc_name = desc->name; - switch (enabler->type) { - case LTTNG_ENABLER_STAR_GLOB: + switch (enabler->format_type) { + case LTTNG_ENABLER_FORMAT_STAR_GLOB: return lttng_match_enabler_star_glob(desc_name, enabler_name); - case LTTNG_ENABLER_NAME: + case LTTNG_ENABLER_FORMAT_NAME: return lttng_match_enabler_name(desc_name, enabler_name); default: return -EINVAL; @@ -1293,10 +1293,10 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc, } switch (enabler->event_param.u.syscall.match) { case LTTNG_SYSCALL_MATCH_NAME: - switch (enabler->type) { - case LTTNG_ENABLER_STAR_GLOB: + switch (enabler->format_type) { + case LTTNG_ENABLER_FORMAT_STAR_GLOB: return lttng_match_enabler_star_glob(desc_name, enabler_name); - case LTTNG_ENABLER_NAME: + case LTTNG_ENABLER_FORMAT_NAME: return lttng_match_enabler_name(desc_name, enabler_name); default: return -EINVAL; @@ -1499,7 +1499,7 @@ int lttng_fix_pending_events(void) return 0; } -struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type, +struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_format_type format_type, struct lttng_kernel_event *event_param, struct lttng_channel *chan) { @@ -1508,7 +1508,7 @@ struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type, enabler = kzalloc(sizeof(*enabler), GFP_KERNEL); if (!enabler) return NULL; - enabler->type = type; + enabler->format_type = format_type; INIT_LIST_HEAD(&enabler->filter_bytecode_head); memcpy(&enabler->event_param, event_param, sizeof(enabler->event_param));