X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.c;h=71b66a8468cd06410ca3e277fa63750d9b0780df;hp=36f6f483a9f3d3b492db00d699b95a799eaa450f;hb=b953b8cd56dbdc30e9228a7334c6e5fbe302cfc7;hpb=2106efa08d11229241a114d1d71635a02006690e diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 36f6f483a..71b66a846 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -50,7 +50,8 @@ static void add_unique_ust_event(struct lttng_ht *ht, key.name = event->attr.name; key.filter = (struct lttng_filter_bytecode *) event->filter; - key.loglevel_type = event->attr.loglevel; + key.loglevel_type = event->attr.loglevel_type; + key.loglevel_value = event->attr.loglevel; key.exclusion = event->exclusion; node_ptr = cds_lfht_add_unique(ht->ht, @@ -207,7 +208,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, rcu_read_lock(); uevent = trace_ust_find_event(uchan->events, event->name, filter, - event->loglevel, exclusion); + event->loglevel_type, event->loglevel, exclusion); if (!uevent) { uevent = trace_ust_create_event(event, filter_expression, filter, exclusion, internal_event); @@ -533,12 +534,13 @@ int event_agent_disable(struct ltt_ust_session *usess, struct agent *agt, } /* - * The loglevel is hardcoded with 0 here since the agent ust event is set - * with the loglevel type to ALL thus the loglevel stays 0. The event's - * filter is the one handling the loglevel for agent. + * Agent UST event has its loglevel type forced to + * LTTNG_UST_LOGLEVEL_ALL. The actual loglevel type/value filtering + * happens thanks to an UST filter. The following -1 is actually + * ignored since the type is LTTNG_UST_LOGLEVEL_ALL. */ uevent = trace_ust_find_event(uchan->events, (char *) ust_event_name, - aevent->filter, 0, NULL); + aevent->filter, LTTNG_UST_LOGLEVEL_ALL, -1, NULL); /* If the agent event exists, it must be available on the UST side. */ assert(uevent);