sessiond: add support for anonymous triggers
[lttng-tools.git] / src / bin / lttng-sessiond / kernel.c
index c377509ab4205dcba347ac97deec6ce2df478817..e99d8be44600ce212260c88cb6ce272364053ec9 100644 (file)
@@ -28,8 +28,8 @@
 
 #include <lttng/userspace-probe.h>
 #include <lttng/userspace-probe-internal.h>
-#include <lttng/condition/on-event.h>
-#include <lttng/condition/on-event-internal.h>
+#include <lttng/condition/event-rule-matches.h>
+#include <lttng/condition/event-rule-matches-internal.h>
 #include <lttng/event-rule/event-rule.h>
 #include <lttng/event-rule/event-rule-internal.h>
 #include <lttng/event-rule/userspace-probe-internal.h>
@@ -1946,8 +1946,8 @@ int init_kernel_tracer(void)
        }
 
        /* Validate kernel version */
-       ret = kernel_validate_version(&kernel_tracer_version,
-                       &kernel_tracer_abi_version);
+       ret = kernel_validate_version(&the_kernel_tracer_version,
+                       &the_kernel_tracer_abi_version);
        if (ret < 0) {
                goto error_version;
        }
@@ -2073,7 +2073,7 @@ void cleanup_kernel_tracer(void)
        DBG2("Closing kernel event notifier group notification file descriptor");
        if (kernel_tracer_event_notifier_group_notification_fd >= 0) {
                int ret = notification_thread_command_remove_tracer_event_source(
-                               notification_thread_handle,
+                               the_notification_thread_handle,
                                kernel_tracer_event_notifier_group_notification_fd);
                if (ret != LTTNG_OK) {
                        ERR("Failed to remove kernel event notifier notification from notification thread");
@@ -2313,10 +2313,10 @@ static enum lttng_error_code kernel_create_event_notifier_rule(
        assert(condition);
 
        condition_type = lttng_condition_get_type(condition);
-       assert(condition_type == LTTNG_CONDITION_TYPE_ON_EVENT);
+       assert(condition_type == LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES);
 
        /* Does not acquire a reference. */
-       condition_status = lttng_condition_on_event_get_rule(
+       condition_status = lttng_condition_event_rule_matches_get_rule(
                        condition, &event_rule);
        assert(condition_status == LTTNG_CONDITION_STATUS_OK);
        assert(event_rule);
@@ -2325,7 +2325,8 @@ static enum lttng_error_code kernel_create_event_notifier_rule(
        assert(event_rule_type != LTTNG_EVENT_RULE_TYPE_UNKNOWN);
 
        error_code_ret = trace_kernel_create_event_notifier_rule(trigger, token,
-                       lttng_condition_on_event_get_error_counter_index(condition),
+                       lttng_condition_event_rule_matches_get_error_counter_index(
+                                       condition),
                        &event_notifier_rule);
        if (error_code_ret != LTTNG_OK) {
                goto error;
@@ -2339,7 +2340,8 @@ static enum lttng_error_code kernel_create_event_notifier_rule(
 
        kernel_event_notifier.event.token = event_notifier_rule->token;
        kernel_event_notifier.error_counter_idx =
-                       lttng_condition_on_event_get_error_counter_index(condition);
+                       lttng_condition_event_rule_matches_get_error_counter_index(
+                                       condition);
 
        fd = kernctl_create_event_notifier(
                        kernel_tracer_event_notifier_group_fd,
@@ -2402,13 +2404,13 @@ static enum lttng_error_code kernel_create_event_notifier_rule(
        }
 
        /* Set the capture bytecode if any. */
-       cond_status = lttng_condition_on_event_get_capture_descriptor_count(
+       cond_status = lttng_condition_event_rule_matches_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_on_event_get_capture_bytecode_at_index(
+                               lttng_condition_event_rule_matches_get_capture_bytecode_at_index(
                                                condition, i);
 
                if (capture_bytecode == NULL) {
@@ -2486,7 +2488,7 @@ enum lttng_error_code kernel_register_event_notifier(
        assert(condition);
 
        /* Does not acquire a reference to the event rule. */
-       status = lttng_condition_on_event_get_rule(
+       status = lttng_condition_event_rule_matches_get_rule(
                        condition, &event_rule);
        assert(status == LTTNG_CONDITION_STATUS_OK);
 
This page took 0.026331 seconds and 4 git commands to generate.