Rename *emission_site_type to *emission_site
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 11 May 2021 23:19:03 +0000 (19:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 Jun 2021 18:13:14 +0000 (14:13 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3027affe23de8674a5a813d18643396e3a1474f1

include/lttng/event-rule/syscall-internal.h
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

index bd0c1114add8d8adfb3ce62527457967aaed17b0..29f9e3316ba4fa6d5fbd93167c13639913e914ae 100644 (file)
@@ -15,7 +15,7 @@
 
 struct lttng_event_rule_syscall {
        struct lttng_event_rule parent;
-       enum lttng_event_rule_syscall_emission_site_type emission_site_type;
+       enum lttng_event_rule_syscall_emission_site emission_site;
        char *pattern;
        char *filter_expression;
 
@@ -27,7 +27,7 @@ struct lttng_event_rule_syscall {
 };
 
 struct lttng_event_rule_syscall_comm {
-       uint32_t emission_site_type;
+       uint32_t emission_site;
        /* Includes terminator `\0`. */
        uint32_t pattern_len;
        /* Includes terminator `\0`. */
@@ -47,5 +47,5 @@ ssize_t lttng_event_rule_syscall_create_from_payload(
 
 LTTNG_HIDDEN
 const char *lttng_event_rule_syscall_emission_site_str(
-               enum lttng_event_rule_syscall_emission_site_type type);
+               enum lttng_event_rule_syscall_emission_site emission_site);
 #endif /* LTTNG_EVENT_RULE_SYSCALL_INTERNAL_H */
index bb114778cc3bd9e11de050ea87fd1cdf399855be..f9fd2aba37f53e77c2551b8102918f4fe7c158b9 100644 (file)
@@ -14,7 +14,7 @@
 extern "C" {
 #endif
 
-enum lttng_event_rule_syscall_emission_site_type {
+enum lttng_event_rule_syscall_emission_site {
        LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY_EXIT = 0,
        LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY = 1,
        LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_EXIT = 2,
@@ -25,13 +25,13 @@ enum lttng_event_rule_syscall_emission_site_type {
  * Create a newly allocated syscall event rule.
  *
  * The default pattern is '*'.
- * The default emission site type is LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY_EXIT.
+ * The default emission site is LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY_EXIT.
  *
  * 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_syscall_create(enum
-               lttng_event_rule_syscall_emission_site_type emission_site_type);
+               lttng_event_rule_syscall_emission_site emission_site);
 
 /*
  * Set the name pattern of a syscall event rule.
@@ -88,12 +88,12 @@ extern enum lttng_event_rule_status lttng_event_rule_syscall_get_filter(
                const struct lttng_event_rule *rule, const char **expression);
 
 /*
- * Get the emission site type of a syscall event rule.
+ * Get the emission site of a syscall event rule.
  *
- * Returns a enum lttng_event_rule_syscall_emission_site_type.
+ * Returns a enum lttng_event_rule_syscall_emission_site.
  */
-extern enum lttng_event_rule_syscall_emission_site_type
-lttng_event_rule_syscall_get_emission_site_type(
+extern enum lttng_event_rule_syscall_emission_site
+lttng_event_rule_syscall_get_emission_site(
                const struct lttng_event_rule *rule);
 
 #ifdef __cplusplus
index e92b76c5d857fddc8bde1a1140ac32db42512754..7ba6a4cd939d761aab5e43126775ab36c2555240 100644 (file)
@@ -676,15 +676,15 @@ enum lttng_error_code trace_kernel_init_event_notifier_from_event_rule(
                const enum lttng_event_rule_status status =
                                lttng_event_rule_syscall_get_name_pattern(
                                                rule, &name);
-               const enum lttng_event_rule_syscall_emission_site_type
-                       emission_site_type =
-                       lttng_event_rule_syscall_get_emission_site_type(rule);
+               const enum lttng_event_rule_syscall_emission_site
+                       emission_site =
+                       lttng_event_rule_syscall_get_emission_site(rule);
                enum lttng_kernel_abi_syscall_entryexit entryexit;
 
                assert(status == LTTNG_EVENT_RULE_STATUS_OK);
-               assert(emission_site_type != LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_UNKNOWN);
+               assert(emission_site != LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_UNKNOWN);
 
-               switch(emission_site_type) {
+               switch(emission_site) {
                case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY:
                        entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
                        break;
index 2c9462f93046d47c2b22c5b5fa59f7fbc09c586a..1cb35adc7a6ac6ff3faa7496ef83e80b0d1f16ec 100644 (file)
@@ -189,7 +189,7 @@ end:
 }
 
 static bool parse_syscall_emission_site_from_type(const char *str,
-               enum lttng_event_rule_syscall_emission_site_type *type)
+               enum lttng_event_rule_syscall_emission_site *type)
 {
        bool ret = false;
        if (strcmp(str, "syscall") == 0 ||
@@ -1134,15 +1134,15 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
        case LTTNG_EVENT_RULE_TYPE_SYSCALL:
        {
                enum lttng_event_rule_status event_rule_status;
-               enum lttng_event_rule_syscall_emission_site_type emission_site_type;
+               enum lttng_event_rule_syscall_emission_site emission_site;
 
                if (!parse_syscall_emission_site_from_type(
-                                   event_rule_type_str, &emission_site_type)) {
+                                   event_rule_type_str, &emission_site)) {
                        ERR("Failed to parse syscall type '%s'.", event_rule_type_str);
                        goto error;
                }
 
-               res.er = lttng_event_rule_syscall_create(emission_site_type);
+               res.er = lttng_event_rule_syscall_create(emission_site);
                if (!res.er) {
                        ERR("Failed to create syscall event rule.");
                        goto error;
index 6f5828ff17b5413eb9f24238b980a0fddc5c87c3..26dc201ec892d435c4214570043581611cd52b76 100644 (file)
@@ -389,12 +389,12 @@ void print_event_rule_syscall(const struct lttng_event_rule *event_rule)
 {
        const char *pattern, *filter;
        enum lttng_event_rule_status event_rule_status;
-       enum lttng_event_rule_syscall_emission_site_type emission_site_type;
+       enum lttng_event_rule_syscall_emission_site emission_site;
 
        assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_SYSCALL);
 
-       emission_site_type =
-               lttng_event_rule_syscall_get_emission_site_type(event_rule);
+       emission_site =
+               lttng_event_rule_syscall_get_emission_site(event_rule);
 
        event_rule_status = lttng_event_rule_syscall_get_name_pattern(
                        event_rule, &pattern);
@@ -402,7 +402,7 @@ void print_event_rule_syscall(const struct lttng_event_rule *event_rule)
 
        _MSG("    rule: %s (type: syscall:%s", pattern,
                        lttng_event_rule_syscall_emission_site_str(
-                                       emission_site_type));
+                                       emission_site));
 
        event_rule_status = lttng_event_rule_syscall_get_filter(
                        event_rule, &filter);
index 88cfde6b6a268d7c1a016af22fd71194b88e8548..4ac6a11af7ac777d0a128d414aa09025522fd1c9 100644 (file)
@@ -88,7 +88,7 @@ static int lttng_event_rule_syscall_serialize(
 
        syscall_comm.pattern_len = pattern_len;
        syscall_comm.filter_expression_len = filter_expression_len;
-       syscall_comm.emission_site_type = syscall->emission_site_type;
+       syscall_comm.emission_site = syscall->emission_site;
 
        ret = lttng_dynamic_buffer_append(
                        &payload->buffer, &syscall_comm, sizeof(syscall_comm));
@@ -248,15 +248,15 @@ lttng_event_rule_syscall_hash(
 }
 
 struct lttng_event_rule *lttng_event_rule_syscall_create(
-               enum lttng_event_rule_syscall_emission_site_type
-                               emission_site_type)
+               enum lttng_event_rule_syscall_emission_site
+                               emission_site)
 {
        struct lttng_event_rule *rule = NULL;
        struct lttng_event_rule_syscall *syscall_rule;
        enum lttng_event_rule_status status;
 
        /* Validate the emission site type */
-       switch (emission_site_type) {
+       switch (emission_site) {
        case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY_EXIT:
        case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY:
        case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_EXIT:
@@ -296,7 +296,7 @@ struct lttng_event_rule *lttng_event_rule_syscall_create(
        }
 
        /* Emission site type */
-       syscall_rule->emission_site_type = emission_site_type;
+       syscall_rule->emission_site = emission_site;
 
 end:
        return rule;
@@ -334,7 +334,7 @@ ssize_t lttng_event_rule_syscall_create_from_payload(
        }
 
        syscall_comm = (typeof(syscall_comm)) current_buffer_view.data;
-       rule = lttng_event_rule_syscall_create(syscall_comm->emission_site_type);
+       rule = lttng_event_rule_syscall_create(syscall_comm->emission_site);
        if (!rule) {
                ERR("Failed to create event rule syscall");
                ret = -1;
@@ -517,11 +517,11 @@ enum lttng_event_rule_status lttng_event_rule_syscall_get_filter(
 end:
        return status;
 }
-extern enum lttng_event_rule_syscall_emission_site_type
-lttng_event_rule_syscall_get_emission_site_type(
+extern enum lttng_event_rule_syscall_emission_site
+lttng_event_rule_syscall_get_emission_site(
                const struct lttng_event_rule *rule)
 {
-       enum lttng_event_rule_syscall_emission_site_type emission_site_type =
+       enum lttng_event_rule_syscall_emission_site emission_site =
                LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_UNKNOWN;
        struct lttng_event_rule_syscall *syscall;
 
@@ -530,17 +530,17 @@ lttng_event_rule_syscall_get_emission_site_type(
        }
 
        syscall = container_of(rule, struct lttng_event_rule_syscall, parent);
-       emission_site_type = syscall->emission_site_type;
+       emission_site = syscall->emission_site;
 
 end:
-       return emission_site_type;
+       return emission_site;
 }
 
 LTTNG_HIDDEN
 const char *lttng_event_rule_syscall_emission_site_str(
-               enum lttng_event_rule_syscall_emission_site_type type)
+               enum lttng_event_rule_syscall_emission_site emission_site)
 {
-       switch (type) {
+       switch (emission_site) {
        case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY:
                return "entry";
        case LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY_EXIT:
This page took 0.031378 seconds and 4 git commands to generate.