Implements `lttng_event_notifier_notification_{create,destroy}()`
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.h
index 6f3588a54f6930f9f4a105b4ef84084420d939dd..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];
@@ -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);
@@ -354,6 +389,9 @@ enum lttng_error_code ust_app_create_channel_subdirectories(
 int ust_app_release_object(struct ust_app *app,
                struct lttng_ust_object_data *data);
 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)
@@ -443,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)
 {
@@ -600,6 +649,12 @@ enum lttng_error_code ust_app_clear_session(struct ltt_session *session)
        return 0;
 }
 
+static inline
+enum lttng_error_code ust_app_open_packets(struct ltt_session *session)
+{
+       return 0;
+}
+
 #endif /* HAVE_LIBLTTNG_UST_CTL */
 
 #endif /* _LTT_UST_APP_H */
This page took 0.023402 seconds and 4 git commands to generate.