struct hlist_node hlist; /* session ht of events */
int registered; /* has reg'd tracepoint probe */
/* list of struct lttng_bytecode_runtime, sorted by seqnum */
- struct list_head bytecode_runtime_head;
+ struct list_head filter_bytecode_runtime_head;
int has_enablers_without_bytecode;
};
struct list_head enablers_ref_head;
struct hlist_node hlist; /* session ht of event_notifiers */
/* list of struct lttng_bytecode_runtime, sorted by seqnum */
- struct list_head bytecode_runtime_head;
+ struct list_head filter_bytecode_runtime_head;
int has_enablers_without_bytecode;
void (*send_notification)(struct lttng_event_notifier *event_notifier);
#endif
void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime);
-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_kernel_filter_bytecode __user *bytecode);
-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_kernel_filter_bytecode __user *bytecode);
__orig_dynamic_len_offset = this_cpu_ptr(<tng_dynamic_len_stack)->offset; \
__dynamic_len_idx = __orig_dynamic_len_offset; \
_code_pre \
- if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \
+ if (unlikely(!list_empty(&__event->filter_bytecode_runtime_head))) { \
struct lttng_bytecode_runtime *bc_runtime; \
int __filter_record = __event->has_enablers_without_bytecode; \
\
__event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \
tp_locvar, _args); \
- lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
+ lttng_list_for_each_entry_rcu(bc_runtime, &__event->filter_bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
__stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
__filter_record = 1; \
__orig_dynamic_len_offset = this_cpu_ptr(<tng_dynamic_len_stack)->offset; \
__dynamic_len_idx = __orig_dynamic_len_offset; \
_code_pre \
- if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \
+ if (unlikely(!list_empty(&__event->filter_bytecode_runtime_head))) { \
struct lttng_bytecode_runtime *bc_runtime; \
int __filter_record = __event->has_enablers_without_bytecode; \
\
__event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \
tp_locvar); \
- lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
+ lttng_list_for_each_entry_rcu(bc_runtime, &__event->filter_bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
__stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
__filter_record = 1; \
if (unlikely(!READ_ONCE(__event_notifier->enabled))) \
return; \
_code_pre \
- if (unlikely(!list_empty(&__event_notifier->bytecode_runtime_head))) { \
+ if (unlikely(!list_empty(&__event_notifier->filter_bytecode_runtime_head))) { \
struct lttng_bytecode_runtime *bc_runtime; \
int __filter_record = __event_notifier->has_enablers_without_bytecode; \
\
__event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \
tp_locvar, _args); \
- lttng_list_for_each_entry_rcu(bc_runtime, &__event_notifier->bytecode_runtime_head, node) { \
+ lttng_list_for_each_entry_rcu(bc_runtime, &__event_notifier->filter_bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
__stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
__filter_record = 1; \
if (unlikely(!READ_ONCE(__event_notifier->enabled))) \
return; \
_code_pre \
- if (unlikely(!list_empty(&__event_notifier->bytecode_runtime_head))) { \
+ if (unlikely(!list_empty(&__event_notifier->filter_bytecode_runtime_head))) { \
struct lttng_bytecode_runtime *bc_runtime; \
int __filter_record = __event_notifier->has_enablers_without_bytecode; \
\
__event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \
tp_locvar); \
- lttng_list_for_each_entry_rcu(bc_runtime, &__event_notifier->bytecode_runtime_head, node) { \
+ lttng_list_for_each_entry_rcu(bc_runtime, &__event_notifier->filter_bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
__stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
__filter_record = 1; \
return -EINVAL;
case LTTNG_TYPE_ENABLER:
event_notifier_enabler = file->private_data;
- return lttng_event_notifier_enabler_attach_bytecode(event_notifier_enabler,
+ return lttng_event_notifier_enabler_attach_filter_bytecode(
+ event_notifier_enabler,
(struct lttng_kernel_filter_bytecode __user *) arg);
default:
WARN_ON_ONCE(1);
case LTTNG_TYPE_ENABLER:
{
event_enabler = file->private_data;
- return lttng_event_enabler_attach_bytecode(event_enabler,
+ return lttng_event_enabler_attach_filter_bytecode(
+ event_enabler,
(struct lttng_kernel_filter_bytecode __user *) arg);
}
default:
event->id = chan->free_event_id++;
event->instrumentation = itype;
event->evtype = LTTNG_TYPE_EVENT;
- INIT_LIST_HEAD(&event->bytecode_runtime_head);
+ INIT_LIST_HEAD(&event->filter_bytecode_runtime_head);
INIT_LIST_HEAD(&event->enablers_ref_head);
switch (itype) {
event_notifier->instrumentation = itype;
event_notifier->evtype = LTTNG_TYPE_EVENT;
event_notifier->send_notification = lttng_event_notifier_notification_send;
- INIT_LIST_HEAD(&event_notifier->bytecode_runtime_head);
+ INIT_LIST_HEAD(&event_notifier->filter_bytecode_runtime_head);
INIT_LIST_HEAD(&event_notifier->enablers_ref_head);
switch (itype) {
*/
lttng_enabler_link_bytecode(event->desc,
lttng_static_ctx,
- &event->bytecode_runtime_head,
+ &event->filter_bytecode_runtime_head,
lttng_event_enabler_as_enabler(event_enabler));
/* TODO: merge event context. */
* Link filter bytecodes if not linked yet.
*/
lttng_enabler_link_bytecode(event_notifier->desc,
- lttng_static_ctx, &event_notifier->bytecode_runtime_head,
+ lttng_static_ctx, &event_notifier->filter_bytecode_runtime_head,
lttng_event_notifier_enabler_as_enabler(event_notifier_enabler));
}
return 0;
}
static
-int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
+int lttng_enabler_attach_filter_bytecode(struct lttng_enabler *enabler,
struct lttng_kernel_filter_bytecode __user *bytecode)
{
struct lttng_filter_bytecode_node *bytecode_node;
return ret;
}
-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_kernel_filter_bytecode __user *bytecode)
{
int ret;
- ret = lttng_enabler_attach_bytecode(
+ ret = lttng_enabler_attach_filter_bytecode(
lttng_event_enabler_as_enabler(event_enabler), bytecode);
if (ret)
goto error;
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_kernel_filter_bytecode __user *bytecode)
{
int ret;
- ret = lttng_enabler_attach_bytecode(
+ ret = lttng_enabler_attach_filter_bytecode(
lttng_event_notifier_enabler_as_enabler(event_notifier_enabler),
bytecode);
if (ret)
/* Enable filters */
list_for_each_entry(runtime,
- &event->bytecode_runtime_head, node)
+ &event->filter_bytecode_runtime_head, node)
lttng_filter_sync_state(runtime);
}
}
/* Enable filters */
list_for_each_entry(runtime,
- &event_notifier->bytecode_runtime_head, node)
- lttng_filter_sync_state(runtime);
+ &event_notifier->filter_bytecode_runtime_head, node)
+ lttng_filter_sync_state(runtime);
}
}
struct bytecode_runtime *runtime, *tmp;
list_for_each_entry_safe(runtime, tmp,
- &event->bytecode_runtime_head, p.node) {
+ &event->filter_bytecode_runtime_head, p.node) {
kfree(runtime->data);
kfree(runtime);
}