projects
/
deliverable
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: always use sysconf to get the page size
[deliverable/lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
add_trigger.c
diff --git
a/src/bin/lttng/commands/add_trigger.c
b/src/bin/lttng/commands/add_trigger.c
index 00f8f47e363401400db7d613939b8be17923245e..27f6cc8c6e3312f7315ce4df59a09543f08e4057 100644
(file)
--- a/
src/bin/lttng/commands/add_trigger.c
+++ b/
src/bin/lttng/commands/add_trigger.c
@@
-18,6
+18,7
@@
#include "common/mi-lttng.h"
#include "common/string-utils/string-utils.h"
#include "common/utils.h"
#include "common/mi-lttng.h"
#include "common/string-utils/string-utils.h"
#include "common/utils.h"
+#include <lttng/domain-internal.h>
/* For lttng_event_rule_type_str(). */
#include <lttng/event-rule/event-rule-internal.h>
#include <lttng/lttng.h>
/* For lttng_event_rule_type_str(). */
#include <lttng/event-rule/event-rule-internal.h>
#include <lttng/lttng.h>
@@
-436,10
+437,10
@@
struct lttng_event_expr *ir_op_load_expr_to_event_expr(
const char *field_name;
load_expr_op = load_expr_op->next;
const char *field_name;
load_expr_op = load_expr_op->next;
-
assert
(load_expr_op);
-
assert
(load_expr_op->type == IR_LOAD_EXPRESSION_GET_SYMBOL);
+
LTTNG_ASSERT
(load_expr_op);
+
LTTNG_ASSERT
(load_expr_op->type == IR_LOAD_EXPRESSION_GET_SYMBOL);
field_name = load_expr_op->u.symbol;
field_name = load_expr_op->u.symbol;
-
assert
(field_name);
+
LTTNG_ASSERT
(field_name);
event_expr = load_expr_child_type == IR_LOAD_EXPRESSION_GET_PAYLOAD_ROOT ?
lttng_event_expr_event_payload_field_create(field_name) :
event_expr = load_expr_child_type == IR_LOAD_EXPRESSION_GET_PAYLOAD_ROOT ?
lttng_event_expr_event_payload_field_create(field_name) :
@@
-461,10
+462,10
@@
struct lttng_event_expr *ir_op_load_expr_to_event_expr(
const char *field_name;
load_expr_op = load_expr_op->next;
const char *field_name;
load_expr_op = load_expr_op->next;
-
assert
(load_expr_op);
-
assert
(load_expr_op->type == IR_LOAD_EXPRESSION_GET_SYMBOL);
+
LTTNG_ASSERT
(load_expr_op);
+
LTTNG_ASSERT
(load_expr_op->type == IR_LOAD_EXPRESSION_GET_SYMBOL);
field_name = load_expr_op->u.symbol;
field_name = load_expr_op->u.symbol;
-
assert
(field_name);
+
LTTNG_ASSERT
(field_name);
/*
* The field name needs to be of the form PROVIDER:TYPE. We
/*
* The field name needs to be of the form PROVIDER:TYPE. We
@@
-559,7
+560,7
@@
struct lttng_event_expr *ir_op_load_to_event_expr(
{
struct lttng_event_expr *event_expr = NULL;
{
struct lttng_event_expr *event_expr = NULL;
-
assert
(ir->op == IR_OP_LOAD);
+
LTTNG_ASSERT
(ir->op == IR_OP_LOAD);
switch (ir->data_type) {
case IR_DATA_EXPRESSION:
switch (ir->data_type) {
case IR_DATA_EXPRESSION:
@@
-608,7
+609,7
@@
struct lttng_event_expr *ir_op_root_to_event_expr(const struct ir_op *ir,
{
struct lttng_event_expr *event_expr = NULL;
{
struct lttng_event_expr *event_expr = NULL;
-
assert
(ir->op == IR_OP_ROOT);
+
LTTNG_ASSERT
(ir->op == IR_OP_ROOT);
ir = ir->u.root.child;
switch (ir->op) {
ir = ir->u.root.child;
switch (ir->op) {
@@
-705,7
+706,7
@@
struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
break;
}
break;
}
-
assert
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
+
LTTNG_ASSERT
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
@@
-831,7
+832,8
@@
struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
}
if (event_rule_type == LTTNG_EVENT_RULE_TYPE_UNKNOWN) {
}
if (event_rule_type == LTTNG_EVENT_RULE_TYPE_UNKNOWN) {
- event_rule_type = LTTNG_EVENT_RULE_TYPE_USER_TRACEPOINT;
+ ERR("Event rule requires a --type.");
+ goto error;
}
/*
}
/*
@@
-908,7
+910,7
@@
struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
* Update *argc and *argv so our caller can keep parsing what follows.
*/
consumed_args = argpar_state_get_ingested_orig_args(state);
* Update *argc and *argv so our caller can keep parsing what follows.
*/
consumed_args = argpar_state_get_ingested_orig_args(state);
-
assert
(consumed_args >= 0);
+
LTTNG_ASSERT
(consumed_args >= 0);
*argc -= consumed_args;
*argv += consumed_args;
*argc -= consumed_args;
*argv += consumed_args;
@@
-1237,7
+1239,7
@@
struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
goto error;
}
goto error;
}
-
assert
(kernel_probe_location);
+
LTTNG_ASSERT
(kernel_probe_location);
res.er = lttng_event_rule_kernel_kprobe_create(kernel_probe_location);
if (!res.er) {
ERR("Failed to create kprobe event rule.");
res.er = lttng_event_rule_kernel_kprobe_create(kernel_probe_location);
if (!res.er) {
ERR("Failed to create kprobe event rule.");
@@
-1383,8
+1385,8
@@
struct lttng_condition *handle_condition_event(int *argc, const char ***argv)
lttng_dynamic_array_get_element(
&res.capture_descriptors.array, i);
lttng_dynamic_array_get_element(
&res.capture_descriptors.array, i);
-
assert
(expr);
-
assert
(*expr);
+
LTTNG_ASSERT
(expr);
+
LTTNG_ASSERT
(*expr);
status = lttng_condition_event_rule_matches_append_capture_descriptor(
c, *expr);
if (status != LTTNG_CONDITION_STATUS_OK) {
status = lttng_condition_event_rule_matches_append_capture_descriptor(
c, *expr);
if (status != LTTNG_CONDITION_STATUS_OK) {
@@
-1465,7
+1467,7
@@
static struct lttng_rate_policy *parse_rate_policy(const char *policy_str)
char *policy_type_str;
char *policy_value_str;
char *policy_type_str;
char *policy_value_str;
-
assert
(policy_str);
+
LTTNG_ASSERT
(policy_str);
lttng_dynamic_pointer_array_init(&tokens, NULL);
/* Rate policy fields are separated by ':'. */
lttng_dynamic_pointer_array_init(&tokens, NULL);
/* Rate policy fields are separated by ':'. */
@@
-1563,7
+1565,7
@@
struct lttng_action *handle_action_notify(int *argc, const char ***argv)
break;
}
break;
}
-
assert
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
+
LTTNG_ASSERT
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
@@
-1584,7
+1586,7
@@
struct lttng_action *handle_action_notify(int *argc, const char ***argv)
} else {
const struct argpar_item_non_opt *item_non_opt;
} else {
const struct argpar_item_non_opt *item_non_opt;
-
assert
(item->type == ARGPAR_ITEM_TYPE_NON_OPT);
+
LTTNG_ASSERT
(item->type == ARGPAR_ITEM_TYPE_NON_OPT);
item_non_opt = (const struct argpar_item_non_opt *) item;
item_non_opt = (const struct argpar_item_non_opt *) item;
@@
-1651,8
+1653,8
@@
static struct lttng_action *handle_action_simple_session_with_policy(int *argc,
enum lttng_action_status action_status;
struct lttng_rate_policy *policy = NULL;
enum lttng_action_status action_status;
struct lttng_rate_policy *policy = NULL;
-
assert
(set_session_name_cb);
-
assert
(set_rate_policy_cb);
+
LTTNG_ASSERT
(set_session_name_cb);
+
LTTNG_ASSERT
(set_rate_policy_cb);
const struct argpar_opt_descr rate_policy_opt_descrs[] = {
{ OPT_RATE_POLICY, '\0', "rate-policy", true },
const struct argpar_opt_descr rate_policy_opt_descrs[] = {
{ OPT_RATE_POLICY, '\0', "rate-policy", true },
@@
-1681,7
+1683,7
@@
static struct lttng_action *handle_action_simple_session_with_policy(int *argc,
break;
}
break;
}
-
assert
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
+
LTTNG_ASSERT
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
(const struct argpar_item_opt *) item;
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
(const struct argpar_item_opt *) item;
@@
-1840,7
+1842,7
@@
struct lttng_action *handle_action_snapshot_session(int *argc,
break;
}
break;
}
-
assert
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
+
LTTNG_ASSERT
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
if (item->type == ARGPAR_ITEM_TYPE_OPT) {
const struct argpar_item_opt *item_opt =
@@
-1897,7
+1899,7
@@
struct lttng_action *handle_action_snapshot_session(int *argc,
} else {
const struct argpar_item_non_opt *item_non_opt;
} else {
const struct argpar_item_non_opt *item_non_opt;
-
assert
(item->type == ARGPAR_ITEM_TYPE_NON_OPT);
+
LTTNG_ASSERT
(item->type == ARGPAR_ITEM_TYPE_NON_OPT);
item_non_opt = (const struct argpar_item_non_opt *) item;
item_non_opt = (const struct argpar_item_non_opt *) item;
@@
-2241,7
+2243,7
@@
int cmd_add_trigger(int argc, const char **argv)
break;
}
break;
}
-
assert
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
+
LTTNG_ASSERT
(status == ARGPAR_STATE_PARSE_NEXT_STATUS_OK);
if (argpar_item->type == ARGPAR_ITEM_TYPE_NON_OPT) {
const struct argpar_item_non_opt *item_non_opt =
if (argpar_item->type == ARGPAR_ITEM_TYPE_NON_OPT) {
const struct argpar_item_non_opt *item_non_opt =
This page took
0.027343 seconds
and
5
git commands to generate.