X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=03a358a0d3f1da9478ef220c3e93309298b469f7;hp=9a1f371912d6d1d0742adf68faf3479f48b43983;hb=e8b1187d0ff0323106069738b2fff5c9e5a7d9bb;hpb=1f1567a534b09badcbe6f6c10a4693e9fddb62dc diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 9a1f37191..03a358a0d 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -28,11 +28,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include "lttng-sessiond.h" #include "lttng-syscall.h" @@ -2310,10 +2310,10 @@ static enum lttng_error_code kernel_create_event_notifier_rule( assert(condition); condition_type = lttng_condition_get_type(condition); - assert(condition_type == LTTNG_CONDITION_TYPE_EVENT_RULE_HIT); + assert(condition_type == LTTNG_CONDITION_TYPE_ON_EVENT); /* Does not acquire a reference. */ - condition_status = lttng_condition_event_rule_get_rule( + condition_status = lttng_condition_on_event_get_rule( condition, &event_rule); assert(condition_status == LTTNG_CONDITION_STATUS_OK); assert(event_rule); @@ -2395,20 +2395,20 @@ static enum lttng_error_code kernel_create_event_notifier_rule( } } - /* Set the capture bytecode, if any. */ - cond_status = lttng_condition_event_rule_get_capture_descriptor_count( + /* Set the capture bytecode if any. */ + cond_status = lttng_condition_on_event_get_capture_descriptor_count( condition, &capture_bytecode_count); assert(cond_status == LTTNG_CONDITION_STATUS_OK); for (i = 0; i < capture_bytecode_count; i++) { const struct lttng_bytecode *capture_bytecode = - lttng_condition_event_rule_get_capture_bytecode_at_index( + lttng_condition_on_event_get_capture_bytecode_at_index( condition, i); if (capture_bytecode == NULL) { ERR("Unexpected NULL capture bytecode on condition"); error_code_ret = LTTNG_ERR_KERN_ENABLE_FAIL; - goto error; + goto capture_error; } ret = kernctl_capture(event_notifier_rule->fd, capture_bytecode); @@ -2416,7 +2416,7 @@ static enum lttng_error_code kernel_create_event_notifier_rule( ERR("Failed to set capture bytecode on event notifier rule fd: fd = %d", event_notifier_rule->fd); error_code_ret = LTTNG_ERR_KERN_ENABLE_FAIL; - goto error; + goto capture_error; } } @@ -2446,6 +2446,7 @@ static enum lttng_error_code kernel_create_event_notifier_rule( return LTTNG_OK; +capture_error: add_callsite_error: enable_error: set_cloexec_error: @@ -2479,7 +2480,7 @@ enum lttng_error_code kernel_register_event_notifier( assert(condition); /* Does not acquire a reference to the event rule. */ - status = lttng_condition_event_rule_get_rule( + status = lttng_condition_on_event_get_rule( condition, &event_rule); assert(status == LTTNG_CONDITION_STATUS_OK);