projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng: move parse_userspace_probe_opts to a common util
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
action-executor.c
diff --git
a/src/bin/lttng-sessiond/action-executor.c
b/src/bin/lttng-sessiond/action-executor.c
index 27f0e472305b6a7a3eb5cafbb50fe8057d0392b5..8f8bae406c8994db1577f8ce455bb71163784cb6 100644
(file)
--- a/
src/bin/lttng-sessiond/action-executor.c
+++ b/
src/bin/lttng-sessiond/action-executor.c
@@
-425,9
+425,9
@@
static int action_executor_snapshot_session_handler(struct action_executor *exec
session_lock_list();
session = session_find_by_name(session_name);
if (!session) {
session_lock_list();
session = session_find_by_name(session_name);
if (!session) {
- DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%
p
`",
+ DBG("Failed to find session `%s` by name while executing `%s` action of trigger `%
s
`",
session_name, get_action_name(action),
session_name, get_action_name(action),
-
work_item->trigger
);
+
get_trigger_name(work_item->trigger)
);
goto error_unlock_list;
}
goto error_unlock_list;
}
@@
-501,7
+501,7
@@
static int action_executor_generic_handler(struct action_executor *executor,
assert(action_type != LTTNG_ACTION_TYPE_UNKNOWN);
assert(action_type != LTTNG_ACTION_TYPE_UNKNOWN);
- DBG("Executing action `%s` of trigger `%
p
` action work item %" PRIu64,
+ DBG("Executing action `%s` of trigger `%
s
` action work item %" PRIu64,
get_action_name(action),
get_trigger_name(work_item->trigger),
work_item->id);
get_action_name(action),
get_trigger_name(work_item->trigger),
work_item->id);
@@
-601,8
+601,10
@@
static bool shutdown_action_executor_thread(void *_data)
{
struct action_executor *executor = _data;
{
struct action_executor *executor = _data;
+ pthread_mutex_lock(&executor->work.lock);
executor->should_quit = true;
pthread_cond_signal(&executor->work.cond);
executor->should_quit = true;
pthread_cond_signal(&executor->work.cond);
+ pthread_mutex_unlock(&executor->work.lock);
return true;
}
return true;
}
@@
-690,7
+692,7
@@
enum action_executor_status action_executor_enqueue(
work_item = zmalloc(sizeof(*work_item));
if (!work_item) {
work_item = zmalloc(sizeof(*work_item));
if (!work_item) {
- PERROR("Failed to allocate action executor work item on behalf of trigger `%
p
`",
+ PERROR("Failed to allocate action executor work item on behalf of trigger `%
s
`",
get_trigger_name(trigger));
executor_status = ACTION_EXECUTOR_STATUS_ERROR;
goto error_unlock;
get_trigger_name(trigger));
executor_status = ACTION_EXECUTOR_STATUS_ERROR;
goto error_unlock;
@@
-721,15
+723,15
@@
enum action_executor_status action_executor_enqueue(
evaluation = NULL;
cds_list_add_tail(&work_item->list_node, &executor->work.list);
executor->work.pending_count++;
evaluation = NULL;
cds_list_add_tail(&work_item->list_node, &executor->work.list);
executor->work.pending_count++;
- DBG("Enqueued action for trigger `%
p` as work item
%" PRIu64,
+ DBG("Enqueued action for trigger `%
s` as work item #
%" PRIu64,
get_trigger_name(trigger), work_item_id);
signal = true;
error_unlock:
get_trigger_name(trigger), work_item_id);
signal = true;
error_unlock:
- pthread_mutex_unlock(&executor->work.lock);
if (signal) {
pthread_cond_signal(&executor->work.cond);
}
if (signal) {
pthread_cond_signal(&executor->work.cond);
}
+ pthread_mutex_unlock(&executor->work.lock);
lttng_evaluation_destroy(evaluation);
return executor_status;
lttng_evaluation_destroy(evaluation);
return executor_status;
This page took
0.024481 seconds
and
4
git commands to generate.