Files renaming is following.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icf74aa7cc84b46b1f23bbe1418b7e1241d8dc081
LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW = 102,
LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING = 103,
LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED = 104,
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT = 105,
+ LTTNG_CONDITION_TYPE_ON_EVENT = 105,
};
enum lttng_condition_status {
*
*/
-#ifndef LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
-#define LTTNG_CONDITION_EVENT_RULE_INTERNAL_H
+#ifndef LTTNG_CONDITION_ON_EVENT_INTERNAL_H
+#define LTTNG_CONDITION_ON_EVENT_INTERNAL_H
#include <lttng/condition/condition-internal.h>
#include <common/buffer-view.h>
struct lttng_bytecode *bytecode;
};
-struct lttng_condition_event_rule {
+struct lttng_condition_on_event {
struct lttng_condition parent;
struct lttng_event_rule *rule;
struct lttng_dynamic_pointer_array capture_descriptors;
};
-struct lttng_evaluation_event_rule {
+struct lttng_evaluation_on_event {
struct lttng_evaluation parent;
char *name;
struct lttng_event_field_value *captured_values;
};
-struct lttng_evaluation_event_rule_comm {
+struct lttng_evaluation_on_event_comm {
/* Includes the null terminator. */
uint32_t trigger_name_length;
/* Trigger name. */
} LTTNG_PACKED;
LTTNG_HIDDEN
-ssize_t lttng_condition_event_rule_create_from_payload(
+ssize_t lttng_condition_on_event_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **condition);
LTTNG_HIDDEN
enum lttng_condition_status
-lttng_condition_event_rule_borrow_rule_mutable(
+lttng_condition_on_event_borrow_rule_mutable(
const struct lttng_condition *condition,
struct lttng_event_rule **rule);
LTTNG_HIDDEN
-struct lttng_evaluation *lttng_evaluation_event_rule_create(
- const struct lttng_condition_event_rule *condition,
+struct lttng_evaluation *lttng_evaluation_on_event_create(
+ const struct lttng_condition_on_event *condition,
const char* trigger_name,
const char *capture_payload, size_t capture_payload_size,
bool decode_capture_payload);
LTTNG_HIDDEN
-ssize_t lttng_evaluation_event_rule_create_from_payload(
- const struct lttng_condition_event_rule *condition,
+ssize_t lttng_evaluation_on_event_create_from_payload(
+ const struct lttng_condition_on_event *condition,
struct lttng_payload_view *view,
struct lttng_evaluation **_evaluation);
LTTNG_HIDDEN
enum lttng_error_code
-lttng_condition_event_rule_generate_capture_descriptor_bytecode(
+lttng_condition_on_event_generate_capture_descriptor_bytecode(
struct lttng_condition *condition);
LTTNG_HIDDEN
const struct lttng_bytecode *
-lttng_condition_event_rule_get_capture_bytecode_at_index(
+lttng_condition_on_event_get_capture_bytecode_at_index(
const struct lttng_condition *condition, unsigned int index);
-#endif /* LTTNG_CONDITION_EVENT_RULE_INTERNAL_H */
+#endif /* LTTNG_CONDITION_ON_EVENT_INTERNAL_H */
*
*/
-#ifndef LTTNG_CONDITION_EVENT_RULE_H
-#define LTTNG_CONDITION_EVENT_RULE_H
+#ifndef LTTNG_CONDITION_ON_EVENT_H
+#define LTTNG_CONDITION_ON_EVENT_H
#include <lttng/event-rule/event-rule.h>
#include <lttng/condition/condition.h>
struct lttng_event_field_value;
/**
- * Event rule conditions allows an action to be taken whenever an event matching
- * the event rule is hit by the tracers.
+ * On event conditions allows an action to be taken whenever an event matching
+ * the on event is hit by the tracers.
*
- * An event rule condition can also specify a payload to be captured at runtime.
+ * An on event condition can also specify a payload to be captured at runtime.
* This is done via the capture descriptor.
*
* Note: the dynamic runtime capture of payload is only available for the
*/
/*
- * Create a newly allocated event rule condition.
+ * Create a newly allocated on event condition.
*
* Returns a new condition on success, NULL on failure. This condition must be
* destroyed using lttng_condition_destroy().
*/
-extern struct lttng_condition *lttng_condition_event_rule_create(
+extern struct lttng_condition *lttng_condition_on_event_create(
struct lttng_event_rule *rule);
/*
- * Get the rule property of a event rule condition.
+ * Get the rule property of a on event condition.
*
* The caller does not assume the ownership of the returned rule. The
* rule shall only be used for the duration of the condition's
* Returns LTTNG_CONDITION_STATUS_OK and a pointer to the condition's rule
* on success, LTTNG_CONDITION_STATUS_INVALID if an invalid
* parameter is passed. */
-extern enum lttng_condition_status lttng_condition_event_rule_get_rule(
- const struct lttng_condition *condition,
+extern enum lttng_condition_status lttng_condition_on_event_get_rule(
+ const struct lttng_condition *condition,
const struct lttng_event_rule **rule);
/**
- * lttng_evaluation_event_rule_hit are specialised lttng_evaluations which
+ * lttng_evaluation_on_event_hit are specialised lttng_evaluations which
* allow users to query a number of properties resulting from the evaluation
* of a condition which evaluated to true.
*
- * The evaluation of a event rule hit yields two different results:
+ * The evaluation of a on event hit yields two different results:
* TEMPORARY - The name of the triggers associated with the condition.
* TODO - The captured event payload if any
*/
/*
- * Get the trigger name property of a event rule hit evaluation.
+ * Get the trigger name property of a on event hit evaluation.
*
* Returns LTTNG_EVALUATION_STATUS_OK on success and a trigger name
* or LTTNG_EVALUATION_STATUS_INVALID if
* an invalid parameter is passed.
*/
extern enum lttng_evaluation_status
-lttng_evaluation_event_rule_get_trigger_name(
+lttng_evaluation_on_event_get_trigger_name(
const struct lttng_evaluation *evaluation,
const char **name);
/*
- * Sets `*field_val` to the array event field value of the event rule
+ * Sets `*field_val` to the array event field value of the on event
* condition evaluation `evaluation` which contains its captured values.
*
* Returns:
* `LTTNG_EVALUATION_STATUS_INVALID`:
* * `evaluation` is `NULL`.
* * The type of the condition of `evaluation` is not
- * `LTTNG_CONDITION_TYPE_EVENT_RULE_HIT`.
+ * `LTTNG_CONDITION_TYPE_ON_EVENT`.
* * The condition of `evaluation` has no capture descriptors.
* * `field_val` is `NULL`.
*/
extern enum lttng_evaluation_status
-lttng_evaluation_event_rule_get_captured_values(
+lttng_evaluation_on_event_get_captured_values(
const struct lttng_evaluation *evaluation,
const struct lttng_event_field_value **field_val);
/*
* Appends (transfering the ownership) the capture descriptor `expr` to
- * the event rule condition `condition`.
+ * the on event condition `condition`.
*
* Returns:
*
* `LTTNG_CONDITION_STATUS_INVALID`:
* * `condition` is `NULL`.
* * The type of `condition` is not
- * `LTTNG_CONDITION_TYPE_EVENT_RULE_HIT`.
+ * `LTTNG_CONDITION_TYPE_ON_EVENT`.
* * `expr` is `NULL`.
* * `expr` is not a locator expression, that is, its type is not
* one of:
* * The associated event-rule does not support runtime capture.
*/
extern enum lttng_condition_status
-lttng_condition_event_rule_append_capture_descriptor(
+lttng_condition_on_event_append_capture_descriptor(
struct lttng_condition *condition,
struct lttng_event_expr *expr);
/*
- * Sets `*count` to the number of capture descriptors in the event rule
+ * Sets `*count` to the number of capture descriptors in the on event
* condition `condition`.
*
* Returns:
* `LTTNG_CONDITION_STATUS_INVALID`:
* * `condition` is `NULL`.
* * The type of `condition` is not
- * `LTTNG_CONDITION_TYPE_EVENT_RULE_HIT`.
+ * `LTTNG_CONDITION_TYPE_ON_EVENT`.
* * `count` is `NULL`.
*/
extern enum lttng_condition_status
-lttng_condition_event_rule_get_capture_descriptor_count(
+lttng_condition_on_event_get_capture_descriptor_count(
const struct lttng_condition *condition, unsigned int *count);
/*
- * Returns the capture descriptor (borrowed) of the event rule condition
+ * Returns the capture descriptor (borrowed) of the on event condition
* `condition` at the index `index`, or `NULL` if:
*
* * `condition` is `NULL`.
* * The type of `condition` is not
- * `LTTNG_CONDITION_TYPE_EVENT_RULE_HIT`.
+ * `LTTNG_CONDITION_TYPE_ON_EVENT`.
* * `index` is greater than or equal to the number of capture
* descriptors in `condition` (as returned by
- * lttng_condition_event_rule_get_capture_descriptor_count()).
+ * lttng_condition_on_event_get_capture_descriptor_count()).
*/
extern const struct lttng_event_expr *
-lttng_condition_event_rule_get_capture_descriptor_at_index(
+lttng_condition_on_event_get_capture_descriptor_at_index(
const struct lttng_condition *condition, unsigned int index);
#ifdef __cplusplus
}
#endif
-#endif /* LTTNG_CONDITION_EVENT_RULE_H */
+#endif /* LTTNG_CONDITION_ON_EVENT_H */
condition = lttng_trigger_get_const_condition(trigger);
assert(lttng_condition_get_type(condition) ==
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ LTTNG_CONDITION_TYPE_ON_EVENT);
- c_status = lttng_condition_event_rule_get_rule(condition, &rule);
+ c_status = lttng_condition_on_event_get_rule(condition, &rule);
assert(c_status == LTTNG_CONDITION_STATUS_OK);
assert(lttng_event_rule_get_type(rule) ==
}
*adds_event_notifier = lttng_condition_get_type(condition) ==
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT;
+ LTTNG_CONDITION_TYPE_ON_EVENT;
end:
return ret_code;
}
}
static
-unsigned long lttng_condition_event_rule_hash(
+unsigned long lttng_condition_on_event_hash(
const struct lttng_condition *condition)
{
unsigned long hash, condition_type;
const struct lttng_event_rule *event_rule;
condition_type = (unsigned long) condition->type;
-
- condition_status = lttng_condition_event_rule_get_rule(condition,
+ condition_status = lttng_condition_on_event_get_rule(condition,
&event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING:
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
return lttng_condition_session_rotation_hash(condition);
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
- return lttng_condition_event_rule_hash(condition);
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
+ return lttng_condition_on_event_hash(condition);
default:
//ERR("[notification-thread] Unexpected condition type caught");
abort();
condition = lttng_trigger_get_const_condition(trigger);
assert(lttng_condition_get_type(condition) ==
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ LTTNG_CONDITION_TYPE_ON_EVENT);
- c_status = lttng_condition_event_rule_get_rule(condition, &rule);
+ c_status = lttng_condition_on_event_get_rule(condition, &rule);
assert(c_status == LTTNG_CONDITION_STATUS_OK);
assert(lttng_event_rule_get_type(rule) ==
assert(condition);
condition_type = lttng_condition_get_type(condition);
- assert(condition_type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ assert(condition_type == LTTNG_CONDITION_TYPE_ON_EVENT);
/* Does not acquire a reference. */
- condition_status = lttng_condition_event_rule_get_rule(
+ condition_status = lttng_condition_on_event_get_rule(
condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
assert(event_rule);
}
}
- /* Set the capture bytecode, if any. */
- cond_status = lttng_condition_event_rule_get_capture_descriptor_count(
+ /* Set the capture bytecode if any. */
+ cond_status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &capture_bytecode_count);
assert(cond_status == LTTNG_CONDITION_STATUS_OK);
for (i = 0; i < capture_bytecode_count; i++) {
const struct lttng_bytecode *capture_bytecode =
- lttng_condition_event_rule_get_capture_bytecode_at_index(
+ lttng_condition_on_event_get_capture_bytecode_at_index(
condition, i);
if (capture_bytecode == NULL) {
assert(condition);
/* Does not acquire a reference to the event rule. */
- status = lttng_condition_event_rule_get_rule(
+ status = lttng_condition_on_event_get_rule(
condition, &event_rule);
assert(status == LTTNG_CONDITION_STATUS_OK);
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING:
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
return LTTNG_OBJECT_TYPE_SESSION;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
return LTTNG_OBJECT_TYPE_NONE;
default:
return LTTNG_OBJECT_TYPE_UNKNOWN;
is_supported = kernel_supports_ring_buffer_snapshot_sample_positions() == 1;
break;
}
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
{
const struct lttng_event_rule *event_rule;
enum lttng_domain_type domain;
const enum lttng_condition_status status =
- lttng_condition_event_rule_get_rule(
+ lttng_condition_on_event_get_rule(
condition, &event_rule);
assert(status == LTTNG_CONDITION_STATUS_OK);
goto error_free_ht_element;
}
- if (lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT) {
+ if (lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_ON_EVENT) {
trigger_tokens_ht_element = zmalloc(sizeof(*trigger_tokens_ht_element));
if (!trigger_tokens_ht_element) {
/* Fatal error. */
}
if (lttng_condition_get_type(condition) ==
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT) {
+ LTTNG_CONDITION_TYPE_ON_EVENT) {
struct notification_trigger_tokens_ht_element
*trigger_tokens_ht_element;
trigger_status = lttng_trigger_get_name(element->trigger, &trigger_name);
assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
- if (lttng_condition_event_rule_get_capture_descriptor_count(
+ if (lttng_condition_on_event_get_capture_descriptor_count(
lttng_trigger_get_const_condition(element->trigger),
&capture_count) != LTTNG_CONDITION_STATUS_OK) {
ERR("Failed to get capture count");
goto end;
}
- evaluation = lttng_evaluation_event_rule_create(
+ evaluation = lttng_evaluation_on_event_create(
container_of(lttng_trigger_get_const_condition(
element->trigger),
- struct lttng_condition_event_rule,
+ struct lttng_condition_on_event,
parent),
trigger_name,
notification->capture_buffer,
assert(condition);
condition_type = lttng_condition_get_type(condition);
- assert(condition_type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ assert(condition_type == LTTNG_CONDITION_TYPE_ON_EVENT);
- condition_status = lttng_condition_event_rule_get_rule(
+ condition_status = lttng_condition_on_event_get_rule(
condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
assert(event_rule);
condition = lttng_trigger_get_condition(trigger);
assert(condition);
- assert(lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ assert(lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_ON_EVENT);
- assert(LTTNG_CONDITION_STATUS_OK == lttng_condition_event_rule_get_rule(condition, &event_rule));
+ assert(LTTNG_CONDITION_STATUS_OK == lttng_condition_on_event_get_rule(condition, &event_rule));
assert(event_rule);
/* Acquire the event notifier's reference to the trigger. */
condition = lttng_trigger_get_const_condition(
ua_event_notifier_rule->trigger);
assert(condition);
- assert(lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
+ assert(lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_ON_EVENT);
- condition_status = lttng_condition_event_rule_get_rule(condition, &event_rule);
+ condition_status = lttng_condition_on_event_get_rule(
+ condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
+
assert(event_rule);
assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_TRACEPOINT);
}
/* Set the capture bytecodes. */
- cond_status = lttng_condition_event_rule_get_capture_descriptor_count(
+ cond_status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &capture_bytecode_count);
assert(cond_status == LTTNG_CONDITION_STATUS_OK);
for (i = 0; i < capture_bytecode_count; i++) {
const struct lttng_bytecode *capture_bytecode =
- lttng_condition_event_rule_get_capture_bytecode_at_index(
+ lttng_condition_on_event_get_capture_bytecode_at_index(
condition, i);
ret = set_ust_capture(app, capture_bytecode, i,
token = lttng_trigger_get_tracer_token(trigger);
condition = lttng_trigger_get_condition(trigger);
- if (lttng_condition_get_type(condition) != LTTNG_CONDITION_TYPE_EVENT_RULE_HIT) {
+ if (lttng_condition_get_type(condition) != LTTNG_CONDITION_TYPE_ON_EVENT) {
/* Does not apply */
continue;
}
- condition_status = lttng_condition_event_rule_borrow_rule_mutable(condition, &event_rule);
+ condition_status = lttng_condition_on_event_borrow_rule_mutable(condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
if (lttng_event_rule_get_domain_type(event_rule) == LTTNG_DOMAIN_KERNEL) {
goto error;
}
- c = lttng_condition_event_rule_create(res.er);
+ c = lttng_condition_on_event_create(res.er);
lttng_event_rule_destroy(res.er);
res.er = NULL;
if (!c) {
assert(expr);
assert(*expr);
- status = lttng_condition_event_rule_append_capture_descriptor(
+ status = lttng_condition_on_event_append_capture_descriptor(
c, *expr);
if (status != LTTNG_CONDITION_STATUS_OK) {
if (status == LTTNG_CONDITION_STATUS_UNSUPPORTED) {
}
static
-void print_condition_event_rule_hit(const struct lttng_condition *condition)
+void print_condition_on_event(const struct lttng_condition *condition)
{
const struct lttng_event_rule *event_rule;
enum lttng_condition_status condition_status;
unsigned int cap_desc_count, i;
condition_status =
- lttng_condition_event_rule_get_rule(condition, &event_rule);
+ lttng_condition_on_event_get_rule(condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
print_event_rule(event_rule);
condition_status =
- lttng_condition_event_rule_get_capture_descriptor_count(
+ lttng_condition_on_event_get_capture_descriptor_count(
condition, &cap_desc_count);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
for (i = 0; i < cap_desc_count; i++) {
const struct lttng_event_expr *cap_desc =
- lttng_condition_event_rule_get_capture_descriptor_at_index(
+ lttng_condition_on_event_get_capture_descriptor_at_index(
condition, i);
_MSG(" - ");
condition_type = lttng_condition_get_type(condition);
MSG(" condition: %s", lttng_condition_type_str(condition_type));
switch (condition_type) {
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
- print_condition_event_rule_hit(condition);
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
+ print_condition_on_event(condition);
break;
default:
MSG(" (condition type not handled in %s)", __func__);
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
create_from_payload = lttng_condition_session_rotation_completed_create_from_payload;
break;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
- create_from_payload = lttng_condition_event_rule_create_from_payload;
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
+ create_from_payload = lttng_condition_on_event_create_from_payload;
break;
default:
ERR("Attempted to create condition of unknown type (%i)",
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
return "session rotation completed";
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
return "event rule hit";
default:
#include <stdint.h>
#include <vendor/msgpack/msgpack.h>
-#define IS_EVENT_RULE_CONDITION(condition) \
+#define IS_ON_EVENT_CONDITION(condition) \
(lttng_condition_get_type(condition) == \
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT)
+ LTTNG_CONDITION_TYPE_ON_EVENT)
-static bool is_event_rule_evaluation(const struct lttng_evaluation *evaluation)
+static bool is_on_event_evaluation(const struct lttng_evaluation *evaluation)
{
enum lttng_condition_type type = lttng_evaluation_get_type(evaluation);
- return type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT;
+ return type == LTTNG_CONDITION_TYPE_ON_EVENT;
}
-static bool lttng_condition_event_rule_validate(
+static bool lttng_condition_on_event_validate(
const struct lttng_condition *condition);
-static int lttng_condition_event_rule_serialize(
+static int lttng_condition_on_event_serialize(
const struct lttng_condition *condition,
struct lttng_payload *payload);
-static bool lttng_condition_event_rule_is_equal(
+static bool lttng_condition_on_event_is_equal(
const struct lttng_condition *_a,
const struct lttng_condition *_b);
-static void lttng_condition_event_rule_destroy(
+static void lttng_condition_on_event_destroy(
struct lttng_condition *condition);
-static bool lttng_condition_event_rule_validate(
+static bool lttng_condition_on_event_validate(
const struct lttng_condition *condition)
{
bool valid = false;
- struct lttng_condition_event_rule *event_rule;
+ struct lttng_condition_on_event *event_rule;
if (!condition) {
goto end;
}
event_rule = container_of(
- condition, struct lttng_condition_event_rule, parent);
+ condition, struct lttng_condition_on_event, parent);
if (!event_rule->rule) {
- ERR("Invalid event rule condition: a rule must be set");
+ ERR("Invalid on event condition: a rule must be set");
goto end;
}
static
struct lttng_capture_descriptor *
-lttng_condition_event_rule_get_internal_capture_descriptor_at_index(
+lttng_condition_on_event_get_internal_capture_descriptor_at_index(
const struct lttng_condition *condition, unsigned int index)
{
- const struct lttng_condition_event_rule *event_rule_cond =
+ const struct lttng_condition_on_event *on_event_cond =
container_of(condition,
- const struct lttng_condition_event_rule,
+ const struct lttng_condition_on_event,
parent);
struct lttng_capture_descriptor *desc = NULL;
unsigned int count;
enum lttng_condition_status status;
- if (!condition || !IS_EVENT_RULE_CONDITION(condition)) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition)) {
goto end;
}
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &count);
if (status != LTTNG_CONDITION_STATUS_OK) {
goto end;
}
desc = lttng_dynamic_pointer_array_get_pointer(
- &event_rule_cond->capture_descriptors, index);
+ &on_event_cond->capture_descriptors, index);
end:
return desc;
}
-static int lttng_condition_event_rule_serialize(
+static int lttng_condition_on_event_serialize(
const struct lttng_condition *condition,
struct lttng_payload *payload)
{
int ret;
- struct lttng_condition_event_rule *event_rule;
+ struct lttng_condition_on_event *on_event_condition;
enum lttng_condition_status status;
/* Used for iteration and communication (size matters). */
uint32_t i, capture_descr_count;
- if (!condition || !IS_EVENT_RULE_CONDITION(condition)) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition)) {
ret = -1;
goto end;
}
- DBG("Serializing event rule condition");
- event_rule = container_of(
- condition, struct lttng_condition_event_rule, parent);
+ DBG("Serializing on event condition");
+ on_event_condition = container_of(
+ condition, struct lttng_condition_on_event, parent);
- DBG("Serializing event rule condition's event rule");
- ret = lttng_event_rule_serialize(event_rule->rule, payload);
+ DBG("Serializing on event condition's event rule");
+ ret = lttng_event_rule_serialize(on_event_condition->rule, payload);
if (ret) {
goto end;
}
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &capture_descr_count);
if (status != LTTNG_CONDITION_STATUS_OK) {
ret = -1;
goto end;
};
- DBG("Serializing event rule condition's capture descriptor count: %" PRIu32,
+ DBG("Serializing on event condition's capture descriptor count: %" PRIu32,
capture_descr_count);
ret = lttng_dynamic_buffer_append(&payload->buffer, &capture_descr_count,
sizeof(capture_descr_count));
for (i = 0; i < capture_descr_count; i++) {
const struct lttng_capture_descriptor *desc =
- lttng_condition_event_rule_get_internal_capture_descriptor_at_index(
+ lttng_condition_on_event_get_internal_capture_descriptor_at_index(
condition, i);
- DBG("Serializing event rule condition's capture descriptor %" PRIu32,
+ DBG("Serializing on event condition's capture descriptor %" PRIu32,
i);
ret = serialize_event_expr(desc->event_expression, payload);
if (ret) {
size_t i;
enum lttng_condition_status status;
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition_a, &capture_descr_count_a);
if (status != LTTNG_CONDITION_STATUS_OK) {
goto not_equal;
}
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition_b, &capture_descr_count_b);
if (status != LTTNG_CONDITION_STATUS_OK) {
goto not_equal;
for (i = 0; i < capture_descr_count_a; i++) {
const struct lttng_event_expr *expr_a =
- lttng_condition_event_rule_get_capture_descriptor_at_index(
+ lttng_condition_on_event_get_capture_descriptor_at_index(
condition_a,
i);
const struct lttng_event_expr *expr_b =
- lttng_condition_event_rule_get_capture_descriptor_at_index(
+ lttng_condition_on_event_get_capture_descriptor_at_index(
condition_b,
i);
return is_equal;
}
-static bool lttng_condition_event_rule_is_equal(
+static bool lttng_condition_on_event_is_equal(
const struct lttng_condition *_a,
const struct lttng_condition *_b)
{
bool is_equal = false;
- struct lttng_condition_event_rule *a, *b;
+ struct lttng_condition_on_event *a, *b;
- a = container_of(_a, struct lttng_condition_event_rule, parent);
- b = container_of(_b, struct lttng_condition_event_rule, parent);
+ a = container_of(_a, struct lttng_condition_on_event, parent);
+ b = container_of(_b, struct lttng_condition_on_event, parent);
/* Both event rules must be set or both must be unset. */
if ((a->rule && !b->rule) || (!a->rule && b->rule)) {
return is_equal;
}
-static void lttng_condition_event_rule_destroy(
+static void lttng_condition_on_event_destroy(
struct lttng_condition *condition)
{
- struct lttng_condition_event_rule *event_rule;
+ struct lttng_condition_on_event *on_event_condition;
- event_rule = container_of(
- condition, struct lttng_condition_event_rule, parent);
+ on_event_condition = container_of(
+ condition, struct lttng_condition_on_event, parent);
- lttng_event_rule_put(event_rule->rule);
- lttng_dynamic_pointer_array_reset(&event_rule->capture_descriptors);
- free(event_rule);
+ lttng_event_rule_put(on_event_condition->rule);
+ lttng_dynamic_pointer_array_reset(&on_event_condition->capture_descriptors);
+ free(on_event_condition);
}
static
free(desc);
}
-struct lttng_condition *lttng_condition_event_rule_create(
+struct lttng_condition *lttng_condition_on_event_create(
struct lttng_event_rule *rule)
{
struct lttng_condition *parent = NULL;
- struct lttng_condition_event_rule *condition = NULL;
+ struct lttng_condition_on_event *condition = NULL;
if (!rule) {
goto end;
}
- condition = zmalloc(sizeof(struct lttng_condition_event_rule));
+ condition = zmalloc(sizeof(struct lttng_condition_on_event));
if (!condition) {
return NULL;
}
lttng_condition_init(&condition->parent,
- LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
- condition->parent.validate = lttng_condition_event_rule_validate,
- condition->parent.serialize = lttng_condition_event_rule_serialize,
- condition->parent.equal = lttng_condition_event_rule_is_equal,
- condition->parent.destroy = lttng_condition_event_rule_destroy,
+ LTTNG_CONDITION_TYPE_ON_EVENT);
+ condition->parent.validate = lttng_condition_on_event_validate,
+ condition->parent.serialize = lttng_condition_on_event_serialize,
+ condition->parent.equal = lttng_condition_on_event_is_equal,
+ condition->parent.destroy = lttng_condition_on_event_destroy,
lttng_event_rule_get(rule);
condition->rule = rule;
}
LTTNG_HIDDEN
-ssize_t lttng_condition_event_rule_create_from_payload(
+ssize_t lttng_condition_on_event_create_from_payload(
struct lttng_payload_view *view,
struct lttng_condition **_condition)
{
goto error;
}
- /* Create condition (no capture descriptors yet) at this point. */
- condition = lttng_condition_event_rule_create(event_rule);
+ /* Create condition (no capture descriptors yet) at this point */
+ condition = lttng_condition_on_event_create(event_rule);
if (!condition) {
goto error;
}
-
/* Capture descriptor count. */
assert(event_rule_length >= 0);
offset += (size_t) event_rule_length;
}
/* Move ownership of `expr` to `condition`. */
- status = lttng_condition_event_rule_append_capture_descriptor(
+ status = lttng_condition_on_event_append_capture_descriptor(
condition, expr);
if (status != LTTNG_CONDITION_STATUS_OK) {
/* `expr` not moved: destroy it. */
}
LTTNG_HIDDEN
-enum lttng_condition_status lttng_condition_event_rule_borrow_rule_mutable(
+enum lttng_condition_status lttng_condition_on_event_borrow_rule_mutable(
const struct lttng_condition *condition,
struct lttng_event_rule **rule)
{
- struct lttng_condition_event_rule *event_rule;
+ struct lttng_condition_on_event *event_rule;
enum lttng_condition_status status = LTTNG_CONDITION_STATUS_OK;
- if (!condition || !IS_EVENT_RULE_CONDITION(condition) || !rule) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition) || !rule) {
status = LTTNG_CONDITION_STATUS_INVALID;
goto end;
}
event_rule = container_of(
- condition, struct lttng_condition_event_rule, parent);
+ condition, struct lttng_condition_on_event, parent);
if (!event_rule->rule) {
status = LTTNG_CONDITION_STATUS_UNSET;
goto end;
return status;
}
-enum lttng_condition_status lttng_condition_event_rule_get_rule(
+enum lttng_condition_status lttng_condition_on_event_get_rule(
const struct lttng_condition *condition,
const struct lttng_event_rule **rule)
{
struct lttng_event_rule *mutable_rule = NULL;
const enum lttng_condition_status status =
- lttng_condition_event_rule_borrow_rule_mutable(
+ lttng_condition_on_event_borrow_rule_mutable(
condition, &mutable_rule);
*rule = mutable_rule;
}
enum lttng_condition_status
-lttng_condition_event_rule_append_capture_descriptor(
+lttng_condition_on_event_append_capture_descriptor(
struct lttng_condition *condition,
struct lttng_event_expr *expr)
{
int ret;
enum lttng_condition_status status = LTTNG_CONDITION_STATUS_OK;
- struct lttng_condition_event_rule *event_rule_cond =
+ struct lttng_condition_on_event *event_rule_cond =
container_of(condition,
- struct lttng_condition_event_rule, parent);
+ struct lttng_condition_on_event, parent);
struct lttng_capture_descriptor *descriptor = NULL;
const struct lttng_event_rule *rule = NULL;
/* Only accept l-values. */
- if (!condition || !IS_EVENT_RULE_CONDITION(condition) || !expr ||
+ if (!condition || !IS_ON_EVENT_CONDITION(condition) || !expr ||
!lttng_event_expr_is_lvalue(expr)) {
status = LTTNG_CONDITION_STATUS_INVALID;
goto end;
}
- status = lttng_condition_event_rule_get_rule(condition, &rule);
+ status = lttng_condition_on_event_get_rule(condition, &rule);
if (status != LTTNG_CONDITION_STATUS_OK) {
goto end;
}
}
enum lttng_condition_status
-lttng_condition_event_rule_get_capture_descriptor_count(
+lttng_condition_on_event_get_capture_descriptor_count(
const struct lttng_condition *condition, unsigned int *count)
{
enum lttng_condition_status status = LTTNG_CONDITION_STATUS_OK;
- const struct lttng_condition_event_rule *event_rule_cond =
+ const struct lttng_condition_on_event *on_event_condition =
container_of(condition,
- const struct lttng_condition_event_rule,
+ const struct lttng_condition_on_event,
parent);
- if (!condition || !IS_EVENT_RULE_CONDITION(condition) || !count) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition) || !count) {
status = LTTNG_CONDITION_STATUS_INVALID;
goto end;
}
*count = lttng_dynamic_pointer_array_get_count(
- &event_rule_cond->capture_descriptors);
+ &on_event_condition->capture_descriptors);
end:
return status;
}
const struct lttng_event_expr *
-lttng_condition_event_rule_get_capture_descriptor_at_index(
+lttng_condition_on_event_get_capture_descriptor_at_index(
const struct lttng_condition *condition, unsigned int index)
{
const struct lttng_event_expr *expr = NULL;
const struct lttng_capture_descriptor *desc = NULL;
- desc = lttng_condition_event_rule_get_internal_capture_descriptor_at_index(
+ desc = lttng_condition_on_event_get_internal_capture_descriptor_at_index(
condition, index);
if (desc == NULL) {
goto end;
}
LTTNG_HIDDEN
-ssize_t lttng_evaluation_event_rule_create_from_payload(
- const struct lttng_condition_event_rule *condition,
+ssize_t lttng_evaluation_on_event_create_from_payload(
+ const struct lttng_condition_on_event *condition,
struct lttng_payload_view *view,
struct lttng_evaluation **_evaluation)
{
ssize_t ret, offset = 0;
const char *trigger_name;
struct lttng_evaluation *evaluation = NULL;
- const struct lttng_evaluation_event_rule_comm *header;
+ const struct lttng_evaluation_on_event_comm *header;
const struct lttng_payload_view header_view =
lttng_payload_view_from_view(
view, 0, sizeof(*header));
capture_payload = current_view.buffer.data;
}
- evaluation = lttng_evaluation_event_rule_create(condition, trigger_name,
+ evaluation = lttng_evaluation_on_event_create(condition, trigger_name,
capture_payload, capture_payload_size, true);
if (!evaluation) {
ret = -1;
return ret;
}
-static int lttng_evaluation_event_rule_serialize(
+static int lttng_evaluation_on_event_serialize(
const struct lttng_evaluation *evaluation,
struct lttng_payload *payload)
{
int ret = 0;
- struct lttng_evaluation_event_rule *hit;
- struct lttng_evaluation_event_rule_comm comm;
+ struct lttng_evaluation_on_event *hit;
+ struct lttng_evaluation_on_event_comm comm;
uint32_t capture_payload_size;
hit = container_of(
- evaluation, struct lttng_evaluation_event_rule, parent);
+ evaluation, struct lttng_evaluation_on_event, parent);
assert(hit->name);
comm.trigger_name_length = strlen(hit->name) + 1;
return ret;
}
-static void lttng_evaluation_event_rule_destroy(
+static void lttng_evaluation_on_event_destroy(
struct lttng_evaluation *evaluation)
{
- struct lttng_evaluation_event_rule *hit;
+ struct lttng_evaluation_on_event *hit;
hit = container_of(
- evaluation, struct lttng_evaluation_event_rule, parent);
+ evaluation, struct lttng_evaluation_on_event, parent);
free(hit->name);
lttng_dynamic_buffer_reset(&hit->capture_payload);
lttng_event_field_value_destroy(hit->captured_values);
static
struct lttng_event_field_value *event_field_value_from_capture_payload(
- const struct lttng_condition_event_rule *condition,
+ const struct lttng_condition_on_event *condition,
const char *capture_payload, size_t capture_payload_size)
{
struct lttng_event_field_value *ret = NULL;
for (i = 0; i < count; i++) {
const struct lttng_capture_descriptor *capture_descriptor =
- lttng_condition_event_rule_get_internal_capture_descriptor_at_index(
+ lttng_condition_on_event_get_internal_capture_descriptor_at_index(
&condition->parent, i);
const msgpack_object *elem_obj;
struct lttng_event_field_value *elem_field_val;
}
LTTNG_HIDDEN
-struct lttng_evaluation *lttng_evaluation_event_rule_create(
- const struct lttng_condition_event_rule *condition,
+struct lttng_evaluation *lttng_evaluation_on_event_create(
+ const struct lttng_condition_on_event *condition,
const char *trigger_name,
const char *capture_payload, size_t capture_payload_size,
bool decode_capture_payload)
{
- struct lttng_evaluation_event_rule *hit;
+ struct lttng_evaluation_on_event *hit;
struct lttng_evaluation *evaluation = NULL;
- hit = zmalloc(sizeof(struct lttng_evaluation_event_rule));
+ hit = zmalloc(sizeof(struct lttng_evaluation_on_event));
if (!hit) {
goto error;
}
}
}
- hit->parent.type = LTTNG_CONDITION_TYPE_EVENT_RULE_HIT;
- hit->parent.serialize = lttng_evaluation_event_rule_serialize;
- hit->parent.destroy = lttng_evaluation_event_rule_destroy;
+ hit->parent.type = LTTNG_CONDITION_TYPE_ON_EVENT;
+ hit->parent.serialize = lttng_evaluation_on_event_serialize;
+ hit->parent.destroy = lttng_evaluation_on_event_destroy;
evaluation = &hit->parent;
hit = NULL;
error:
if (hit) {
- lttng_evaluation_event_rule_destroy(&hit->parent);
+ lttng_evaluation_on_event_destroy(&hit->parent);
}
return evaluation;
}
-enum lttng_evaluation_status lttng_evaluation_event_rule_get_captured_values(
+enum lttng_evaluation_status lttng_evaluation_on_event_get_captured_values(
const struct lttng_evaluation *evaluation,
const struct lttng_event_field_value **field_val)
{
- struct lttng_evaluation_event_rule *hit;
+ struct lttng_evaluation_on_event *hit;
enum lttng_evaluation_status status = LTTNG_EVALUATION_STATUS_OK;
- if (!evaluation || !is_event_rule_evaluation(evaluation) ||
+ if (!evaluation || !is_on_event_evaluation(evaluation) ||
!field_val) {
status = LTTNG_EVALUATION_STATUS_INVALID;
goto end;
}
- hit = container_of(evaluation, struct lttng_evaluation_event_rule,
+ hit = container_of(evaluation, struct lttng_evaluation_on_event,
parent);
if (!hit->captured_values) {
status = LTTNG_EVALUATION_STATUS_INVALID;
return status;
}
-enum lttng_evaluation_status lttng_evaluation_event_rule_get_trigger_name(
+enum lttng_evaluation_status lttng_evaluation_on_event_get_trigger_name(
const struct lttng_evaluation *evaluation, const char **name)
{
- struct lttng_evaluation_event_rule *hit;
+ struct lttng_evaluation_on_event *hit;
enum lttng_evaluation_status status = LTTNG_EVALUATION_STATUS_OK;
- if (!evaluation || !is_event_rule_evaluation(evaluation) || !name) {
+ if (!evaluation || !is_on_event_evaluation(evaluation) || !name) {
status = LTTNG_EVALUATION_STATUS_INVALID;
goto end;
}
hit = container_of(
- evaluation, struct lttng_evaluation_event_rule, parent);
+ evaluation, struct lttng_evaluation_on_event, parent);
*name = hit->name;
end:
return status;
LTTNG_HIDDEN
enum lttng_error_code
-lttng_condition_event_rule_generate_capture_descriptor_bytecode(
+lttng_condition_on_event_generate_capture_descriptor_bytecode(
struct lttng_condition *condition)
{
enum lttng_error_code ret;
enum lttng_condition_status status;
unsigned int capture_count, i;
- if (!condition || !IS_EVENT_RULE_CONDITION(condition)) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition)) {
ret = LTTNG_ERR_FATAL;
goto end;
}
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &capture_count);
if (status != LTTNG_CONDITION_STATUS_OK) {
ret = LTTNG_ERR_FATAL;
for (i = 0; i < capture_count; i++) {
struct lttng_capture_descriptor *local_capture_desc =
- lttng_condition_event_rule_get_internal_capture_descriptor_at_index(
+ lttng_condition_on_event_get_internal_capture_descriptor_at_index(
condition, i);
if (local_capture_desc == NULL) {
LTTNG_HIDDEN
const struct lttng_bytecode *
-lttng_condition_event_rule_get_capture_bytecode_at_index(
+lttng_condition_on_event_get_capture_bytecode_at_index(
const struct lttng_condition *condition, unsigned int index)
{
- const struct lttng_condition_event_rule *event_rule_cond =
+ const struct lttng_condition_on_event *event_rule_cond =
container_of(condition,
- const struct lttng_condition_event_rule,
+ const struct lttng_condition_on_event,
parent);
struct lttng_capture_descriptor *desc = NULL;
struct lttng_bytecode *bytecode = NULL;
unsigned int count;
enum lttng_condition_status status;
- if (!condition || !IS_EVENT_RULE_CONDITION(condition)) {
+ if (!condition || !IS_ON_EVENT_CONDITION(condition)) {
goto end;
}
- status = lttng_condition_event_rule_get_capture_descriptor_count(
+ status = lttng_condition_on_event_get_capture_descriptor_count(
condition, &count);
if (status != LTTNG_CONDITION_STATUS_OK) {
goto end;
}
evaluation_size += ret;
break;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
assert(condition);
- assert(condition->type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT);
- ret = lttng_evaluation_event_rule_create_from_payload(
+ assert(condition->type == LTTNG_CONDITION_TYPE_ON_EVENT);
+ ret = lttng_evaluation_on_event_create_from_payload(
container_of(condition,
- const struct lttng_condition_event_rule,
+ const struct lttng_condition_on_event,
parent),
&evaluation_view, evaluation);
if (ret < 0) {
/* Apply to any domain. */
type = LTTNG_DOMAIN_NONE;
break;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
/* Return the domain of the event rule. */
- c_status = lttng_condition_event_rule_get_rule(
+ c_status = lttng_condition_on_event_get_rule(
trigger->condition, &event_rule);
assert(c_status == LTTNG_CONDITION_STATUS_OK);
type = lttng_event_rule_get_domain_type(event_rule);
}
switch (lttng_condition_get_type(condition)) {
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
{
struct lttng_event_rule *event_rule;
const enum lttng_condition_status condition_status =
- lttng_condition_event_rule_borrow_rule_mutable(
+ lttng_condition_on_event_borrow_rule_mutable(
condition, &event_rule);
assert(condition_status == LTTNG_CONDITION_STATUS_OK);
}
/* Generate the capture bytecode. */
- ret = lttng_condition_event_rule_generate_capture_descriptor_bytecode(
+ ret = lttng_condition_on_event_generate_capture_descriptor_bytecode(
condition);
if (ret != LTTNG_OK) {
goto end;
}
switch (lttng_evaluation_get_type(evaluation)) {
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
{
- status = lttng_evaluation_event_rule_get_trigger_name(
+ status = lttng_evaluation_on_event_get_trigger_name(
evaluation, &name);
if (status != LTTNG_EVALUATION_STATUS_OK) {
- fail("lttng_evaluation_event_rule_get_trigger_name");
+ fail("lttng_evaluation_on_event_get_trigger_name");
name = NULL;
goto end;
}
ok(success, "Setting tracepoint event rule exclusions");
}
- tmp_condition = lttng_condition_event_rule_create(event_rule);
+ tmp_condition = lttng_condition_on_event_create(event_rule);
ok(tmp_condition, "Condition event rule object creation");
if (capture_desc_cb) {
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting kprobe event rule name: '%s'", trigger_name);
- condition = lttng_condition_event_rule_create(event_rule);
+ condition = lttng_condition_on_event_create(event_rule);
ok(condition, "Condition event rule object creation");
/* Register the trigger for condition. */
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting uprobe event rule name: '%s'", trigger_name);
- condition = lttng_condition_event_rule_create(event_rule);
+ condition = lttng_condition_on_event_create(event_rule);
ok(condition, "Condition event rule object creation");
/* Register the trigger for condition. */
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting syscall event rule pattern: '%s'", syscall_name);
- condition = lttng_condition_event_rule_create(event_rule);
+ condition = lttng_condition_on_event_create(event_rule);
ok(condition, "Condition syscall event rule object creation");
/* Register the trigger for condition. */
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting filter: '%s'", filter_pattern);
- condition = lttng_condition_event_rule_create(event_rule);
+ condition = lttng_condition_on_event_create(event_rule);
ok(condition, "Condition event rule object creation");
/* Register the triggers for condition */
goto end;
}
- cond_status = lttng_condition_event_rule_append_capture_descriptor(
+ cond_status = lttng_condition_on_event_append_capture_descriptor(
condition, expr);
if (cond_status != LTTNG_CONDITION_STATUS_OK) {
fail("Failed to append capture descriptor");
goto end;
}
- evaluation_status = lttng_evaluation_event_rule_get_captured_values(
+ evaluation_status = lttng_evaluation_on_event_get_captured_values(
evaluation, &captured_fields);
if (evaluation_status != LTTNG_EVALUATION_STATUS_OK) {
diag("Failed to get event rule evaluation captured values: status = %d",
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING:
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
break;
- case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
+ case LTTNG_CONDITION_TYPE_ON_EVENT:
{
const char *trigger_name;
enum lttng_evaluation_status evaluation_status;
evaluation_status =
- lttng_evaluation_event_rule_get_trigger_name(
+ lttng_evaluation_on_event_get_trigger_name(
evaluation, &trigger_name);
if (evaluation_status != LTTNG_EVALUATION_STATUS_OK) {
fprintf(stderr, "Failed to get trigger name of event rule notification\n");
"Setting exclusion pattern");
}
- condition = lttng_condition_event_rule_create(tracepoint);
+ condition = lttng_condition_on_event_create(tracepoint);
ok(condition, "Created condition");
- condition_status = lttng_condition_event_rule_get_rule(
+ condition_status = lttng_condition_on_event_get_rule(
condition, &tracepoint_tmp);
ok(condition_status == LTTNG_CONDITION_STATUS_OK,
"Getting event rule from event rule condition");