X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Fust-events-internal.h;h=be5c549c8dccdc7c0f5b3f30eaa158413c64ef0d;hb=c30ad764fc2500598086902cf3bd2801b9c05c64;hp=24393936f2df4b40f4ab48cbd099e28d8612fb2c;hpb=ab249ecfea7ddc352e1fb5c3b97a4f0fbb62f3ca;p=lttng-ust.git diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 24393936..be5c549c 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -46,13 +46,17 @@ struct lttng_event_enabler { struct lttng_event_notifier_enabler { struct lttng_enabler base; - struct cds_list_head node; /* per-app list of event notifier enablers */ + uint64_t error_counter_index; + struct cds_list_head node; /* per-app list of event_notifier enablers */ + struct cds_list_head capture_bytecode_head; struct lttng_event_notifier_group *group; /* weak ref */ uint64_t user_token; /* User-provided token */ + uint64_t num_captures; }; enum lttng_ust_bytecode_node_type { LTTNG_UST_BYTECODE_NODE_TYPE_FILTER, + LTTNG_UST_BYTECODE_NODE_TYPE_CAPTURE, }; struct lttng_ust_bytecode_node { @@ -150,16 +154,17 @@ int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler, struct lttng_ust_excluder_node *excluder); /* - * Synchronize bytecodes for the enabler and the event. + * Synchronize bytecodes for the enabler and the instance (event or + * event_notifier). * - * This function goes over all bytecode programs of the event enabler to ensure - * each is linked to the provided event. + * This function goes over all bytecode programs of the enabler (event or + * event_notifier enabler) to ensure each is linked to the provided instance. */ LTTNG_HIDDEN void lttng_enabler_link_bytecode(const struct lttng_event_desc *event_desc, struct lttng_ctx **ctx, - struct cds_list_head *bytecode_runtime_head, - struct lttng_enabler *enabler); + struct cds_list_head *instance_bytecode_runtime_head, + struct cds_list_head *enabler_bytecode_runtime_head); /* * Allocate and initialize a `struct lttng_event_notifier_group` object. @@ -221,6 +226,15 @@ int lttng_event_notifier_enabler_attach_filter_bytecode( struct lttng_event_notifier_enabler *event_notifier_enabler, struct lttng_ust_bytecode_node *bytecode); +/* + * Attach capture bytecode program to `struct lttng_event_notifier_enabler` and + * all event_notifiers related to this enabler. + */ +LTTNG_HIDDEN +int lttng_event_notifier_enabler_attach_capture_bytecode( + struct lttng_event_notifier_enabler *event_notifier_enabler, + struct lttng_ust_bytecode_node *bytecode); + /* * Attach exclusion list to `struct lttng_event_notifier_enabler` and all * event notifiers related to this enabler.