X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.h;h=65ed6a2551eb96c63db64c900032a8faed233da3;hb=37f3c202d364b9a78c37db821c508ef3a6b1f711;hp=164bc2c6f2c95acf59d91e2a339cd55f3b338fef;hpb=04ed9e10dfa0b3c88d4a7abe9fa59b8e03b7e49a;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.h b/src/bin/lttng-sessiond/ust-app.h index 164bc2c6f..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]; @@ -292,6 +309,22 @@ struct ust_app { * Used for path creation */ time_t registration_time; + /* + * Event notifier + */ + struct { + /* + * Handle to the lttng_ust object representing the event + * notifier group. + */ + 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 @@ -319,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); @@ -356,6 +391,8 @@ int ust_app_release_object(struct ust_app *app, enum lttng_error_code ust_app_clear_session(struct ltt_session *session); enum lttng_error_code ust_app_open_packets(struct ltt_session *session); +int ust_app_setup_event_notifier_group(struct ust_app *app); + static inline int ust_app_supported(void) { @@ -444,6 +481,17 @@ static inline void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app) {} static inline +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) +{ + return 0; +} +static inline int ust_app_disable_channel_glb(struct ltt_ust_session *usess, struct ltt_ust_channel *uchan) {