X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.h;h=65ed6a2551eb96c63db64c900032a8faed233da3;hp=449173cd36a94a2f965a6a31c2ee351732e8fc22;hb=993578ff7c4fce4d9a834918d192f896ba3021c7;hpb=e1b624d005769d1a2e9eb39fee63c73c6395fd76 diff --git a/src/bin/lttng-sessiond/ust-app.h b/src/bin/lttng-sessiond/ust-app.h index 449173cd3..65ed6a255 100644 --- a/src/bin/lttng-sessiond/ust-app.h +++ b/src/bin/lttng-sessiond/ust-app.h @@ -112,6 +112,23 @@ struct ust_app_event { struct lttng_event_exclusion *exclusion; }; +struct ust_app_event_notifier_rule { + int enabled; + int handle; + struct lttng_ust_object_data *obj; + /* Holds a strong reference. */ + struct lttng_event_rule *event_rule; + /* Unique ID returned by the tracer to identify this event notifier. */ + uint64_t token; + struct lttng_ht_node_u64 node; + /* The event_rule object owns the filter. */ + const struct lttng_filter_bytecode *filter; + /* Owned by this. */ + struct lttng_event_exclusion *exclusion; + /* For delayed reclaim. */ + struct rcu_head rcu_head; +}; + struct ust_app_stream { int handle; char pathname[PATH_MAX]; @@ -303,6 +320,11 @@ struct ust_app { struct lttng_ust_object_data *object; struct lttng_pipe *event_pipe; } event_notifier_group; + /* + * Hashtable indexing the application's event notifier rule's + * (ust_app_event_notifier_rule) by their token's value. + */ + struct lttng_ht *token_to_event_notifier_rule_ht; }; #ifdef HAVE_LIBLTTNG_UST_CTL @@ -330,6 +352,8 @@ int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess, struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx); void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app); void ust_app_global_update_all(struct ltt_ust_session *usess); +void ust_app_global_update_event_notifier_rules(struct ust_app *app); +void ust_app_global_update_all_event_notifier_rules(void); void ust_app_clean_list(void); int ust_app_ht_alloc(void); @@ -457,7 +481,10 @@ static inline void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app) {} static inline -void ust_app_global_update_tokens(struct ust_app *app) +void ust_app_global_update_event_notifier_rules(struct ust_app *app) +{} +static inline +void ust_app_global_update_all_event_notifier_rules(void) {} static inline int ust_app_setup_event_notifier_group(struct ust_app *app)