X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.h;h=011ffbfaed7b71f5287e11787b4ab0014f108201;hp=2aa76e71ca422bfd007dfcaec4786ebb1d7db549;hb=8abe313a6c4f251063e4b72ddd47ce8107384d71;hpb=814b4934e2604a419bcb8eec57c0450dbb47e2c3 diff --git a/src/bin/lttng-sessiond/notification-thread.h b/src/bin/lttng-sessiond/notification-thread.h index 2aa76e71c..011ffbfae 100644 --- a/src/bin/lttng-sessiond/notification-thread.h +++ b/src/bin/lttng-sessiond/notification-thread.h @@ -88,8 +88,14 @@ struct notification_thread_handle { * associates a channel_key to a struct channel_info. The hash table * holds the ownership of the struct channel_info. * + * - sessions_ht: + * associates a session_name (hash) to a struct session_info. The + * hash table holds no ownership of the struct session_info; + * the session_info structure is owned by the session's various + * channels through their struct channel_info (ref-counting is used). + * * - triggers_ht: - * associated a condition to a struct lttng_trigger_ht_element. + * associates a condition to a struct lttng_trigger_ht_element. * The hash table holds the ownership of the * lttng_trigger_ht_elements along with the triggers themselves. * @@ -110,7 +116,7 @@ struct notification_thread_handle { * 1) Creation of a tracing channel * - notification_trigger_clients_ht is traversed to identify * triggers which apply to this new channel, - * - triggers identified are added to the channel_triggers_ht. + * - triggers identified are added to the channel_triggers_ht. * - add channel to channels_ht * * 2) Destruction of a tracing channel @@ -127,6 +133,8 @@ struct notification_thread_handle { * notification_trigger_clients_ht, * - add trigger to channel_triggers_ht (if applicable), * - add trigger to triggers_ht + * - evaluate the trigger's condition right away to react if that condition + * is true from the beginning. * * 4) Unregistration of a trigger * - if the trigger's action is of type "notify", @@ -153,6 +161,8 @@ struct notification_thread_handle { * - Add the condition to the client's list of subscribed conditions, * - Look-up notification_trigger_clients_ht and add the client to * list of clients. + * - Evaluate the condition for the client that subscribed if the trigger + * was already registered. * * 9) Unsubscription of a client to a condition's notifications * - Remove the condition from the client's list of subscribed conditions, @@ -167,6 +177,7 @@ struct notification_thread_state { struct cds_lfht *channel_state_ht; struct cds_lfht *notification_trigger_clients_ht; struct cds_lfht *channels_ht; + struct cds_lfht *sessions_ht; struct cds_lfht *triggers_ht; };