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,
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);
}
/*
- * 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);