event-rule: userspace probe: rename get/set_name to get/set_event_name
[lttng-tools.git] / src / bin / lttng / commands / list_triggers.c
index 05090381e0ca43605f1263f6751a87fdf2a132db..054b3fb725027c5c5b8fadfd5967db425c47e3ff 100644 (file)
@@ -160,21 +160,21 @@ end:
 }
 
 static
-void print_event_rule_kprobe(const struct lttng_event_rule *event_rule)
+void print_event_rule_kernel_probe(const struct lttng_event_rule *event_rule)
 {
        enum lttng_event_rule_status event_rule_status;
        const char *name;
        const struct lttng_kernel_probe_location *location;
 
-       assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_KPROBE);
+       assert(lttng_event_rule_get_type(event_rule) == LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE);
 
-       event_rule_status = lttng_event_rule_kprobe_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;
        }
 
-       event_rule_status = lttng_event_rule_kprobe_get_location(
+       event_rule_status = lttng_event_rule_kernel_probe_get_location(
                        event_rule, &location);
        if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                ERR("Failed to get kprobe event rule's location.");
@@ -192,22 +192,23 @@ end:
 }
 
 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;
 
-       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_event_name(
+                       event_rule, &name);
        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.");
@@ -280,11 +281,11 @@ void print_event_rule(const struct lttng_event_rule *event_rule)
        case LTTNG_EVENT_RULE_TYPE_TRACEPOINT:
                print_event_rule_tracepoint(event_rule);
                break;
-       case LTTNG_EVENT_RULE_TYPE_KPROBE:
-               print_event_rule_kprobe(event_rule);
+       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);
@@ -362,20 +363,20 @@ void print_one_event_expr(const struct lttng_event_expr *event_expr)
 }
 
 static
-void print_condition_event_rule_hit(const struct lttng_condition *condition)
+void print_condition_on_event(const struct lttng_condition *condition)
 {
        const struct lttng_event_rule *event_rule;
        enum lttng_condition_status condition_status;
        unsigned int cap_desc_count, i;
 
        condition_status =
-               lttng_condition_event_rule_get_rule(condition, &event_rule);
+               lttng_condition_on_event_get_rule(condition, &event_rule);
        assert(condition_status == LTTNG_CONDITION_STATUS_OK);
 
        print_event_rule(event_rule);
 
        condition_status =
-                       lttng_condition_event_rule_get_capture_descriptor_count(
+                       lttng_condition_on_event_get_capture_descriptor_count(
                                        condition, &cap_desc_count);
        assert(condition_status == LTTNG_CONDITION_STATUS_OK);
 
@@ -384,7 +385,7 @@ void print_condition_event_rule_hit(const struct lttng_condition *condition)
 
                for (i = 0; i < cap_desc_count; i++) {
                        const struct lttng_event_expr *cap_desc =
-                                       lttng_condition_event_rule_get_capture_descriptor_at_index(
+                                       lttng_condition_on_event_get_capture_descriptor_at_index(
                                                        condition, i);
 
                        _MSG("      - ");
@@ -534,8 +535,8 @@ void print_one_trigger(const struct lttng_trigger *trigger)
        condition_type = lttng_condition_get_type(condition);
        MSG("  condition: %s", lttng_condition_type_str(condition_type));
        switch (condition_type) {
-       case LTTNG_CONDITION_TYPE_EVENT_RULE_HIT:
-               print_condition_event_rule_hit(condition);
+       case LTTNG_CONDITION_TYPE_ON_EVENT:
+               print_condition_on_event(condition);
                break;
        default:
                MSG("  (condition type not handled in %s)", __func__);
This page took 0.02446 seconds and 4 git commands to generate.