projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: kernel consumer: get next subbuffer EAGAIN handling
[lttng-tools.git]
/
src
/
common
/
error-query.c
diff --git
a/src/common/error-query.c
b/src/common/error-query.c
index d4395b467f265a8fda8f8e461692aeec78bb9ef2..01ed1ef216e9f3db5c1cccd318099f4f2b188ac6 100644
(file)
--- a/
src/common/error-query.c
+++ b/
src/common/error-query.c
@@
-12,7
+12,7
@@
#include <common/macros.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <lttng/action/action-internal.h>
#include <common/macros.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <lttng/action/action-internal.h>
-#include <lttng/action/
group
-internal.h>
+#include <lttng/action/
list
-internal.h>
#include <lttng/error-query-internal.h>
#include <lttng/error-query.h>
#include <lttng/trigger/trigger-internal.h>
#include <lttng/error-query-internal.h>
#include <lttng/error-query.h>
#include <lttng/trigger/trigger-internal.h>
@@
-47,9
+47,9
@@
struct lttng_error_query_action {
struct lttng_trigger *trigger;
/*
* Index of the target action. Since action lists can't be nested,
struct lttng_trigger *trigger;
/*
* Index of the target action. Since action lists can't be nested,
- * the targetted action is the top-level
group
if the action_index is
+ * the targetted action is the top-level
list
if the action_index is
* unset. Otherwise, the index refers to the index within the top-level
* unset. Otherwise, the index refers to the index within the top-level
- *
group
.
+ *
list
.
*/
LTTNG_OPTIONAL(unsigned int) action_index;
};
*/
LTTNG_OPTIONAL(unsigned int) action_index;
};
@@
-127,7
+127,7
@@
extern struct lttng_error_query *lttng_error_query_action_create(
const struct lttng_action *action)
{
struct lttng_error_query_action *query = NULL;
const struct lttng_action *action)
{
struct lttng_error_query_action *query = NULL;
- typeof(query->action_index) action_index;
+ typeof(query->action_index) action_index
= {}
;
struct lttng_trigger *trigger_copy = NULL;
if (!trigger || !action) {
struct lttng_trigger *trigger_copy = NULL;
if (!trigger || !action) {
@@
-145,24
+145,24
@@
extern struct lttng_error_query *lttng_error_query_action_create(
* action list.
*
* Note that action comparisons are performed by pointer since multiple
* action list.
*
* Note that action comparisons are performed by pointer since multiple
- * otherwise identical actions can be found in an action
group
(two
+ * otherwise identical actions can be found in an action
list
(two
* notify actions, for example).
*/
if (action != trigger->action &&
lttng_action_get_type(trigger->action) ==
* notify actions, for example).
*/
if (action != trigger->action &&
lttng_action_get_type(trigger->action) ==
- LTTNG_ACTION_TYPE_
GROUP
) {
- unsigned int i, action_
group
_count;
+ LTTNG_ACTION_TYPE_
LIST
) {
+ unsigned int i, action_
list
_count;
enum lttng_action_status action_status;
enum lttng_action_status action_status;
- action_status = lttng_action_
group
_get_count(
- trigger->action, &action_
group
_count);
+ action_status = lttng_action_
list
_get_count(
+ trigger->action, &action_
list
_count);
if (action_status != LTTNG_ACTION_STATUS_OK) {
goto error;
}
if (action_status != LTTNG_ACTION_STATUS_OK) {
goto error;
}
- for (i = 0; i < action_
group
_count; i++) {
+ for (i = 0; i < action_
list
_count; i++) {
const struct lttng_action *candidate_action =
const struct lttng_action *candidate_action =
- lttng_action_
group
_get_at_index(
+ lttng_action_
list
_get_at_index(
trigger->action, i);
assert(candidate_action);
trigger->action, i);
assert(candidate_action);
@@
-178,7
+178,7
@@
extern struct lttng_error_query *lttng_error_query_action_create(
}
} else {
/*
}
} else {
/*
- * Trigger action is not a
group
and not equal to the target
+ * Trigger action is not a
list
and not equal to the target
* action; invalid action provided.
*/
goto error;
* action; invalid action provided.
*/
goto error;
@@
-681,12
+681,12
@@
struct lttng_action *lttng_error_query_action_borrow_action_target(
target_action = trigger_action;
} else {
if (lttng_action_get_type(trigger_action) !=
target_action = trigger_action;
} else {
if (lttng_action_get_type(trigger_action) !=
- LTTNG_ACTION_TYPE_
GROUP
) {
- ERR("Invalid action error query target index: trigger action is not a
group
");
+ LTTNG_ACTION_TYPE_
LIST
) {
+ ERR("Invalid action error query target index: trigger action is not a
list
");
goto end;
}
goto end;
}
- target_action = lttng_action_
group
_borrow_mutable_at_index(
+ target_action = lttng_action_
list
_borrow_mutable_at_index(
trigger_action,
LTTNG_OPTIONAL_GET(query_action->action_index));
}
trigger_action,
LTTNG_OPTIONAL_GET(query_action->action_index));
}
@@
-739,6
+739,7
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
{
ssize_t used_size = 0;
struct lttng_error_query_comm *header;
{
ssize_t used_size = 0;
struct lttng_error_query_comm *header;
+ struct lttng_trigger *trigger = NULL;
struct lttng_payload_view header_view =
lttng_payload_view_from_view(view, 0, sizeof(*header));
struct lttng_payload_view header_view =
lttng_payload_view_from_view(view, 0, sizeof(*header));
@@
-754,7
+755,6
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
switch ((enum lttng_error_query_target_type) header->target_type) {
case LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER:
{
switch ((enum lttng_error_query_target_type) header->target_type) {
case LTTNG_ERROR_QUERY_TARGET_TYPE_TRIGGER:
{
- struct lttng_trigger *trigger;
ssize_t trigger_used_size;
struct lttng_payload_view trigger_view =
lttng_payload_view_from_view(
ssize_t trigger_used_size;
struct lttng_payload_view trigger_view =
lttng_payload_view_from_view(
@@
-775,7
+775,6
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
used_size += trigger_used_size;
*query = lttng_error_query_trigger_create(trigger);
used_size += trigger_used_size;
*query = lttng_error_query_trigger_create(trigger);
- lttng_trigger_put(trigger);
if (!*query) {
used_size = -1;
goto end;
if (!*query) {
used_size = -1;
goto end;
@@
-785,7
+784,6
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
}
case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION:
{
}
case LTTNG_ERROR_QUERY_TARGET_TYPE_ACTION:
{
- struct lttng_trigger *trigger;
const struct lttng_action *target_action;
ssize_t trigger_used_size;
struct lttng_error_query_action_comm *action_header;
const struct lttng_action *target_action;
ssize_t trigger_used_size;
struct lttng_error_query_action_comm *action_header;
@@
-829,19
+827,18
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
target_action = trigger->action;
} else {
if (lttng_action_get_type(trigger->action) !=
target_action = trigger->action;
} else {
if (lttng_action_get_type(trigger->action) !=
- LTTNG_ACTION_TYPE_
GROUP
) {
+ LTTNG_ACTION_TYPE_
LIST
) {
used_size = -1;
goto end;
}
used_size = -1;
goto end;
}
- target_action = lttng_action_
group
_get_at_index(
+ target_action = lttng_action_
list
_get_at_index(
trigger->action,
action_header->action_index.value);
}
*query = lttng_error_query_action_create(
trigger, target_action);
trigger->action,
action_header->action_index.value);
}
*query = lttng_error_query_action_create(
trigger, target_action);
- lttng_trigger_put(trigger);
if (!*query) {
used_size = -1;
goto end;
if (!*query) {
used_size = -1;
goto end;
@@
-855,6
+852,7
@@
ssize_t lttng_error_query_create_from_payload(struct lttng_payload_view *view,
}
end:
}
end:
+ lttng_trigger_put(trigger);
return used_size;
}
return used_size;
}
This page took
0.027587 seconds
and
4
git commands to generate.