From: Mathieu Desnoyers Date: Fri, 22 Oct 2021 19:56:00 +0000 (-0400) Subject: Rename struct lttng_enabler to struct lttng_event_enabler_common X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8d55475530bc2e8c7428f7cc926da7e0765dff1e;p=lttng-modules.git Rename struct lttng_enabler to struct lttng_event_enabler_common Signed-off-by: Mathieu Desnoyers Change-Id: I7377b74b3ea59af391c77e22ad2d0c977aa09d6c --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index cfbde70f..155b581f 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -33,7 +33,7 @@ enum channel_type { */ struct lttng_enabler_ref { struct list_head node; /* enabler ref list */ - struct lttng_enabler *ref; /* backward ref */ + struct lttng_event_enabler_common *ref; /* backward ref */ }; struct lttng_krp; /* Kretprobe handling */ @@ -181,7 +181,7 @@ enum lttng_kernel_bytecode_type { struct lttng_kernel_bytecode_node { enum lttng_kernel_bytecode_type type; struct list_head node; - struct lttng_enabler *enabler; + struct lttng_event_enabler_common *enabler; struct { uint32_t len; uint32_t reloc_offset; @@ -207,7 +207,7 @@ struct lttng_kernel_bytecode_runtime { * Enabler field, within whatever object is enabling an event. Target of * backward reference. */ -struct lttng_enabler { +struct lttng_event_enabler_common { enum lttng_enabler_format_type format_type; /* head list of struct lttng_kernel_bytecode_node */ @@ -220,14 +220,14 @@ struct lttng_enabler { }; struct lttng_event_enabler { - struct lttng_enabler base; + struct lttng_event_enabler_common base; struct list_head node; /* per-session list of enablers */ bool published; /* published in per-session list. */ struct lttng_kernel_channel_buffer *chan; }; struct lttng_event_notifier_enabler { - struct lttng_enabler base; + struct lttng_event_enabler_common base; uint64_t error_counter_index; struct list_head node; /* List of event_notifier enablers */ struct lttng_event_notifier_group *group; @@ -584,14 +584,14 @@ int lttng_kernel_interpret_event_filter(const struct lttng_kernel_event_common * void *event_filter_ctx); static inline -struct lttng_enabler *lttng_event_enabler_as_enabler( +struct lttng_event_enabler_common *lttng_event_enabler_as_enabler( struct lttng_event_enabler *event_enabler) { return &event_enabler->base; } static inline -struct lttng_enabler *lttng_event_notifier_enabler_as_enabler( +struct lttng_event_enabler_common *lttng_event_notifier_enabler_as_enabler( struct lttng_event_notifier_enabler *event_notifier_enabler) { return &event_notifier_enabler->base; @@ -806,7 +806,7 @@ int lttng_event_notifier_enabler_attach_capture_bytecode( struct lttng_kernel_abi_capture_bytecode __user *bytecode); int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc, - struct lttng_enabler *enabler); + struct lttng_event_enabler_common *enabler); void lttng_enabler_link_bytecode(const struct lttng_kernel_event_desc *event_desc, struct lttng_kernel_ctx *ctx, diff --git a/src/lttng-bytecode.c b/src/lttng-bytecode.c index b1437774..2ad0b390 100644 --- a/src/lttng-bytecode.c +++ b/src/lttng-bytecode.c @@ -578,14 +578,14 @@ void lttng_enabler_link_bytecode(const struct lttng_kernel_event_desc *event_des /* * We own the filter_bytecode if we return success. */ -int lttng_filter_enabler_attach_bytecode(struct lttng_enabler *enabler, +int lttng_filter_enabler_attach_bytecode(struct lttng_event_enabler_common *enabler, struct lttng_kernel_bytecode_node *filter_bytecode) { list_add(&filter_bytecode->node, &enabler->filter_bytecode_head); return 0; } -void lttng_free_enabler_filter_bytecode(struct lttng_enabler *enabler) +void lttng_free_enabler_filter_bytecode(struct lttng_event_enabler_common *enabler) { struct lttng_kernel_bytecode_node *filter_bytecode, *tmp; diff --git a/src/lttng-events.c b/src/lttng-events.c index 02c62b0c..4c7e7157 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -1978,7 +1978,7 @@ int lttng_match_enabler_name(const char *desc_name, } int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc, - struct lttng_enabler *enabler) + struct lttng_event_enabler_common *enabler) { const char *desc_name, *enabler_name; bool compat = false, entry = false; @@ -2070,7 +2070,7 @@ static int lttng_event_enabler_match_event(struct lttng_event_enabler *event_enabler, struct lttng_kernel_event_recorder *event_recorder) { - struct lttng_enabler *base_enabler = lttng_event_enabler_as_enabler( + struct lttng_event_enabler_common *base_enabler = lttng_event_enabler_as_enabler( event_enabler); if (base_enabler->event_param.instrumentation != event_recorder->priv->parent.instrumentation) @@ -2086,7 +2086,7 @@ static int lttng_event_notifier_enabler_match_event_notifier(struct lttng_event_notifier_enabler *event_notifier_enabler, struct lttng_kernel_event_notifier *event_notifier) { - struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler( + struct lttng_event_enabler_common *base_enabler = lttng_event_notifier_enabler_as_enabler( event_notifier_enabler); if (base_enabler->event_param.instrumentation != event_notifier->priv->parent.instrumentation) @@ -2102,7 +2102,7 @@ int lttng_event_notifier_enabler_match_event_notifier(struct lttng_event_notifie static struct lttng_enabler_ref *lttng_enabler_ref( struct list_head *enablers_ref_list, - struct lttng_enabler *enabler) + struct lttng_event_enabler_common *enabler) { struct lttng_enabler_ref *enabler_ref; @@ -2277,7 +2277,7 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler) { struct lttng_kernel_channel_buffer *chan = event_enabler->chan; struct lttng_kernel_session *session = event_enabler->chan->parent.session; - struct lttng_enabler *base_enabler = lttng_event_enabler_as_enabler(event_enabler); + struct lttng_event_enabler_common *base_enabler = lttng_event_enabler_as_enabler(event_enabler); struct lttng_kernel_event_recorder_private *event_recorder_priv; if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL && @@ -2361,7 +2361,7 @@ int lttng_event_notifier_enabler_ref_event_notifiers( struct lttng_event_notifier_enabler *event_notifier_enabler) { struct lttng_event_notifier_group *event_notifier_group = event_notifier_enabler->group; - struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler); + struct lttng_event_enabler_common *base_enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler); struct lttng_kernel_event_notifier_private *event_notifier_priv; if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL && @@ -2521,7 +2521,7 @@ int lttng_event_enabler_disable(struct lttng_event_enabler *event_enabler) } static -int lttng_enabler_attach_filter_bytecode(struct lttng_enabler *enabler, +int lttng_enabler_attach_filter_bytecode(struct lttng_event_enabler_common *enabler, struct lttng_kernel_abi_filter_bytecode __user *bytecode) { struct lttng_kernel_bytecode_node *bytecode_node; @@ -2582,7 +2582,7 @@ int lttng_event_add_callsite(struct lttng_kernel_event_common *event, } static -void lttng_enabler_destroy(struct lttng_enabler *enabler) +void lttng_enabler_destroy(struct lttng_event_enabler_common *enabler) { struct lttng_kernel_bytecode_node *filter_node, *tmp_filter_node; @@ -2680,7 +2680,7 @@ int lttng_event_notifier_enabler_attach_capture_bytecode( struct lttng_kernel_abi_capture_bytecode __user *bytecode) { struct lttng_kernel_bytecode_node *bytecode_node; - struct lttng_enabler *enabler = + struct lttng_event_enabler_common *enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler); uint32_t bytecode_len; int ret; diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 25db7f61..8feb384c 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -1005,7 +1005,7 @@ int create_unknown_event_notifier( struct lttng_kernel_abi_event_notifier event_notifier_param; uint64_t user_token = event_notifier_enabler->base.user_token; uint64_t error_counter_index = event_notifier_enabler->error_counter_index; - struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler( + struct lttng_event_enabler_common *base_enabler = lttng_event_notifier_enabler_as_enabler( event_notifier_enabler); struct hlist_head *unknown_dispatch_list; int ret = 0; @@ -1171,7 +1171,7 @@ int lttng_syscalls_create_matching_event_notifiers( struct lttng_event_notifier_enabler *event_notifier_enabler) { int ret; - struct lttng_enabler *base_enabler = + struct lttng_event_enabler_common *base_enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler); enum lttng_kernel_abi_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;