X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.c;h=136617d7775d849b8b57c3be0026832ece3c30fb;hb=c0e2990d32d1e55c783c7eb3299f23a7ce062270;hp=40eb2656098b7d0b3ab69a9dd1219b0d5beadf7b;hpb=44760c20f4fc255b63894ca758cf2ee5f253220b;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 40eb26560..136617d77 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -13,9 +13,10 @@ #include #include #include -#include +#include #include #include +#include #include #include #include @@ -47,7 +48,7 @@ static void add_unique_ust_event(struct lttng_ht *ht, assert(event); key.name = event->attr.name; - key.filter = (struct lttng_filter_bytecode *) event->filter; + key.filter = (struct lttng_bytecode *) event->filter; key.loglevel_type = event->attr.loglevel_type; key.loglevel_value = event->attr.loglevel; key.exclusion = event->exclusion; @@ -104,7 +105,7 @@ int event_kernel_disable_event(struct ltt_kernel_channel *kchan, */ int event_kernel_enable_event(struct ltt_kernel_channel *kchan, struct lttng_event *event, char *filter_expression, - struct lttng_filter_bytecode *filter) + struct lttng_bytecode *filter) { int ret; struct ltt_kernel_event *kevent; @@ -154,7 +155,7 @@ end: int event_ust_enable_tracepoint(struct ltt_ust_session *usess, struct ltt_ust_channel *uchan, struct lttng_event *event, char *filter_expression, - struct lttng_filter_bytecode *filter, + struct lttng_bytecode *filter, struct lttng_event_exclusion *exclusion, bool internal_event) { @@ -168,7 +169,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, rcu_read_lock(); uevent = trace_ust_find_event(uchan->events, event->name, filter, - (enum lttng_ust_loglevel_type) event->loglevel_type, + (enum lttng_ust_abi_loglevel_type) event->loglevel_type, event->loglevel, exclusion); if (!uevent) { ret = trace_ust_create_event(event, filter_expression, @@ -392,7 +393,7 @@ static void agent_enable_all(struct agent *agt) */ int event_agent_enable_all(struct ltt_ust_session *usess, struct agent *agt, struct lttng_event *event, - struct lttng_filter_bytecode *filter ,char *filter_expression) + struct lttng_bytecode *filter ,char *filter_expression) { int ret; @@ -421,7 +422,7 @@ error: * contexts yet. Not an issue for now, since they are not generated by * the lttng-ctl library. */ -static int add_filter_app_ctx(struct lttng_filter_bytecode *bytecode, +static int add_filter_app_ctx(struct lttng_bytecode *bytecode, const char *filter_expression, struct agent *agt) { int ret = LTTNG_OK; @@ -480,7 +481,7 @@ end: static int agent_enable(struct agent *agt, struct lttng_event *event, - struct lttng_filter_bytecode *filter, + struct lttng_bytecode *filter, char *filter_expression) { int ret, created = 0; @@ -550,7 +551,7 @@ end: int event_agent_enable(struct ltt_ust_session *usess, struct agent *agt, struct lttng_event *event, - struct lttng_filter_bytecode *filter, + struct lttng_bytecode *filter, char *filter_expression) { assert(usess); @@ -580,8 +581,8 @@ int trigger_agent_enable(const struct lttng_trigger *trigger, struct agent *agt) const struct lttng_event_rule *rule; const char *filter_expression; char *filter_expression_copy = NULL; - const struct lttng_filter_bytecode *filter_bytecode; - struct lttng_filter_bytecode *filter_bytecode_copy = NULL; + const struct lttng_bytecode *filter_bytecode; + struct lttng_bytecode *filter_bytecode_copy = NULL; struct lttng_event *event = NULL; uid_t trigger_owner_uid = 0; const char *trigger_name; @@ -600,9 +601,9 @@ int trigger_agent_enable(const struct lttng_trigger *trigger, struct agent *agt) condition = lttng_trigger_get_const_condition(trigger); assert(lttng_condition_get_type(condition) == - LTTNG_CONDITION_TYPE_EVENT_RULE_HIT); + LTTNG_CONDITION_TYPE_ON_EVENT); - c_status = lttng_condition_event_rule_get_rule(condition, &rule); + c_status = lttng_condition_on_event_get_rule(condition, &rule); assert(c_status == LTTNG_CONDITION_STATUS_OK); assert(lttng_event_rule_get_type(rule) == @@ -630,7 +631,7 @@ int trigger_agent_enable(const struct lttng_trigger *trigger, struct agent *agt) filter_bytecode = lttng_event_rule_get_filter_bytecode(rule); if (filter_bytecode) { filter_bytecode_copy = - lttng_filter_bytecode_copy(filter_bytecode); + lttng_bytecode_copy(filter_bytecode); if (!filter_bytecode_copy) { ret = LTTNG_ERR_NOMEM; goto end; @@ -779,7 +780,7 @@ static int event_agent_disable_one(struct ltt_ust_session *usess, * ignored since the type is LTTNG_UST_LOGLEVEL_ALL. */ uevent = trace_ust_find_event(uchan->events, (char *) ust_event_name, - aevent->filter, LTTNG_UST_LOGLEVEL_ALL, -1, NULL); + aevent->filter, LTTNG_UST_ABI_LOGLEVEL_ALL, -1, NULL); /* If the agent event exists, it must be available on the UST side. */ assert(uevent);