projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
action list: missing renames from previous name "group"
[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 588948146197b121ba224876d175d5fda763cc53..79c8677143ea3a829cb0a0581c3f2e513de0db33 100644
(file)
--- a/
src/bin/lttng-sessiond/action-executor.c
+++ b/
src/bin/lttng-sessiond/action-executor.c
@@
-16,8
+16,8
@@
#include <common/macros.h>
#include <common/optional.h>
#include <lttng/action/action-internal.h>
#include <common/macros.h>
#include <common/optional.h>
#include <lttng/action/action-internal.h>
-#include <lttng/action/
group
-internal.h>
-#include <lttng/action/
group
.h>
+#include <lttng/action/
list
-internal.h>
+#include <lttng/action/
list
.h>
#include <lttng/action/notify-internal.h>
#include <lttng/action/notify.h>
#include <lttng/action/rotate-session.h>
#include <lttng/action/notify-internal.h>
#include <lttng/action/notify.h>
#include <lttng/action/rotate-session.h>
@@
-135,7
+135,7
@@
static int action_executor_snapshot_session_handler(
struct action_executor *executor,
const struct action_work_item *,
struct action_work_subitem *);
struct action_executor *executor,
const struct action_work_item *,
struct action_work_subitem *);
-static int action_executor_
group
_handler(struct action_executor *executor,
+static int action_executor_
list
_handler(struct action_executor *executor,
const struct action_work_item *,
struct action_work_subitem *);
static int action_executor_generic_handler(struct action_executor *executor,
const struct action_work_item *,
struct action_work_subitem *);
static int action_executor_generic_handler(struct action_executor *executor,
@@
-148,7
+148,7
@@
static const action_executor_handler action_executors[] = {
[LTTNG_ACTION_TYPE_STOP_SESSION] = action_executor_stop_session_handler,
[LTTNG_ACTION_TYPE_ROTATE_SESSION] = action_executor_rotate_session_handler,
[LTTNG_ACTION_TYPE_SNAPSHOT_SESSION] = action_executor_snapshot_session_handler,
[LTTNG_ACTION_TYPE_STOP_SESSION] = action_executor_stop_session_handler,
[LTTNG_ACTION_TYPE_ROTATE_SESSION] = action_executor_rotate_session_handler,
[LTTNG_ACTION_TYPE_SNAPSHOT_SESSION] = action_executor_snapshot_session_handler,
- [LTTNG_ACTION_TYPE_
GROUP] = action_executor_group
_handler,
+ [LTTNG_ACTION_TYPE_
LIST] = action_executor_list
_handler,
};
/* Forward declaration */
};
/* Forward declaration */
@@
-206,7
+206,16
@@
static const char *get_trigger_name(const struct lttng_trigger *trigger)
enum lttng_trigger_status trigger_status;
trigger_status = lttng_trigger_get_name(trigger, &trigger_name);
enum lttng_trigger_status trigger_status;
trigger_status = lttng_trigger_get_name(trigger, &trigger_name);
- assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
+ switch (trigger_status) {
+ case LTTNG_TRIGGER_STATUS_OK:
+ break;
+ case LTTNG_TRIGGER_STATUS_UNSET:
+ trigger_name = "(anonymous)";
+ break;
+ default:
+ trigger_name = "(failed to get name)";
+ break;
+ }
return trigger_name;
}
return trigger_name;
}
@@
-651,11
+660,11
@@
end:
return ret;
}
return ret;
}
-static int action_executor_
group
_handler(struct action_executor *executor,
+static int action_executor_
list
_handler(struct action_executor *executor,
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
- ERR("Execution of a
group
action by the action executor should never occur");
+ ERR("Execution of a
list
action by the action executor should never occur");
abort();
}
abort();
}
@@
-772,17
+781,7
@@
static void *action_executor_thread(void *_data)
uid_t trigger_owner_uid;
enum lttng_trigger_status trigger_status;
uid_t trigger_owner_uid;
enum lttng_trigger_status trigger_status;
- trigger_status = lttng_trigger_get_name(
- work_item->trigger, &trigger_name);
- switch (trigger_status) {
- case LTTNG_TRIGGER_STATUS_OK:
- break;
- case LTTNG_TRIGGER_STATUS_UNSET:
- trigger_name = "(unset)";
- break;
- default:
- abort();
- }
+ trigger_name = get_trigger_name(work_item->trigger);
trigger_status = lttng_trigger_get_owner_uid(
work_item->trigger, &trigger_owner_uid);
trigger_status = lttng_trigger_get_owner_uid(
work_item->trigger, &trigger_owner_uid);
@@
-1011,16
+1010,16
@@
static int add_action_to_subitem_array(struct lttng_action *action,
assert(action);
assert(subitems);
assert(action);
assert(subitems);
- if (type == LTTNG_ACTION_TYPE_
GROUP
) {
+ if (type == LTTNG_ACTION_TYPE_
LIST
) {
unsigned int count, i;
unsigned int count, i;
- status = lttng_action_
group
_get_count(action, &count);
+ status = lttng_action_
list
_get_count(action, &count);
assert(status == LTTNG_ACTION_STATUS_OK);
for (i = 0; i < count; i++) {
struct lttng_action *inner_action = NULL;
assert(status == LTTNG_ACTION_STATUS_OK);
for (i = 0; i < count; i++) {
struct lttng_action *inner_action = NULL;
- inner_action = lttng_action_
group
_borrow_mutable_at_index(
+ inner_action = lttng_action_
list
_borrow_mutable_at_index(
action, i);
assert(inner_action);
ret = add_action_to_subitem_array(
action, i);
assert(inner_action);
ret = add_action_to_subitem_array(
@@
-1032,7
+1031,7
@@
static int add_action_to_subitem_array(struct lttng_action *action,
/*
* Go directly to the end since there is no need to add the
/*
* Go directly to the end since there is no need to add the
- *
group
action by itself to the subitems array.
+ *
list
action by itself to the subitems array.
*/
goto end;
}
*/
goto end;
}
@@
-1061,7
+1060,7
@@
static int add_action_to_subitem_array(struct lttng_action *action,
action, &session_name);
assert(status == LTTNG_ACTION_STATUS_OK);
break;
action, &session_name);
assert(status == LTTNG_ACTION_STATUS_OK);
break;
- case LTTNG_ACTION_TYPE_
GROUP
:
+ case LTTNG_ACTION_TYPE_
LIST
:
case LTTNG_ACTION_TYPE_UNKNOWN:
/* Fallthrough */
default:
case LTTNG_ACTION_TYPE_UNKNOWN:
/* Fallthrough */
default:
This page took
0.025129 seconds
and
4
git commands to generate.