caa_container_of(node, struct lttng_trigger_ht_element, node_by_name_uid);
status = lttng_trigger_get_name(trigger_ht_element->trigger, &element_trigger_name);
caa_container_of(node, struct lttng_trigger_ht_element, node_by_name_uid);
status = lttng_trigger_get_name(trigger_ht_element->trigger, &element_trigger_name);
lttng_ref_init(&session_info->ref, session_info_destroy);
session_info->channel_infos_ht = cds_lfht_new(
lttng_ref_init(&session_info->ref, session_info_destroy);
session_info->channel_infos_ht = cds_lfht_new(
- DEFAULT_HT_SIZE, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL);
+ DEFAULT_HT_SIZE, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, nullptr);
cds_lfht_del(list->notification_trigger_clients_ht,
&list->notification_trigger_clients_ht_node);
rcu_read_unlock();
cds_lfht_del(list->notification_trigger_clients_ht,
&list->notification_trigger_clients_ht_node);
rcu_read_unlock();
}
cds_list_for_each_entry_safe (client_list_element, tmp, &list->clients_list, node) {
free(client_list_element);
}
cds_list_for_each_entry_safe (client_list_element, tmp, &list->clients_list, node) {
free(client_list_element);
if (node) {
list = lttng::utils::container_of(
node, ¬ification_client_list::notification_trigger_clients_ht_node);
if (node) {
list = lttng::utils::container_of(
node, ¬ification_client_list::notification_trigger_clients_ht_node);
- struct channel_info *channel_info = NULL;
- struct channel_key *channel_key = NULL;
- struct channel_state_sample *last_sample = NULL;
- struct lttng_channel_trigger_list *channel_trigger_list = NULL;
+ struct channel_info *channel_info = nullptr;
+ struct channel_key *channel_key = nullptr;
+ struct channel_state_sample *last_sample = nullptr;
+ struct lttng_channel_trigger_list *channel_trigger_list = nullptr;
- condition, evaluation, state, NULL, last_sample, channel_info);
+ condition, evaluation, state, nullptr, last_sample, channel_info);
struct notification_client_list client_list = {
.lock = PTHREAD_MUTEX_INITIALIZER,
.ref = {},
struct notification_client_list client_list = {
.lock = PTHREAD_MUTEX_INITIALIZER,
.ref = {},
- ret = evaluate_session_condition(condition, session_info, NULL, &evaluation);
+ ret = evaluate_session_condition(condition, session_info, nullptr, &evaluation);
- struct notification_client_list *client_list = NULL;
- struct lttng_condition_list_element *condition_list_element = NULL;
- struct notification_client_list_element *client_list_element = NULL;
+ struct notification_client_list *client_list = nullptr;
+ struct lttng_condition_list_element *condition_list_element = nullptr;
+ struct notification_client_list_element *client_list_element = nullptr;
struct lttng_trigger_ht_element *trigger_ht_element;
enum lttng_notification_channel_status status = LTTNG_NOTIFICATION_CHANNEL_STATUS_OK;
struct lttng_trigger_ht_element *trigger_ht_element;
enum lttng_notification_channel_status status = LTTNG_NOTIFICATION_CHANNEL_STATUS_OK;
cds_list_add(&condition_list_element->node, &client->condition_list);
client_list = get_client_list_from_condition(state, condition_list_element->condition);
cds_list_add(&condition_list_element->node, &client->condition_list);
client_list = get_client_list_from_condition(state, condition_list_element->condition);
status = lttng_condition_buffer_usage_get_domain_type(condition, &condition_domain);
LTTNG_ASSERT(status == LTTNG_CONDITION_STATUS_OK);
status = lttng_condition_buffer_usage_get_domain_type(condition, &condition_domain);
LTTNG_ASSERT(status == LTTNG_CONDITION_STATUS_OK);
status = lttng_condition_buffer_usage_get_channel_name(condition, &condition_channel_name);
LTTNG_ASSERT((status == LTTNG_CONDITION_STATUS_OK) && condition_channel_name);
status = lttng_condition_buffer_usage_get_channel_name(condition, &condition_channel_name);
LTTNG_ASSERT((status == LTTNG_CONDITION_STATUS_OK) && condition_channel_name);
static struct lttng_session_trigger_list *
get_session_trigger_list(struct notification_thread_state *state, const char *session_name)
{
static struct lttng_session_trigger_list *
get_session_trigger_list(struct notification_thread_state *state, const char *session_name)
{
static struct lttng_session_trigger_list *
lttng_session_trigger_list_create(const char *session_name, struct cds_lfht *session_triggers_ht)
{
static struct lttng_session_trigger_list *
lttng_session_trigger_list_create(const char *session_name, struct cds_lfht *session_triggers_ht)
{
- struct lttng_session_trigger_list *session_trigger_list = NULL;
- struct lttng_trigger_ht_element *trigger_ht_element = NULL;
+ struct lttng_session_trigger_list *session_trigger_list = nullptr;
+ struct lttng_trigger_ht_element *trigger_ht_element = nullptr;
if (cds_lfht_add_unique(state->sessions_ht,
hash_session_info(session),
if (cds_lfht_add_unique(state->sessions_ht,
hash_session_info(session),
struct channel_key channel_key = {
.key = channel_key_int,
.domain = channel_domain,
};
struct channel_key channel_key = {
.key = channel_key_int,
.domain = channel_domain,
};
- struct lttng_channel_trigger_list *channel_trigger_list = NULL;
- struct lttng_trigger_ht_element *trigger_ht_element = NULL;
+ struct lttng_channel_trigger_list *channel_trigger_list = nullptr;
+ struct lttng_trigger_ht_element *trigger_ht_element = nullptr;
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
struct notification_client_list *client_list;
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
struct notification_client_list *client_list;
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &session_creds, client_list);
notification_client_list_put(client_list);
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &session_creds, client_list);
notification_client_list_put(client_list);
enum lttng_error_code cmd_result = LTTNG_OK;
struct cds_lfht_iter iter;
struct lttng_trigger_ht_element *trigger_ht_element;
enum lttng_error_code cmd_result = LTTNG_OK;
struct cds_lfht_iter iter;
struct lttng_trigger_ht_element *trigger_ht_element;
struct cds_lfht_node *node;
uint64_t error_counter_index = 0;
struct lttng_condition *condition = lttng_trigger_get_condition(trigger);
struct cds_lfht_node *node;
uint64_t error_counter_index = 0;
struct lttng_condition *condition = lttng_trigger_get_condition(trigger);
trigger_tokens_ht_element = zmalloc<notification_trigger_tokens_ht_element>();
if (!trigger_tokens_ht_element) {
trigger_tokens_ht_element = zmalloc<notification_trigger_tokens_ht_element>();
if (!trigger_tokens_ht_element) {
- struct notification_client_list *client_list = NULL;
- struct lttng_trigger_ht_element *trigger_ht_element = NULL;
+ struct notification_client_list *client_list = nullptr;
+ struct lttng_trigger_ht_element *trigger_ht_element = nullptr;
struct cds_lfht_node *node;
const char *trigger_name;
bool free_trigger = true;
struct cds_lfht_node *node;
const char *trigger_name;
bool free_trigger = true;
* Ownership of the trigger and of its wrapper was transfered to
* the triggers_ht. Same for token ht element if necessary.
*/
* Ownership of the trigger and of its wrapper was transfered to
* the triggers_ht. Same for token ht element if necessary.
*/
LTTNG_OPTIONAL_SET(&object_creds.uid, session_info->uid);
LTTNG_OPTIONAL_SET(&object_creds.gid, session_info->gid);
LTTNG_OPTIONAL_SET(&object_creds.uid, session_info->uid);
LTTNG_OPTIONAL_SET(&object_creds.gid, session_info->gid);
- ret = evaluate_session_condition(condition, session_info, NULL, &evaluation);
+ ret = evaluate_session_condition(condition, session_info, nullptr, &evaluation);
*/
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &object_creds, client_list);
*/
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &object_creds, client_list);
struct cds_lfht_iter iter;
struct cds_lfht_node *triggers_ht_node;
struct notification_client_list *client_list;
struct cds_lfht_iter iter;
struct cds_lfht_node *triggers_ht_node;
struct notification_client_list *client_list;
const struct lttng_condition *condition = lttng_trigger_get_const_condition(trigger);
enum lttng_error_code cmd_reply;
const struct lttng_condition *condition = lttng_trigger_get_const_condition(trigger);
enum lttng_error_code cmd_reply;
/* Put new reference and the hashtable's reference. */
notification_client_list_put(client_list);
notification_client_list_put(client_list);
/* Put new reference and the hashtable's reference. */
notification_client_list_put(client_list);
notification_client_list_put(client_list);
ret = handle_notification_thread_command_get_trigger(
state, cmd->parameters.get_trigger.trigger, &trigger, &cmd->reply_code);
ret = handle_notification_thread_command_get_trigger(
state, cmd->parameters.get_trigger.trigger, &trigger, &cmd->reply_code);
client->id = state->next_notification_client_id++;
CDS_INIT_LIST_HEAD(&client->condition_list);
lttng_payload_init(&client->communication.inbound.payload);
client->id = state->next_notification_client_id++;
CDS_INIT_LIST_HEAD(&client->condition_list);
lttng_payload_init(&client->communication.inbound.payload);
/* Release all conditions to which the client was subscribed. */
cds_list_for_each_entry_safe (condition_list_element, tmp, &client->condition_list, node) {
(void) notification_thread_client_unsubscribe(
/* Release all conditions to which the client was subscribed. */
cds_list_for_each_entry_safe (condition_list_element, tmp, &client->condition_list, node) {
(void) notification_thread_client_unsubscribe(
- client, condition_list_element->condition, state, NULL);
+ client, condition_list_element->condition, state, nullptr);
rcu_read_lock();
cds_lfht_for_each_entry (state->triggers_ht, &iter, trigger_ht_element, node) {
int ret = handle_notification_thread_command_unregister_trigger(
rcu_read_lock();
cds_lfht_for_each_entry (state->triggers_ht, &iter, trigger_ht_element, node) {
int ret = handle_notification_thread_command_unregister_trigger(
skip_capture:
notification = lttng_event_notifier_notification_create(
token, domain, capture_buffer, capture_buffer_size);
skip_capture:
notification = lttng_event_notifier_notification_create(
token, domain, capture_buffer, capture_buffer_size);
struct cds_lfht_node *node;
struct cds_lfht_iter iter;
struct notification_trigger_tokens_ht_element *element;
struct cds_lfht_node *node;
struct cds_lfht_iter iter;
struct notification_trigger_tokens_ht_element *element;
client_list = get_client_list_from_condition(
state, lttng_trigger_get_const_condition(element->trigger));
executor_status = action_executor_enqueue_trigger(
client_list = get_client_list_from_condition(
state, lttng_trigger_get_const_condition(element->trigger));
executor_status = action_executor_enqueue_trigger(
- state->executor, element->trigger, evaluation, NULL, client_list);
+ state->executor, element->trigger, evaluation, nullptr, client_list);
/* Reception failed, don't consider it fatal. */
ERR("Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
pipe,
/* Reception failed, don't consider it fatal. */
ERR("Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
pipe,
struct cds_lfht_node *node;
struct cds_lfht_iter iter;
struct lttng_channel_trigger_list *channel_trigger_list;
struct cds_lfht_node *node;
struct cds_lfht_iter iter;
struct lttng_channel_trigger_list *channel_trigger_list;
cds_list_for_each_entry (trigger_list_element, &session_trigger_list->list, node) {
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
cds_list_for_each_entry (trigger_list_element, &session_trigger_list->list, node) {
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
- struct notification_client_list *client_list = NULL;
- struct lttng_evaluation *evaluation = NULL;
+ struct notification_client_list *client_list = nullptr;
+ struct lttng_evaluation *evaluation = nullptr;
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &session_creds, client_list);
notification_client_list_put(client_list);
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &session_creds, client_list);
notification_client_list_put(client_list);
cds_list_for_each_entry (trigger_list_element, &channel_trigger_list->list, node) {
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
cds_list_for_each_entry (trigger_list_element, &channel_trigger_list->list, node) {
const struct lttng_condition *condition;
struct lttng_trigger *trigger;
- struct notification_client_list *client_list = NULL;
- struct lttng_evaluation *evaluation = NULL;
+ struct notification_client_list *client_list = nullptr;
+ struct lttng_evaluation *evaluation = nullptr;
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &channel_creds, client_list);
notification_client_list_put(client_list);
executor_status = action_executor_enqueue_trigger(
state->executor, trigger, evaluation, &channel_creds, client_list);
notification_client_list_put(client_list);