Cleanup: Rename filter functions/fields to mention "filter"
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 17 Mar 2020 14:55:43 +0000 (10:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Nov 2020 18:32:44 +0000 (13:32 -0500)
This will be cleaner when we introduce the capture bytecode functions
and fields.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I81a986386908212bf7a6814413204b54da6950c8

include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
liblttng-ust/lttng-events.c
liblttng-ust/lttng-filter.c
liblttng-ust/lttng-ust-abi.c
liblttng-ust/ust-events-internal.h

index d89ddea6147a5659b694af6b53d11dba71861a85..7fa992efd77d86a93464e73336c596703f773a4f 100644 (file)
@@ -491,7 +491,7 @@ struct lttng_event {
 
        /* LTTng-UST 2.1 starts here */
        /* list of struct lttng_bytecode_runtime, sorted by seqnum */
-       struct cds_list_head bytecode_runtime_head;
+       struct cds_list_head filter_bytecode_runtime_head;
        int has_enablers_without_bytecode;
        /* Backward references: list of lttng_enabler_ref (ref to enablers) */
        struct cds_list_head enablers_ref_head;
index c9c7592938427bfd228d3dd9a031189fbfc9aeca..5e9245f1684ddbaae2a77538888f1575f77c9b2b 100644 (file)
@@ -871,14 +871,14 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))         \
                return;                                                       \
        if (caa_unlikely(!TP_RCU_LINK_TEST()))                                \
                return;                                                       \
-       if (caa_unlikely(!cds_list_empty(&__event->bytecode_runtime_head))) { \
-               struct lttng_bytecode_runtime *bc_runtime;                    \
+       if (caa_unlikely(!cds_list_empty(&__event->filter_bytecode_runtime_head))) { \
+               struct lttng_bytecode_runtime *__filter_bc_runtime;                   \
                int __filter_record = __event->has_enablers_without_bytecode; \
                                                                              \
                __event_prepare_filter_stack__##_provider##___##_name(__stackvar.__filter_stack_data, \
                        _TP_ARGS_DATA_VAR(_args));                            \
-               tp_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
-                       if (caa_unlikely(bc_runtime->filter(bc_runtime,       \
+               tp_list_for_each_entry_rcu(__filter_bc_runtime, &__event->filter_bytecode_runtime_head, node) { \
+                       if (caa_unlikely(__filter_bc_runtime->filter(__filter_bc_runtime,             \
                                        __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
                                __filter_record = 1;                          \
                                break;                                        \
index 98def9a59ef2c023c5bf171400ac0f81f2102c21..495536762407cc9dbe01163472bc3d279f0036cd 100644 (file)
@@ -745,7 +745,7 @@ int lttng_event_create(const struct lttng_event_desc *desc,
        /* Event will be enabled by enabler sync. */
        event->enabled = 0;
        event->registered = 0;
-       CDS_INIT_LIST_HEAD(&event->bytecode_runtime_head);
+       CDS_INIT_LIST_HEAD(&event->filter_bytecode_runtime_head);
        CDS_INIT_LIST_HEAD(&event->enablers_ref_head);
        event->desc = desc;
 
@@ -1221,7 +1221,7 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler)
                 */
                lttng_enabler_link_bytecode(event->desc,
                        &session->ctx,
-                       &event->bytecode_runtime_head,
+                       &event->filter_bytecode_runtime_head,
                        lttng_event_enabler_as_enabler(event_enabler));
 
                /* TODO: merge event context. */
@@ -1402,17 +1402,17 @@ int lttng_event_enabler_disable(struct lttng_event_enabler *event_enabler)
 }
 
 static
-void _lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
+void _lttng_enabler_attach_filter_bytecode(struct lttng_enabler *enabler,
                struct lttng_ust_filter_bytecode_node *bytecode)
 {
        bytecode->enabler = enabler;
        cds_list_add_tail(&bytecode->node, &enabler->filter_bytecode_head);
 }
 
-int lttng_event_enabler_attach_bytecode(struct lttng_event_enabler *event_enabler,
+int lttng_event_enabler_attach_filter_bytecode(struct lttng_event_enabler *event_enabler,
                struct lttng_ust_filter_bytecode_node *bytecode)
 {
-       _lttng_enabler_attach_bytecode(
+       _lttng_enabler_attach_filter_bytecode(
                lttng_event_enabler_as_enabler(event_enabler), bytecode);
 
        lttng_session_lazy_sync_event_enablers(event_enabler->chan->session);
@@ -1455,11 +1455,11 @@ int lttng_event_notifier_enabler_disable(
        return 0;
 }
 
-int lttng_event_notifier_enabler_attach_bytecode(
+int lttng_event_notifier_enabler_attach_filter_bytecode(
                struct lttng_event_notifier_enabler *event_notifier_enabler,
                struct lttng_ust_filter_bytecode_node *bytecode)
 {
-       _lttng_enabler_attach_bytecode(
+       _lttng_enabler_attach_filter_bytecode(
                lttng_event_notifier_enabler_as_enabler(event_notifier_enabler),
                bytecode);
 
@@ -1634,7 +1634,7 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
 
                /* Enable filters */
                cds_list_for_each_entry(runtime,
-                               &event->bytecode_runtime_head, node) {
+                               &event->filter_bytecode_runtime_head, node) {
                        lttng_filter_sync_state(runtime);
                }
        }
index c25df62adad58e3659c31116331023328d620d4a..aa258e5c5d76a475999be9d4a96205ae783b5066 100644 (file)
@@ -582,7 +582,7 @@ void free_filter_runtime(struct cds_list_head *bytecode_runtime_head)
 
 void lttng_free_event_filter_runtime(struct lttng_event *event)
 {
-       free_filter_runtime(&event->bytecode_runtime_head);
+       free_filter_runtime(&event->filter_bytecode_runtime_head);
 }
 
 void lttng_free_event_notifier_filter_runtime(
index d5877c3d80591ad7ef408c597faaf426b9a6bc47..1361f5cc0cb6e4b7939c5f03ba6676195c34e9a1 100644 (file)
@@ -716,7 +716,8 @@ long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long
        struct lttng_event_notifier_enabler *event_notifier_enabler = objd_private(objd);
        switch (cmd) {
        case LTTNG_UST_FILTER:
-               return lttng_event_notifier_enabler_attach_bytecode(event_notifier_enabler,
+               return lttng_event_notifier_enabler_attach_filter_bytecode(
+                       event_notifier_enabler,
                        (struct lttng_ust_filter_bytecode_node *) arg);
        case LTTNG_UST_EXCLUSION:
                return lttng_event_notifier_enabler_attach_exclusion(event_notifier_enabler,
@@ -1146,7 +1147,7 @@ long lttng_event_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
        {
                int ret;
 
-               ret = lttng_event_enabler_attach_bytecode(enabler,
+               ret = lttng_event_enabler_attach_filter_bytecode(enabler,
                                (struct lttng_ust_filter_bytecode_node *) arg);
                if (ret)
                        return ret;
index 074a7b69bf44fcabfe544a191b3031fefbfe0f45..eea9c666e72482de82e5c43ab5fdeeb4e57f410d 100644 (file)
@@ -122,7 +122,8 @@ int lttng_event_enabler_disable(struct lttng_event_enabler *enabler);
  * events related to this enabler.
  */
 LTTNG_HIDDEN
-int lttng_event_enabler_attach_bytecode(struct lttng_event_enabler *enabler,
+int lttng_event_enabler_attach_filter_bytecode(
+               struct lttng_event_enabler *enabler,
                struct lttng_ust_filter_bytecode_node *bytecode);
 
 /*
@@ -210,7 +211,7 @@ int lttng_event_notifier_enabler_disable(
  * all event notifiers related to this enabler.
  */
 LTTNG_HIDDEN
-int lttng_event_notifier_enabler_attach_bytecode(
+int lttng_event_notifier_enabler_attach_filter_bytecode(
                struct lttng_event_notifier_enabler *event_notifier_enabler,
                struct lttng_ust_filter_bytecode_node *bytecode);
 
This page took 0.030071 seconds and 4 git commands to generate.