#include <common/dynamic-array.hpp>
#include <common/macros.hpp>
#include <common/optional.hpp>
#include <common/dynamic-array.hpp>
#include <common/macros.hpp>
#include <common/optional.hpp>
action_status = lttng_action_start_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_start_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
action_status = lttng_action_stop_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_stop_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
action_status = lttng_action_rotate_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
action_status = lttng_action_rotate_session_get_session_name(action, &session_name);
if (action_status != LTTNG_ACTION_STATUS_OK) {
ERR("Failed to get session name from `%s` action", get_action_name(action));
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
- session, NULL, false, LTTNG_TRACE_CHUNK_COMMAND_TYPE_MOVE_TO_COMPLETED);
+ session, nullptr, false, LTTNG_TRACE_CHUNK_COMMAND_TYPE_MOVE_TO_COMPLETED);
/*
* Validate if, at the moment the action was queued, the target session
* existed. If not, skip the action altogether.
/*
* Validate if, at the moment the action was queued, the target session
* existed. If not, skip the action altogether.
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
session = session_find_by_id(LTTNG_OPTIONAL_GET(item->context.session_id));
if (!session) {
DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%s`",
/* Execute item only if a trigger is registered. */
lttng_trigger_lock(work_item->trigger);
if (!lttng_trigger_is_registered(work_item->trigger)) {
/* Execute item only if a trigger is registered. */
lttng_trigger_lock(work_item->trigger);
if (!lttng_trigger_is_registered(work_item->trigger)) {
- pthread_cond_init(&executor->work.cond, NULL);
- pthread_mutex_init(&executor->work.lock, NULL);
+ pthread_cond_init(&executor->work.cond, nullptr);
+ pthread_mutex_init(&executor->work.lock, nullptr);
executor->notification_thread_handle = handle;
executor->thread = lttng_thread_create(THREAD_NAME,
executor->notification_thread_handle = handle;
executor->thread = lttng_thread_create(THREAD_NAME,
inner_action = lttng_action_list_borrow_mutable_at_index(action, i);
LTTNG_ASSERT(inner_action);
inner_action = lttng_action_list_borrow_mutable_at_index(action, i);
LTTNG_ASSERT(inner_action);