Rename uprobe to userspace-probe
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 5 Nov 2020 00:08:10 +0000 (19:08 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 17 Mar 2021 05:36:54 +0000 (01:36 -0400)
Renaming of associated files follows-up.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Iabb6f3599efbac25a4c31b892b791b98ed4f5990

include/lttng/event-rule/event-rule.h
include/lttng/event-rule/uprobe-internal.h
include/lttng/event-rule/uprobe.h
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng/commands/add_trigger.c
src/bin/lttng/commands/list_triggers.c
src/common/event-rule/event-rule.c
src/common/event-rule/uprobe.c
tests/regression/tools/notification/notification.c
tests/unit/test_event_rule.c

index ea33153d6f7c748243ef1160734348fcbc14e6e9..df9e9b2d208b963a1d2ed537e982257ac88034f0 100644 (file)
@@ -20,7 +20,7 @@ enum lttng_event_rule_type {
        LTTNG_EVENT_RULE_TYPE_SYSCALL = 1,
        LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE = 2,
        LTTNG_EVENT_RULE_TYPE_KRETPROBE = 3,
        LTTNG_EVENT_RULE_TYPE_SYSCALL = 1,
        LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE = 2,
        LTTNG_EVENT_RULE_TYPE_KRETPROBE = 3,
-       LTTNG_EVENT_RULE_TYPE_UPROBE = 4,
+       LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE = 4,
 };
 
 enum lttng_event_rule_status {
 };
 
 enum lttng_event_rule_status {
index 6d4b10661ea47c08dec89e6ca205e2d1b944c42d..41d42eb763fe128986e1bdf2ab48075fc080471d 100644 (file)
@@ -5,21 +5,21 @@
  *
  */
 
  *
  */
 
-#ifndef LTTNG_EVENT_RULE_UPROBE_INTERNAL_H
-#define LTTNG_EVENT_RULE_UPROBE_INTERNAL_H
+#ifndef LTTNG_EVENT_RULE_USERSPACE_PROBE_INTERNAL_H
+#define LTTNG_EVENT_RULE_USERSPACE_PROBE_INTERNAL_H
 
 #include <common/payload-view.h>
 #include <common/macros.h>
 #include <lttng/event-rule/event-rule-internal.h>
 #include <lttng/event-rule/uprobe.h>
 
 
 #include <common/payload-view.h>
 #include <common/macros.h>
 #include <lttng/event-rule/event-rule-internal.h>
 #include <lttng/event-rule/uprobe.h>
 
-struct lttng_event_rule_uprobe {
+struct lttng_event_rule_userspace_probe {
        struct lttng_event_rule parent;
        char *name;
        struct lttng_userspace_probe_location *location;
 };
 
        struct lttng_event_rule parent;
        char *name;
        struct lttng_userspace_probe_location *location;
 };
 
-struct lttng_event_rule_uprobe_comm {
+struct lttng_event_rule_userspace_probe_comm {
        /* Includes terminator `\0`. */
        uint32_t name_len;
        /* Includes terminator `\0`. */
        /* Includes terminator `\0`. */
        uint32_t name_len;
        /* Includes terminator `\0`. */
@@ -33,13 +33,13 @@ struct lttng_event_rule_uprobe_comm {
 } LTTNG_PACKED;
 
 LTTNG_HIDDEN
 } LTTNG_PACKED;
 
 LTTNG_HIDDEN
-ssize_t lttng_event_rule_uprobe_create_from_payload(
+ssize_t lttng_event_rule_userspace_probe_create_from_payload(
                struct lttng_payload_view *view,
                struct lttng_event_rule **rule);
 
 LTTNG_HIDDEN
 struct lttng_userspace_probe_location *
                struct lttng_payload_view *view,
                struct lttng_event_rule **rule);
 
 LTTNG_HIDDEN
 struct lttng_userspace_probe_location *
-lttng_event_rule_uprobe_get_location_mutable(
+lttng_event_rule_userspace_probe_get_location_mutable(
                const struct lttng_event_rule *rule);
 
                const struct lttng_event_rule *rule);
 
-#endif /* LTTNG_EVENT_RULE_UPROBE_INTERNAL_H */
+#endif /* LTTNG_EVENT_RULE_USERSPACE_PROBE_INTERNAL_H */
index 12aa013188de09b969f5c75d3a3bcaae986a8d07..f4020a16aa2590ea0f9e85ab8faf3b291a4bf033 100644 (file)
@@ -5,8 +5,8 @@
  *
  */
 
  *
  */
 
-#ifndef LTTNG_EVENT_RULE_UPROBE_H
-#define LTTNG_EVENT_RULE_UPROBE_H
+#ifndef LTTNG_EVENT_RULE_USERSPACE_PROBE_H
+#define LTTNG_EVENT_RULE_USERSPACE_PROBE_H
 
 #include <lttng/event-rule/event-rule.h>
 #include <lttng/userspace-probe.h>
 
 #include <lttng/event-rule/event-rule.h>
 #include <lttng/userspace-probe.h>
@@ -16,27 +16,27 @@ extern "C" {
 #endif
 
 /*
 #endif
 
 /*
- * Create a newly allocated uprobe event rule.
+ * Create a newly allocated user space probe event rule.
  *
  * Returns a new event rule on success, NULL on failure. This event rule must be
  * destroyed using lttng_event_rule_destroy().
  */
  *
  * Returns a new event rule on success, NULL on failure. This event rule must be
  * destroyed using lttng_event_rule_destroy().
  */
-extern struct lttng_event_rule *lttng_event_rule_uprobe_create(void);
+extern struct lttng_event_rule *lttng_event_rule_userspace_probe_create(void);
 
 /*
 
 /*
- * Set the location of a uprobe event rule.
+ * Set the location of a user space probe event rule.
  *
  * The location is copied internally.
  *
  * Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
  * if invalid parameters are passed.
  */
  *
  * The location is copied internally.
  *
  * Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
  * if invalid parameters are passed.
  */
-extern enum lttng_event_rule_status lttng_event_rule_uprobe_set_location(
+extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_location(
                struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location *location);
 
 /*
                struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location *location);
 
 /*
- * Get the location of a uprobe event rule.
+ * Get the location of a user space probe event rule.
  *
  * The caller does not assume the ownership of the returned location.
  * The location shall only be used for the duration of the event
  *
  * The caller does not assume the ownership of the returned location.
  * The location shall only be used for the duration of the event
@@ -47,23 +47,23 @@ extern enum lttng_event_rule_status lttng_event_rule_uprobe_set_location(
  * passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a location was not set prior to
  * this call.
  */
  * passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a location was not set prior to
  * this call.
  */
-extern enum lttng_event_rule_status lttng_event_rule_uprobe_get_location(
+extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_location(
                const struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location **location);
 
 /*
                const struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location **location);
 
 /*
- * Set the name of a uprobe event rule.
+ * Set the name of a user space probe event rule.
  *
  * The name is copied internally.
  *
  * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
  * if invalid parameters are passed.
  */
  *
  * The name is copied internally.
  *
  * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
  * if invalid parameters are passed.
  */
-extern enum lttng_event_rule_status lttng_event_rule_uprobe_set_name(
+extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_name(
                struct lttng_event_rule *rule, const char *name);
 
 /*
                struct lttng_event_rule *rule, const char *name);
 
 /*
- * Get the name of a uprobe event rule.
+ * Get the name of a user space probe event rule.
  *
  * The caller does not assume the ownership of the returned name.
  * The name shall only only be used for the duration of the event
  *
  * The caller does not assume the ownership of the returned name.
  * The name shall only only be used for the duration of the event
@@ -73,11 +73,11 @@ extern enum lttng_event_rule_status lttng_event_rule_uprobe_set_name(
  * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed,
  * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call.
  */
  * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed,
  * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call.
  */
-extern enum lttng_event_rule_status lttng_event_rule_uprobe_get_name(
+extern enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_name(
                const struct lttng_event_rule *rule, const char **name);
 
 #ifdef __cplusplus
 }
 #endif
 
                const struct lttng_event_rule *rule, const char **name);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* LTTNG_EVENT_RULE_UPROBE_H */
+#endif /* LTTNG_EVENT_RULE_USERSPACE_PROBE_H */
index 54e745474d89c8c891bc78f8a35b8ce742f53cd0..9a1f371912d6d1d0742adf68faf3479f48b43983 100644 (file)
@@ -540,9 +540,9 @@ static int userspace_probe_event_rule_add_callsites(
        assert(creds);
 
        event_rule_type = lttng_event_rule_get_type(rule);
        assert(creds);
 
        event_rule_type = lttng_event_rule_get_type(rule);
-       assert(event_rule_type == LTTNG_EVENT_RULE_TYPE_UPROBE);
+       assert(event_rule_type == LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE);
 
 
-       status = lttng_event_rule_uprobe_get_location(rule, &location);
+       status = lttng_event_rule_userspace_probe_get_location(rule, &location);
        if (status != LTTNG_EVENT_RULE_STATUS_OK || !location) {
                ret = -1;
                goto end;
        if (status != LTTNG_EVENT_RULE_STATUS_OK || !location) {
                ret = -1;
                goto end;
@@ -2386,7 +2386,7 @@ static enum lttng_error_code kernel_create_event_notifier_rule(
        }
 
        if (lttng_event_rule_get_type(event_rule) ==
        }
 
        if (lttng_event_rule_get_type(event_rule) ==
-                       LTTNG_EVENT_RULE_TYPE_UPROBE) {
+                       LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE) {
                ret = userspace_probe_event_rule_add_callsites(
                                event_rule, creds, event_notifier_rule->fd);
                if (ret) {
                ret = userspace_probe_event_rule_add_callsites(
                                event_rule, creds, event_notifier_rule->fd);
                if (ret) {
index 72de7eadd3ddcf8cd2c408a6f4c13adeb0d9d9de..aa615214432113ef179b9ce771c897c271fc47bf 100644 (file)
@@ -606,13 +606,13 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
                ret_code = LTTNG_OK;
                break;
        }
                ret_code = LTTNG_OK;
                break;
        }
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
        {
                const struct lttng_userspace_probe_location* location = NULL;
                const struct lttng_userspace_probe_location_lookup_method *lookup = NULL;
                enum lttng_event_rule_status status;
 
        {
                const struct lttng_userspace_probe_location* location = NULL;
                const struct lttng_userspace_probe_location_lookup_method *lookup = NULL;
                enum lttng_event_rule_status status;
 
-               status = lttng_event_rule_uprobe_get_location(rule, &location);
+               status = lttng_event_rule_userspace_probe_get_location(rule, &location);
                if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ret_code = LTTNG_ERR_PROBE_LOCATION_INVAL;
                        goto error;
                if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ret_code = LTTNG_ERR_PROBE_LOCATION_INVAL;
                        goto error;
@@ -647,7 +647,7 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
                        abort();
                }
 
                        abort();
                }
 
-               status = lttng_event_rule_uprobe_get_name(rule, &name);
+               status = lttng_event_rule_userspace_probe_get_name(rule, &name);
                assert(status == LTTNG_EVENT_RULE_STATUS_OK);
                ret_code = LTTNG_OK;
                break;
                assert(status == LTTNG_EVENT_RULE_STATUS_OK);
                ret_code = LTTNG_OK;
                break;
index 9ae8263c64a3a396e1b385d459ba996bf93474f1..b55f4edde8bd5b6ff2454e88e4ebd8c1fe387db4 100644 (file)
@@ -645,7 +645,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                                break;
                        case OPT_USERSPACE_PROBE:
                                if (!assign_event_rule_type(&event_rule_type,
                                break;
                        case OPT_USERSPACE_PROBE:
                                if (!assign_event_rule_type(&event_rule_type,
-                                               LTTNG_EVENT_RULE_TYPE_UPROBE)) {
+                                               LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE)) {
                                        goto error;
                                }
 
                                        goto error;
                                }
 
@@ -819,7 +819,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
        switch (event_rule_type) {
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
        switch (event_rule_type) {
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                if (domain_type != LTTNG_DOMAIN_KERNEL) {
                        ERR("Event type not available for user-space tracing.");
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                if (domain_type != LTTNG_DOMAIN_KERNEL) {
                        ERR("Event type not available for user-space tracing.");
@@ -987,7 +987,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
 
                break;
        }
 
                break;
        }
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
        {
                int ret;
                enum lttng_event_rule_status event_rule_status;
        {
                int ret;
                enum lttng_event_rule_status event_rule_status;
@@ -999,20 +999,20 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                        goto error;
                }
 
                        goto error;
                }
 
-               res.er = lttng_event_rule_uprobe_create();
+               res.er = lttng_event_rule_userspace_probe_create();
                if (!res.er) {
                        ERR("Failed to create userspace probe event rule.");
                        goto error;
                }
 
                if (!res.er) {
                        ERR("Failed to create userspace probe event rule.");
                        goto error;
                }
 
-               event_rule_status = lttng_event_rule_uprobe_set_location(
+               event_rule_status = lttng_event_rule_userspace_probe_set_location(
                                res.er, userspace_probe_location);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set user space probe event rule's location.");
                        goto error;
                }
 
                                res.er, userspace_probe_location);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set user space probe event rule's location.");
                        goto error;
                }
 
-               event_rule_status = lttng_event_rule_uprobe_set_name(
+               event_rule_status = lttng_event_rule_userspace_probe_set_name(
                                res.er, tracepoint_name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set user space probe event rule's name to '%s'.",
                                res.er, tracepoint_name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set user space probe event rule's name to '%s'.",
index f634b8e38db96f8243249c971ab2832250097b7f..906aae07654235681a1464d5af0d4049ce2d684c 100644 (file)
@@ -192,22 +192,22 @@ end:
 }
 
 static
 }
 
 static
-void print_event_rule_uprobe(const struct lttng_event_rule *event_rule)
+void print_event_rule_userspace_probe(const struct lttng_event_rule *event_rule)
 {
        enum lttng_event_rule_status event_rule_status;
        const char *name;
        const struct lttng_userspace_probe_location *location;
        enum lttng_userspace_probe_location_type userspace_probe_location_type;
 
 {
        enum lttng_event_rule_status event_rule_status;
        const char *name;
        const struct lttng_userspace_probe_location *location;
        enum lttng_userspace_probe_location_type userspace_probe_location_type;
 
-       assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_UPROBE);
+       assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE);
 
 
-       event_rule_status = lttng_event_rule_uprobe_get_name(event_rule, &name);
+       event_rule_status = lttng_event_rule_userspace_probe_get_name(event_rule, &name);
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get uprobe event rule's name.");
                goto end;
        }
 
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get uprobe event rule's name.");
                goto end;
        }
 
-       event_rule_status = lttng_event_rule_uprobe_get_location(
+       event_rule_status = lttng_event_rule_userspace_probe_get_location(
                        event_rule, &location);
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get uprobe event rule's location.");
                        event_rule, &location);
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get uprobe event rule's location.");
@@ -283,8 +283,8 @@ void print_event_rule(const struct lttng_event_rule *event_rule)
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
                print_event_rule_kernel_probe(event_rule);
                break;
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
                print_event_rule_kernel_probe(event_rule);
                break;
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
-               print_event_rule_uprobe(event_rule);
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
+               print_event_rule_userspace_probe(event_rule);
                break;
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                print_event_rule_syscall(event_rule);
                break;
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                print_event_rule_syscall(event_rule);
index 88b9d5bc53f5d90cacf584b1b2ce316ff702bf74..8afc184170aa8e879dcca46bd3fd670f870465fd 100644 (file)
@@ -43,7 +43,7 @@ enum lttng_domain_type lttng_event_rule_get_domain_type(
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
        case LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE:
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
                domain_type = LTTNG_DOMAIN_KERNEL;
                break;
        case LTTNG_EVENT_RULE_TYPE_UNKNOWN:
                domain_type = LTTNG_DOMAIN_KERNEL;
                break;
        case LTTNG_EVENT_RULE_TYPE_UNKNOWN:
@@ -178,8 +178,8 @@ ssize_t lttng_event_rule_create_from_payload(
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
                /* TODO */
                break;
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
                /* TODO */
                break;
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
-               create_from_payload = lttng_event_rule_uprobe_create_from_payload;
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
+               create_from_payload = lttng_event_rule_userspace_probe_create_from_payload;
                break;
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                create_from_payload =
                break;
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
                create_from_payload =
@@ -319,7 +319,7 @@ const char *lttng_event_rule_type_str(enum lttng_event_rule_type type)
                return "probe";
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
                return "function";
                return "probe";
        case LTTNG_EVENT_RULE_TYPE_KRETPROBE:
                return "function";
-       case LTTNG_EVENT_RULE_TYPE_UPROBE:
+       case LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE:
                return "userspace-probe";
        default:
                abort();
                return "userspace-probe";
        default:
                abort();
index 67f99c482ec681c4e95d39625e5ca582df41391f..b8f8edee5f7171eb531d26b286f48b7d0a828d05 100644 (file)
 #include <lttng/userspace-probe-internal.h>
 
 #define IS_UPROBE_EVENT_RULE(rule) \
 #include <lttng/userspace-probe-internal.h>
 
 #define IS_UPROBE_EVENT_RULE(rule) \
-       (lttng_event_rule_get_type(rule) == LTTNG_EVENT_RULE_TYPE_UPROBE)
+       (lttng_event_rule_get_type(rule) == LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE)
 
 
-static void lttng_event_rule_uprobe_destroy(struct lttng_event_rule *rule)
+static void lttng_event_rule_userspace_probe_destroy(struct lttng_event_rule *rule)
 {
 {
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
 
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
 
        lttng_userspace_probe_location_destroy(uprobe->location);
        free(uprobe->name);
        free(uprobe);
 }
 
 
        lttng_userspace_probe_location_destroy(uprobe->location);
        free(uprobe->name);
        free(uprobe);
 }
 
-static bool lttng_event_rule_uprobe_validate(
+static bool lttng_event_rule_userspace_probe_validate(
                const struct lttng_event_rule *rule)
 {
        bool valid = false;
                const struct lttng_event_rule *rule)
 {
        bool valid = false;
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
 
        if (!rule) {
                goto end;
        }
 
 
        if (!rule) {
                goto end;
        }
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
 
        /* Required field. */
        if (!uprobe->name) {
 
        /* Required field. */
        if (!uprobe->name) {
@@ -60,15 +60,15 @@ end:
        return valid;
 }
 
        return valid;
 }
 
-static int lttng_event_rule_uprobe_serialize(
+static int lttng_event_rule_userspace_probe_serialize(
                const struct lttng_event_rule *rule,
                struct lttng_payload *payload)
 {
        int ret;
        size_t name_len, header_offset, size_before_probe;
                const struct lttng_event_rule *rule,
                struct lttng_payload *payload)
 {
        int ret;
        size_t name_len, header_offset, size_before_probe;
-       struct lttng_event_rule_uprobe *uprobe;
-       struct lttng_event_rule_uprobe_comm uprobe_comm = {};
-       struct lttng_event_rule_uprobe_comm *header;
+       struct lttng_event_rule_userspace_probe *uprobe;
+       struct lttng_event_rule_userspace_probe_comm uprobe_comm = {};
+       struct lttng_event_rule_userspace_probe_comm *header;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule)) {
                ret = -1;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule)) {
                ret = -1;
@@ -78,7 +78,7 @@ static int lttng_event_rule_uprobe_serialize(
        header_offset = payload->buffer.size;
 
        DBG("Serializing uprobe event rule.");
        header_offset = payload->buffer.size;
 
        DBG("Serializing uprobe event rule.");
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
 
        name_len = strlen(uprobe->name) + 1;
 
 
        name_len = strlen(uprobe->name) + 1;
 
@@ -105,7 +105,7 @@ static int lttng_event_rule_uprobe_serialize(
        }
 
        /* Update the header regarding the probe size. */
        }
 
        /* Update the header regarding the probe size. */
-       header = (struct lttng_event_rule_uprobe_comm
+       header = (struct lttng_event_rule_userspace_probe_comm
                                        *) ((char *) payload->buffer.data +
                        header_offset);
        header->location_len = payload->buffer.size - size_before_probe;
                                        *) ((char *) payload->buffer.data +
                        header_offset);
        header->location_len = payload->buffer.size - size_before_probe;
@@ -116,14 +116,14 @@ end:
        return ret;
 }
 
        return ret;
 }
 
-static bool lttng_event_rule_uprobe_is_equal(const struct lttng_event_rule *_a,
+static bool lttng_event_rule_userspace_probe_is_equal(const struct lttng_event_rule *_a,
                const struct lttng_event_rule *_b)
 {
        bool is_equal = false;
                const struct lttng_event_rule *_b)
 {
        bool is_equal = false;
-       struct lttng_event_rule_uprobe *a, *b;
+       struct lttng_event_rule_userspace_probe *a, *b;
 
 
-       a = container_of(_a, struct lttng_event_rule_uprobe, parent);
-       b = container_of(_b, struct lttng_event_rule_uprobe, parent);
+       a = container_of(_a, struct lttng_event_rule_userspace_probe, parent);
+       b = container_of(_b, struct lttng_event_rule_userspace_probe, parent);
 
        /* uprobe is invalid if this is not true. */
        assert(a->name);
 
        /* uprobe is invalid if this is not true. */
        assert(a->name);
@@ -140,7 +140,7 @@ end:
        return is_equal;
 }
 
        return is_equal;
 }
 
-static enum lttng_error_code lttng_event_rule_uprobe_generate_filter_bytecode(
+static enum lttng_error_code lttng_event_rule_userspace_probe_generate_filter_bytecode(
                struct lttng_event_rule *rule,
                const struct lttng_credentials *creds)
 {
                struct lttng_event_rule *rule,
                const struct lttng_credentials *creds)
 {
@@ -148,7 +148,7 @@ static enum lttng_error_code lttng_event_rule_uprobe_generate_filter_bytecode(
        return LTTNG_OK;
 }
 
        return LTTNG_OK;
 }
 
-static const char *lttng_event_rule_uprobe_get_filter(
+static const char *lttng_event_rule_userspace_probe_get_filter(
                const struct lttng_event_rule *rule)
 {
        /* Unsupported. */
                const struct lttng_event_rule *rule)
 {
        /* Unsupported. */
@@ -156,14 +156,14 @@ static const char *lttng_event_rule_uprobe_get_filter(
 }
 
 static const struct lttng_bytecode *
 }
 
 static const struct lttng_bytecode *
-lttng_event_rule_uprobe_get_filter_bytecode(const struct lttng_event_rule *rule)
+lttng_event_rule_userspace_probe_get_filter_bytecode(const struct lttng_event_rule *rule)
 {
        /* Unsupported. */
        return NULL;
 }
 
 static enum lttng_event_rule_generate_exclusions_status
 {
        /* Unsupported. */
        return NULL;
 }
 
 static enum lttng_event_rule_generate_exclusions_status
-lttng_event_rule_uprobe_generate_exclusions(const struct lttng_event_rule *rule,
+lttng_event_rule_userspace_probe_generate_exclusions(const struct lttng_event_rule *rule,
                struct lttng_event_exclusion **exclusions)
 {
        /* Unsupported. */
                struct lttng_event_exclusion **exclusions)
 {
        /* Unsupported. */
@@ -172,14 +172,14 @@ lttng_event_rule_uprobe_generate_exclusions(const struct lttng_event_rule *rule,
 }
 
 static unsigned long
 }
 
 static unsigned long
-lttng_event_rule_uprobe_hash(
+lttng_event_rule_userspace_probe_hash(
                const struct lttng_event_rule *rule)
 {
        unsigned long hash;
                const struct lttng_event_rule *rule)
 {
        unsigned long hash;
-       struct lttng_event_rule_uprobe *urule =
+       struct lttng_event_rule_userspace_probe *urule =
                        container_of(rule, typeof(*urule), parent);
 
                        container_of(rule, typeof(*urule), parent);
 
-       hash = hash_key_ulong((void *) LTTNG_EVENT_RULE_TYPE_UPROBE,
+       hash = hash_key_ulong((void *) LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE,
                        lttng_ht_seed);
        hash ^= hash_key_str(urule->name, lttng_ht_seed);
        hash ^= lttng_userspace_probe_location_hash(urule->location);
                        lttng_ht_seed);
        hash ^= hash_key_str(urule->name, lttng_ht_seed);
        hash ^= lttng_userspace_probe_location_hash(urule->location);
@@ -187,46 +187,47 @@ lttng_event_rule_uprobe_hash(
        return hash;
 }
 
        return hash;
 }
 
-struct lttng_event_rule *lttng_event_rule_uprobe_create(void)
+struct lttng_event_rule *lttng_event_rule_userspace_probe_create(void)
 {
        struct lttng_event_rule *rule = NULL;
 {
        struct lttng_event_rule *rule = NULL;
-       struct lttng_event_rule_uprobe *urule;
+       struct lttng_event_rule_userspace_probe *urule;
 
 
-       urule = zmalloc(sizeof(struct lttng_event_rule_uprobe));
+       urule = zmalloc(sizeof(struct lttng_event_rule_userspace_probe));
        if (!urule) {
                goto end;
        }
 
        rule = &urule->parent;
        if (!urule) {
                goto end;
        }
 
        rule = &urule->parent;
-       lttng_event_rule_init(&urule->parent, LTTNG_EVENT_RULE_TYPE_UPROBE);
-       urule->parent.validate = lttng_event_rule_uprobe_validate;
-       urule->parent.serialize = lttng_event_rule_uprobe_serialize;
-       urule->parent.equal = lttng_event_rule_uprobe_is_equal;
-       urule->parent.destroy = lttng_event_rule_uprobe_destroy;
+       lttng_event_rule_init(&urule->parent, LTTNG_EVENT_RULE_TYPE_USERSPACE_PROBE);
+       urule->parent.validate = lttng_event_rule_userspace_probe_validate;
+       urule->parent.serialize = lttng_event_rule_userspace_probe_serialize;
+       urule->parent.equal = lttng_event_rule_userspace_probe_is_equal;
+       urule->parent.destroy = lttng_event_rule_userspace_probe_destroy;
        urule->parent.generate_filter_bytecode =
        urule->parent.generate_filter_bytecode =
-                       lttng_event_rule_uprobe_generate_filter_bytecode;
-       urule->parent.get_filter = lttng_event_rule_uprobe_get_filter;
+                       lttng_event_rule_userspace_probe_generate_filter_bytecode;
+       urule->parent.get_filter = lttng_event_rule_userspace_probe_get_filter;
        urule->parent.get_filter_bytecode =
        urule->parent.get_filter_bytecode =
-                       lttng_event_rule_uprobe_get_filter_bytecode;
+                       lttng_event_rule_userspace_probe_get_filter_bytecode;
        urule->parent.generate_exclusions =
        urule->parent.generate_exclusions =
-                       lttng_event_rule_uprobe_generate_exclusions;
-       urule->parent.hash = lttng_event_rule_uprobe_hash;
+                       lttng_event_rule_userspace_probe_generate_exclusions;
+       urule->parent.hash = lttng_event_rule_userspace_probe_hash;
+
 end:
        return rule;
 }
 
 LTTNG_HIDDEN
 end:
        return rule;
 }
 
 LTTNG_HIDDEN
-ssize_t lttng_event_rule_uprobe_create_from_payload(
+ssize_t lttng_event_rule_userspace_probe_create_from_payload(
                struct lttng_payload_view *view,
                struct lttng_event_rule **_event_rule)
 {
        ssize_t ret, offset = 0;
                struct lttng_payload_view *view,
                struct lttng_event_rule **_event_rule)
 {
        ssize_t ret, offset = 0;
-       const struct lttng_event_rule_uprobe_comm *uprobe_comm;
+       const struct lttng_event_rule_userspace_probe_comm *uprobe_comm;
        const char *name;
        struct lttng_buffer_view current_buffer_view;
        struct lttng_event_rule *rule = NULL;
        struct lttng_userspace_probe_location *location;
        const char *name;
        struct lttng_buffer_view current_buffer_view;
        struct lttng_event_rule *rule = NULL;
        struct lttng_userspace_probe_location *location;
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
        enum lttng_event_rule_status status;
 
        if (!_event_rule) {
        enum lttng_event_rule_status status;
 
        if (!_event_rule) {
@@ -243,8 +244,7 @@ ssize_t lttng_event_rule_uprobe_create_from_payload(
        }
 
        uprobe_comm = (typeof(uprobe_comm)) current_buffer_view.data;
        }
 
        uprobe_comm = (typeof(uprobe_comm)) current_buffer_view.data;
-
-       rule = lttng_event_rule_uprobe_create();
+       rule = lttng_event_rule_userspace_probe_create();
        if (!rule) {
                ERR("Failed to create event rule uprobe");
                ret = -1;
        if (!rule) {
                ERR("Failed to create event rule uprobe");
                ret = -1;
@@ -297,16 +297,16 @@ ssize_t lttng_event_rule_uprobe_create_from_payload(
        /* Skip after the location. */
        offset += uprobe_comm->location_len;
 
        /* Skip after the location. */
        offset += uprobe_comm->location_len;
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
        uprobe->location = location;
 
        uprobe->location = location;
 
-       status = lttng_event_rule_uprobe_set_name(rule, name);
+       status = lttng_event_rule_userspace_probe_set_name(rule, name);
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ret = -1;
                goto end;
        }
 
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ret = -1;
                goto end;
        }
 
-       if (!lttng_event_rule_uprobe_validate(rule)) {
+       if (!lttng_event_rule_userspace_probe_validate(rule)) {
                ret = -1;
                goto end;
        }
                ret = -1;
                goto end;
        }
@@ -319,12 +319,12 @@ end:
        return ret;
 }
 
        return ret;
 }
 
-enum lttng_event_rule_status lttng_event_rule_uprobe_set_location(
+enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_location(
                struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location *location)
 {
        struct lttng_userspace_probe_location *location_copy = NULL;
                struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location *location)
 {
        struct lttng_userspace_probe_location *location_copy = NULL;
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !location) {
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !location) {
@@ -332,7 +332,7 @@ enum lttng_event_rule_status lttng_event_rule_uprobe_set_location(
                goto end;
        }
 
                goto end;
        }
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
        location_copy = lttng_userspace_probe_location_copy(location);
        if (!location_copy) {
                status = LTTNG_EVENT_RULE_STATUS_ERROR;
        location_copy = lttng_userspace_probe_location_copy(location);
        if (!location_copy) {
                status = LTTNG_EVENT_RULE_STATUS_ERROR;
@@ -350,7 +350,7 @@ end:
        return status;
 }
 
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_uprobe_get_location(
+enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_location(
                const struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location **location)
 {
                const struct lttng_event_rule *rule,
                const struct lttng_userspace_probe_location **location)
 {
@@ -361,7 +361,7 @@ enum lttng_event_rule_status lttng_event_rule_uprobe_get_location(
                goto end;
        }
 
                goto end;
        }
 
-       *location = lttng_event_rule_uprobe_get_location_mutable(rule);
+       *location = lttng_event_rule_userspace_probe_get_location_mutable(rule);
        if (!*location) {
                status = LTTNG_EVENT_RULE_STATUS_UNSET;
                goto end;
        if (!*location) {
                status = LTTNG_EVENT_RULE_STATUS_UNSET;
                goto end;
@@ -373,22 +373,22 @@ end:
 
 LTTNG_HIDDEN
 struct lttng_userspace_probe_location *
 
 LTTNG_HIDDEN
 struct lttng_userspace_probe_location *
-lttng_event_rule_uprobe_get_location_mutable(
+lttng_event_rule_userspace_probe_get_location_mutable(
                const struct lttng_event_rule *rule)
 {
                const struct lttng_event_rule *rule)
 {
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
 
        assert(rule);
 
        assert(rule);
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
 
        return uprobe->location;
 }
 
 
        return uprobe->location;
 }
 
-enum lttng_event_rule_status lttng_event_rule_uprobe_set_name(
+enum lttng_event_rule_status lttng_event_rule_userspace_probe_set_name(
                struct lttng_event_rule *rule, const char *name)
 {
        char *name_copy = NULL;
                struct lttng_event_rule *rule, const char *name)
 {
        char *name_copy = NULL;
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !name ||
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !name ||
@@ -397,7 +397,7 @@ enum lttng_event_rule_status lttng_event_rule_uprobe_set_name(
                goto end;
        }
 
                goto end;
        }
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
        name_copy = strdup(name);
        if (!name_copy) {
                status = LTTNG_EVENT_RULE_STATUS_ERROR;
        name_copy = strdup(name);
        if (!name_copy) {
                status = LTTNG_EVENT_RULE_STATUS_ERROR;
@@ -414,10 +414,10 @@ end:
        return status;
 }
 
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_uprobe_get_name(
+enum lttng_event_rule_status lttng_event_rule_userspace_probe_get_name(
                const struct lttng_event_rule *rule, const char **name)
 {
                const struct lttng_event_rule *rule, const char **name)
 {
-       struct lttng_event_rule_uprobe *uprobe;
+       struct lttng_event_rule_userspace_probe *uprobe;
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !name) {
        enum lttng_event_rule_status status = LTTNG_EVENT_RULE_STATUS_OK;
 
        if (!rule || !IS_UPROBE_EVENT_RULE(rule) || !name) {
@@ -425,7 +425,7 @@ enum lttng_event_rule_status lttng_event_rule_uprobe_get_name(
                goto end;
        }
 
                goto end;
        }
 
-       uprobe = container_of(rule, struct lttng_event_rule_uprobe, parent);
+       uprobe = container_of(rule, struct lttng_event_rule_userspace_probe, parent);
        if (!uprobe->name) {
                status = LTTNG_EVENT_RULE_STATUS_UNSET;
                goto end;
        if (!uprobe->name) {
                status = LTTNG_EVENT_RULE_STATUS_UNSET;
                goto end;
index 4d238b02c8fdc0987068ba075f684ad1aa2cf4a3..b701681c089dfd2d0f83807baa0bc606b62bcc79 100644 (file)
@@ -1978,15 +1978,15 @@ static void test_uprobe_event_rule_notification(
                        lttng_session_daemon_notification_endpoint);
        ok(notification_channel, "Notification channel object creation");
 
                        lttng_session_daemon_notification_endpoint);
        ok(notification_channel, "Notification channel object creation");
 
-       event_rule = lttng_event_rule_uprobe_create();
+       event_rule = lttng_event_rule_userspace_probe_create();
        ok(event_rule, "kprobe event rule object creation");
 
        ok(event_rule, "kprobe event rule object creation");
 
-       event_rule_status = lttng_event_rule_uprobe_set_location(
+       event_rule_status = lttng_event_rule_userspace_probe_set_location(
                        event_rule, probe_location);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule location");
 
                        event_rule, probe_location);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule location");
 
-       event_rule_status = lttng_event_rule_uprobe_set_name(
+       event_rule_status = lttng_event_rule_userspace_probe_set_name(
                        event_rule, trigger_name);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule name: '%s'", trigger_name);
                        event_rule, trigger_name);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule name: '%s'", trigger_name);
index 0e83850a77bc8f460ef09a21b9a0c484fb01529a..6cc9d5cd63c7f73d93c40784c94e6ab42785ce20 100644 (file)
@@ -225,7 +225,7 @@ static void test_event_rule_syscall(void)
        lttng_event_rule_destroy(syscall_from_buffer);
 }
 
        lttng_event_rule_destroy(syscall_from_buffer);
 }
 
-static void test_event_rule_uprobe(void)
+static void test_event_rule_userspace_probe(void)
 {
        struct lttng_event_rule *uprobe = NULL;
        struct lttng_event_rule *uprobe_from_buffer = NULL;
 {
        struct lttng_event_rule *uprobe = NULL;
        struct lttng_event_rule *uprobe_from_buffer = NULL;
@@ -261,14 +261,14 @@ static void test_event_rule_uprobe(void)
 
        lttng_payload_init(&payload);
 
 
        lttng_payload_init(&payload);
 
-       uprobe = lttng_event_rule_uprobe_create();
+       uprobe = lttng_event_rule_userspace_probe_create();
        ok(uprobe, "uprobe event rule object creation.");
 
        ok(uprobe, "uprobe event rule object creation.");
 
-       status = lttng_event_rule_uprobe_set_location(uprobe, probe_location);
+       status = lttng_event_rule_userspace_probe_set_location(uprobe, probe_location);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule location.");
 
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule location.");
 
-       status = lttng_event_rule_uprobe_get_location(
+       status = lttng_event_rule_userspace_probe_get_location(
                        uprobe, &probe_location_tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Getting uprobe event rule location.");
                        uprobe, &probe_location_tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Getting uprobe event rule location.");
@@ -276,10 +276,10 @@ static void test_event_rule_uprobe(void)
                           probe_location, probe_location_tmp),
                        "Location is equal.");
 
                           probe_location, probe_location_tmp),
                        "Location is equal.");
 
-       status = lttng_event_rule_uprobe_set_name(uprobe, probe_name);
+       status = lttng_event_rule_userspace_probe_set_name(uprobe, probe_name);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule name: %s.", probe_name);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting uprobe event rule name: %s.", probe_name);
-       status = lttng_event_rule_uprobe_get_name(uprobe, &tmp);
+       status = lttng_event_rule_userspace_probe_get_name(uprobe, &tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "Getting uprobe name.");
        ok(!strcmp(probe_name, tmp), "Uprobe name are equal.");
 
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "Getting uprobe name.");
        ok(!strcmp(probe_name, tmp), "Uprobe name are equal.");
 
@@ -383,7 +383,7 @@ int main(int argc, const char *argv[])
        plan_tests(NUM_TESTS);
        test_event_rule_tracepoint();
        test_event_rule_syscall();
        plan_tests(NUM_TESTS);
        test_event_rule_tracepoint();
        test_event_rule_syscall();
-       test_event_rule_uprobe();
+       test_event_rule_userspace_probe();
        test_event_rule_kernel_probe();
        return exit_status();
 }
        test_event_rule_kernel_probe();
        return exit_status();
 }
This page took 0.040319 seconds and 4 git commands to generate.