Rename lttng_event_rule_tracepoint_(set,get)_pattern to lttng_event_rule_tracepoint_...
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 11 May 2021 22:47:31 +0000 (18:47 -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: Ib018d7ab4fab66842302beef19c0971d704d2d02

include/lttng/event-rule/tracepoint.h
src/bin/lttng-sessiond/agent.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng/commands/add_trigger.c
src/bin/lttng/commands/list_triggers.c
src/common/event-rule/tracepoint.c
tests/regression/tools/notification/notification.c
tests/unit/test_condition.c
tests/unit/test_event_rule.c

index d86b53fedceb59fda4cb9938242edf669cd8de01..728d87234fdc835dafb61f47bde51b5d771d83c8 100644 (file)
@@ -29,18 +29,18 @@ extern struct lttng_event_rule *lttng_event_rule_tracepoint_create(
                enum lttng_domain_type domain);
 
 /*
- * Set the pattern of a tracepoint event rule.
+ * Set the name pattern of a tracepoint event rule.
  *
  * Pattern can contain wildcard '*'. See man lttng-enable-event.
  *
  * 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_tracepoint_set_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_tracepoint_set_name_pattern(
                struct lttng_event_rule *rule, const char *pattern);
 
 /*
- * Get the pattern of a tracepoint event rule.
+ * Get the name pattern of a tracepoint 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
@@ -51,7 +51,7 @@ extern enum lttng_event_rule_status lttng_event_rule_tracepoint_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_tracepoint_get_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_tracepoint_get_name_pattern(
                const struct lttng_event_rule *rule, const char **pattern);
 
 /*
index d5184a4424da93d7a381d3b42eb457e508b0a8d1..8250b8c9e70711ab8014ccbf1528fcef59e26269 100644 (file)
@@ -1269,8 +1269,8 @@ struct agent_event *agent_find_event_by_trigger(
        assert(domain == LTTNG_DOMAIN_JUL || domain == LTTNG_DOMAIN_LOG4J ||
                        domain == LTTNG_DOMAIN_PYTHON);
 
-       /* Get the event's pattern ('name' in the legacy terminology). */
-       er_status = lttng_event_rule_tracepoint_get_pattern(rule, &name);
+       /* Get the event's pattern name ('name' in the legacy terminology). */
+       er_status = lttng_event_rule_tracepoint_get_name_pattern(rule, &name);
        assert(er_status == LTTNG_EVENT_RULE_STATUS_OK);
 
        /* Get the internal filter expression. */
index 3a32893a199bef28cea52b13cb8415886ecfe24f..816cb9507a37f3fc7946384d9af0d7e5a675f776 100644 (file)
@@ -660,7 +660,7 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
                const enum lttng_domain_type domain =
                                lttng_event_rule_get_domain_type(rule);
                const enum lttng_event_rule_status status =
-                               lttng_event_rule_tracepoint_get_pattern(
+                               lttng_event_rule_tracepoint_get_name_pattern(
                                                rule, &name);
 
                assert(domain == LTTNG_DOMAIN_KERNEL);
index c00dd2877fd08d1aed942ac1fce52ab4ff25d3c8..f1beaef532802accc890e6495a30cb639b31923e 100644 (file)
@@ -2042,7 +2042,7 @@ static int init_ust_event_notifier_from_event_rule(
        } else {
                const struct lttng_log_level_rule *log_level_rule;
 
-               status = lttng_event_rule_tracepoint_get_pattern(rule, &pattern);
+               status = lttng_event_rule_tracepoint_get_name_pattern(rule, &pattern);
                if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                        /* At this point, this is a fatal error. */
                        abort();
index ac086891042d41af4c836f62b335e3a39ee78a7c..88c8fa10783063273fbf4f49a0d4698322fe8777 100644 (file)
@@ -990,7 +990,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                }
 
                /* Set pattern. */
-               event_rule_status = lttng_event_rule_tracepoint_set_pattern(
+               event_rule_status = lttng_event_rule_tracepoint_set_name_pattern(
                                res.er, name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set tracepoint event rule's pattern to '%s'.",
index a58ef28377925bb6754d7f0356b810763403bda7..d33ed1fc4adc140a440ddb5b36cdf761b60ffb44 100644 (file)
@@ -159,7 +159,7 @@ void print_event_rule_tracepoint(const struct lttng_event_rule *event_rule)
        unsigned int exclusions_count;
        int i;
 
-       event_rule_status = lttng_event_rule_tracepoint_get_pattern(
+       event_rule_status = lttng_event_rule_tracepoint_get_name_pattern(
                        event_rule, &pattern);
        assert(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK);
 
index 65e2c16a70edeae1ef500de81a46c8b711c6eb9a..691ebdc117928b503ea9c000aa904cc928ee030c 100644 (file)
@@ -285,7 +285,7 @@ static int generate_agent_filter(
        assert(rule);
        assert(_agent_filter);
 
-       status = lttng_event_rule_tracepoint_get_pattern(rule, &pattern);
+       status = lttng_event_rule_tracepoint_get_name_pattern(rule, &pattern);
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ret = -1;
                goto end;
@@ -727,7 +727,7 @@ struct lttng_event_rule *lttng_event_rule_tracepoint_create(
                        destroy_lttng_exclusions_element);
 
        /* Default pattern is '*'. */
-       status = lttng_event_rule_tracepoint_set_pattern(rule, "*");
+       status = lttng_event_rule_tracepoint_set_name_pattern(rule, "*");
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                lttng_event_rule_destroy(rule);
                rule = NULL;
@@ -895,7 +895,7 @@ skip_log_level_rule:
                offset += *exclusion_len;
        }
 
-       status = lttng_event_rule_tracepoint_set_pattern(rule, pattern);
+       status = lttng_event_rule_tracepoint_set_name_pattern(rule, pattern);
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to set event rule tracepoint pattern.");
                ret = -1;
@@ -932,7 +932,7 @@ end:
        return ret;
 }
 
-enum lttng_event_rule_status lttng_event_rule_tracepoint_set_pattern(
+enum lttng_event_rule_status lttng_event_rule_tracepoint_set_name_pattern(
                struct lttng_event_rule *rule, const char *pattern)
 {
        char *pattern_copy = NULL;
@@ -964,7 +964,7 @@ end:
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_tracepoint_get_pattern(
+enum lttng_event_rule_status lttng_event_rule_tracepoint_get_name_pattern(
                const struct lttng_event_rule *rule, const char **pattern)
 {
        struct lttng_event_rule_tracepoint *tracepoint;
index bdea55921d3825cfbfbee824c509e01bc4596327..8ff11046edbd2618c6625e43d949a3b6ce6ed4c8 100644 (file)
@@ -1469,7 +1469,7 @@ static void create_tracepoint_event_rule_trigger(const char *event_pattern,
        event_rule = lttng_event_rule_tracepoint_create(domain_type);
        ok(event_rule, "Tracepoint event rule object creation");
 
-       event_rule_status = lttng_event_rule_tracepoint_set_pattern(
+       event_rule_status = lttng_event_rule_tracepoint_set_name_pattern(
                        event_rule, event_pattern);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting tracepoint event rule pattern: '%s'",
index e94bd084f6f40b7afa377751c44ce3915221fef2..af9dd7a86a9b59d0f371939693a5ee2f62ca3897 100644 (file)
@@ -61,7 +61,7 @@ void test_condition_event_rule(void)
        tracepoint = lttng_event_rule_tracepoint_create(LTTNG_DOMAIN_UST);
        ok(tracepoint, "tracepoint UST_DOMAIN");
 
-       status = lttng_event_rule_tracepoint_set_pattern(tracepoint, pattern);
+       status = lttng_event_rule_tracepoint_set_name_pattern(tracepoint, pattern);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "Setting pattern");
 
        status = lttng_event_rule_tracepoint_set_filter(tracepoint, filter);
index 59e37e9662edfeed08d8e71d75658f1871c9d730..5a3973e0942bcdb28aadb5287420970a52b5bf19 100644 (file)
@@ -78,9 +78,9 @@ void test_event_rule_tracepoint_by_domain(const struct tracepoint_test *test)
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "get tracepoint domain.");
        ok(domain_type == type, "domain type got %d expected %d.", domain_type, type);
 
-       status = lttng_event_rule_tracepoint_set_pattern(tracepoint, pattern);
+       status = lttng_event_rule_tracepoint_set_name_pattern(tracepoint, pattern);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "setting pattern.");
-       status = lttng_event_rule_tracepoint_get_pattern(tracepoint, &tmp);
+       status = lttng_event_rule_tracepoint_get_name_pattern(tracepoint, &tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "getting pattern.");
        ok(!strncmp(pattern, tmp, strlen(pattern)), "pattern is equal.");
 
This page took 0.031784 seconds and 4 git commands to generate.