/* 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;
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; \
/* 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;
*/
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. */
}
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);
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);
/* Enable filters */
cds_list_for_each_entry(runtime,
- &event->bytecode_runtime_head, node) {
+ &event->filter_bytecode_runtime_head, node) {
lttng_filter_sync_state(runtime);
}
}
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(
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,
{
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;
* 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);
/*
* 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);