ust-app: implement event notifier support
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.h
index 449173cd36a94a2f965a6a31c2ee351732e8fc22..65ed6a2551eb96c63db64c900032a8faed233da3 100644 (file)
@@ -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)
This page took 0.023248 seconds and 4 git commands to generate.