event-rule: kernel probe: rename set/get_name to set/get_event_name
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 5 Nov 2020 16:32:35 +0000 (11:32 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Mar 2021 15:02:07 +0000 (11:02 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I14950a663a4db37fe0f120d8f06c01cae241a871

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

index 2ac173d273e1e8c1e2a325e310abbbe3b9b1e2e3..2d5257512094df451890ea25bd28ac8e2d395202 100644 (file)
@@ -60,7 +60,7 @@ extern enum lttng_event_rule_status lttng_event_rule_kernel_probe_get_location(
  * 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_kernel_probe_set_name(
+extern enum lttng_event_rule_status lttng_event_rule_kernel_probe_set_event_name(
                struct lttng_event_rule *rule, const char *name);
 
 /*
@@ -74,7 +74,7 @@ extern enum lttng_event_rule_status lttng_event_rule_kernel_probe_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.
  */
-extern enum lttng_event_rule_status lttng_event_rule_kernel_probe_get_name(
+extern enum lttng_event_rule_status lttng_event_rule_kernel_probe_get_event_name(
                const struct lttng_event_rule *rule, const char **name);
 
 #ifdef __cplusplus
index ba8ceab1d5e4c452f3bccb26662feffa5cb47ec1..d420fb4df005a6a2635b54ee1b6134f0dc3167f6 100644 (file)
@@ -601,7 +601,7 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
 
                kernel_event_notifier->event.u.kprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
 
-               status = lttng_event_rule_kernel_probe_get_name(rule, &name);
+               status = lttng_event_rule_kernel_probe_get_event_name(rule, &name);
                assert(status == LTTNG_EVENT_RULE_STATUS_OK);
                ret_code = LTTNG_OK;
                break;
index d88fa0cf921c143b443ac76b0bb531a225ecaf44..19d3a6f3a584351c06cf6bed134365af99a35f08 100644 (file)
@@ -972,7 +972,7 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                        goto error;
                }
 
-               event_rule_status = lttng_event_rule_kernel_probe_set_name(res.er, tracepoint_name);
+               event_rule_status = lttng_event_rule_kernel_probe_set_event_name(res.er, tracepoint_name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set kprobe event rule's name to '%s'.", tracepoint_name);
                        goto error;
index 024dc50bcceec1601a3573c532e3220306b367ba..666f8f077fcfede0b0ec4571d469bd9cd2aad982 100644 (file)
@@ -168,7 +168,7 @@ void print_event_rule_kernel_probe(const struct lttng_event_rule *event_rule)
 
        assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE);
 
-       event_rule_status = lttng_event_rule_kernel_probe_get_name(event_rule, &name);
+       event_rule_status = lttng_event_rule_kernel_probe_get_event_name(event_rule, &name);
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get kprobe event rule's name.");
                goto end;
index 6152a1b50eb1c8a2ab1b1f9517988dd3f127403d..7506c2f11850ad014f9122ceddfc7f08dc846d60 100644 (file)
@@ -316,7 +316,7 @@ ssize_t lttng_event_rule_kernel_probe_create_from_payload(
        /* Skip after the location */
        offset += kprobe_comm->location_len;
 
-       status = lttng_event_rule_kernel_probe_set_name(rule, name);
+       status = lttng_event_rule_kernel_probe_set_event_name(rule, name);
        if (status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to set event rule kprobe name.");
                ret = -1;
@@ -386,7 +386,7 @@ end:
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_kernel_probe_set_name(
+enum lttng_event_rule_status lttng_event_rule_kernel_probe_set_event_name(
                struct lttng_event_rule *rule, const char *name)
 {
        char *name_copy = NULL;
@@ -414,7 +414,7 @@ end:
        return status;
 }
 
-enum lttng_event_rule_status lttng_event_rule_kernel_probe_get_name(
+enum lttng_event_rule_status lttng_event_rule_kernel_probe_get_event_name(
                const struct lttng_event_rule *rule, const char **name)
 {
        struct lttng_event_rule_kernel_probe *kprobe;
index 9356d432eea8a5d8072ee910eda6aa1f45121874..0f1a418112eefedb41401b5c89174b3c9baf4feb 100644 (file)
@@ -1872,7 +1872,7 @@ static void test_kprobe_event_rule_notification(
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting kprobe event rule location: '%s'", symbol_name);
 
-       event_rule_status = lttng_event_rule_kernel_probe_set_name(
+       event_rule_status = lttng_event_rule_kernel_probe_set_event_name(
                        event_rule, trigger_name);
        ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting kprobe event rule name: '%s'", trigger_name);
index b45dc7ba2186cbefb2875ee8dd135d5ef59c317b..07614f4b88e67ba057fdff507e6d99029568cc3e 100644 (file)
@@ -334,10 +334,10 @@ static void test_event_rule_kernel_probe_by_location(
                        "Getting kprobe event rule location.");
        ok(lttng_kernel_probe_location_is_equal(location, _location), "Locations are equal.");
 
-       status = lttng_event_rule_kernel_probe_set_name(kprobe, probe_name);
+       status = lttng_event_rule_kernel_probe_set_event_name(kprobe, probe_name);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK,
                        "Setting kprobe event rule name: %s.", probe_name);
-       status = lttng_event_rule_kernel_probe_get_name(kprobe, &tmp);
+       status = lttng_event_rule_kernel_probe_get_event_name(kprobe, &tmp);
        ok(status == LTTNG_EVENT_RULE_STATUS_OK, "Getting kprobe name.");
        ok(!strcmp(probe_name, tmp), "kprobe name are equal.");
 
This page took 0.030212 seconds and 4 git commands to generate.