#include <common/utils.h>
#include <common/align.h>
#include <common/time.h>
-#include <sys/eventfd.h>
#include <sys/stat.h>
#include <time.h>
#include <signal.h>
} else {
handle->channel_monitoring_pipes.kernel_consumer = -1;
}
+
end:
return handle;
error:
ret = cds_lfht_destroy(state->sessions_ht, NULL);
assert(!ret);
}
+ if (state->triggers_by_name_uid_ht) {
+ ret = cds_lfht_destroy(state->triggers_by_name_uid_ht, NULL);
+ assert(!ret);
+ }
+ if (state->trigger_tokens_ht) {
+ ret = cds_lfht_destroy(state->trigger_tokens_ht, NULL);
+ assert(!ret);
+ }
/*
* Must be destroyed after all channels have been destroyed.
* See comment in struct lttng_session_trigger_list.
notification_channel_socket_destroy(
state->notification_channel_socket);
}
+
+ assert(cds_list_empty(&state->tracer_event_sources_list));
+
if (state->executor) {
action_executor_destroy(state->executor);
}
memset(state, 0, sizeof(*state));
state->notification_channel_socket = -1;
+ state->trigger_id.next_tracer_token = 1;
lttng_poll_init(&state->events);
ret = notification_channel_socket_create();
if (!state->triggers_ht) {
goto error;
}
+ state->triggers_by_name_uid_ht = cds_lfht_new(DEFAULT_HT_SIZE,
+ 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL);
+ if (!state->triggers_by_name_uid_ht) {
+ goto error;
+ }
+
+ state->trigger_tokens_ht = cds_lfht_new(DEFAULT_HT_SIZE,
+ 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL);
+ if (!state->trigger_tokens_ht) {
+ goto error;
+ }
+
+ CDS_INIT_LIST_HEAD(&state->tracer_event_sources_list);
state->executor = action_executor_create(handle);
if (!state->executor) {