Rename lttng_event_rule_syscall_(set, get)_pattern to lttng_event_rule_syscall_(set...
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 11 May 2021 23:02:45 +0000 (19:02 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Jun 2021 20:51:57 +0000 (16:51 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia6d8c55f607cd5af4201a61abaab277994618bb6

include/lttng/event-rule/syscall.h
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/syscall.c
tests/regression/tools/notification/notification.c
tests/unit/test_event_rule.c

index 28766ecba3662f6472d837dfbff3352e4f4c168e..bb114778cc3bd9e11de050ea87fd1cdf399855be 100644 (file)
@@ -34,7 +34,7 @@ extern struct lttng_event_rule *lttng_event_rule_syscall_create(enum
                lttng_event_rule_syscall_emission_site_type emission_site_type);
 
 /*
- * Set the pattern of a syscall event rule.
+ * Set the name pattern of a syscall event rule.
  *
  * Pattern can contain wildcard '*'. See man lttng-enable-event.
  *
@@ -43,11 +43,11 @@ extern struct lttng_event_rule *lttng_event_rule_syscall_create(enum
  * 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_syscall_set_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_syscall_set_name_pattern(
                struct lttng_event_rule *rule, const char *pattern);
 
 /*
- * Get the pattern of a syscall event rule.
+ * Get the name pattern of a syscall event rule.
  *
  * The caller does not assume the ownership of the returned pattern. The
  * pattern shall only only be used for the duration of the event rule's
@@ -58,7 +58,7 @@ extern enum lttng_event_rule_status lttng_event_rule_syscall_set_pattern(
  * parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a pattern
  * was not set prior to this call.
  */
-extern enum lttng_event_rule_status lttng_event_rule_syscall_get_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_syscall_get_name_pattern(
                const struct lttng_event_rule *rule, const char **pattern);
 
 /*
index 816cb9507a37f3fc7946384d9af0d7e5a675f776..e92b76c5d857fddc8bde1a1140ac32db42512754 100644 (file)
@@ -674,7 +674,7 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
        {
                const enum lttng_event_rule_status status =
-                               lttng_event_rule_syscall_get_pattern(
+                               lttng_event_rule_syscall_get_name_pattern(
                                                rule, &name);
                const enum lttng_event_rule_syscall_emission_site_type
                        emission_site_type =
index eb1f40215aceba1adab815d8a22ade9604440064..2c9462f93046d47c2b22c5b5fa59f7fbc09c586a 100644 (file)
@@ -1148,7 +1148,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                        goto error;
                }
 
-               event_rule_status = lttng_event_rule_syscall_set_pattern(
+               event_rule_status = lttng_event_rule_syscall_set_name_pattern(
                                res.er, name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set syscall event rule's pattern to '%s'.",
index b511c4dccba19225f334ce358482a13a30bb5eb7..6f5828ff17b5413eb9f24238b980a0fddc5c87c3 100644 (file)
@@ -396,7 +396,7 @@ void print_event_rule_syscall(const struct lttng_event_rule *event_rule)
        emission_site_type =
                lttng_event_rule_syscall_get_emission_site_type(event_rule);
 
-       event_rule_status = lttng_event_rule_syscall_get_pattern(
+       event_rule_status = lttng_event_rule_syscall_get_name_pattern(
                        event_rule, &pattern);
        assert(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK);
 
index 12aeacfcff9a88fbe4f4904a14b9502c692123d1..88cfde6b6a268d7c1a016af22fd71194b88e8548 100644 (file)
@@ -289,7 +289,7 @@ struct lttng_event_rule *lttng_event_rule_syscall_create(
        syscall_rule->parent.hash = lttng_event_rule_syscall_hash;
 
        /* Default pattern is '*'. */
-       status = lttng_event_rule_syscall_set_pattern(rule, "*");
+       status = lttng_event_rule_syscall_set_name_pattern(rule, "*");
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                lttng_event_rule_destroy(rule);
                rule = NULL;
@@ -387,7 +387,7 @@ ssize_t lttng_event_rule_syscall_create_from_payload(
 
 skip_filter_expression:
 
-       status = lttng_event_rule_syscall_set_pattern(rule, pattern);
+       status = lttng_event_rule_syscall_set_name_pattern(rule, pattern);
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to set event rule syscall pattern");
                ret = -1;
@@ -412,7 +412,7 @@ end:
        return ret;
 }
 
-enum lttng_event_rule_status lttng_event_rule_syscall_set_pattern(
+enum lttng_event_rule_status lttng_event_rule_syscall_set_name_pattern(
                struct lttng_event_rule *rule, const char *pattern)
 {
        char *pattern_copy = NULL;
@@ -442,7 +442,7 @@ end:
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_syscall_get_pattern(
+enum lttng_event_rule_status lttng_event_rule_syscall_get_name_pattern(
                const struct lttng_event_rule *rule, const char **pattern)
 {
        struct lttng_event_rule_syscall *syscall;
index cdba957bfefd372a8837f304371861f53e5fe07b..9638bb4527ff8efad3533a90cbfd782e4ddb6d2a 100644 (file)
@@ -2057,7 +2057,7 @@ static void test_syscall_event_rule_notification(
        event_rule = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
        ok(event_rule, "syscall event rule object creation");
 
-       event_rule_status = lttng_event_rule_syscall_set_pattern(
+       event_rule_status = lttng_event_rule_syscall_set_name_pattern(
                        event_rule, syscall_name);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting syscall event rule pattern: '%s'", syscall_name);
@@ -2143,7 +2143,7 @@ static void test_syscall_event_rule_notification_filter(
        event_rule = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
        ok(event_rule, "syscall event rule object creation");
 
-       event_rule_status = lttng_event_rule_syscall_set_pattern(
+       event_rule_status = lttng_event_rule_syscall_set_name_pattern(
                        event_rule, syscall_name);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting syscall event rule pattern: '%s'", syscall_name);
index 6d7328dbbe98f070b5a2ac4d36960c33af00f875..f30343b303c867d7a3925611ddd7ea52fb6f74d9 100644 (file)
@@ -187,9 +187,9 @@ static void test_event_rule_syscall(void)
        syscall = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
        ok(syscall, "syscall object.");
 
-       status = lttng_event_rule_syscall_set_pattern(syscall, pattern);
+       status = lttng_event_rule_syscall_set_name_pattern(syscall, pattern);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "setting pattern.");
-       status = lttng_event_rule_syscall_get_pattern(syscall, &tmp);
+       status = lttng_event_rule_syscall_get_name_pattern(syscall, &tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "getting pattern.");
        ok(!strncmp(pattern, tmp, strlen(pattern)), "pattern is equal.");
 
This page took 0.031065 seconds and 4 git commands to generate.