* Return an ust_app_event object or NULL on error.
*/
static struct ust_app_event *find_ust_app_event(struct lttng_ht *ht,
- char *name, struct lttng_ust_filter_bytecode *filter, int loglevel)
+ char *name, struct lttng_ust_filter_bytecode *filter, int loglevel,
+ const struct lttng_event_exclusion *exclusion)
{
struct lttng_ht_iter iter;
struct lttng_ht_node_str *node;
key.name = name;
key.filter = filter;
key.loglevel = loglevel;
+ /* lttng_event_exclusion and lttng_ust_event_exclusion structures are similar */
+ key.exclusion = (struct lttng_ust_event_exclusion *)exclusion;
/* Lookup using the event name as hash and a custom match fct. */
cds_lfht_lookup(ht->ht, ht->hash_fct((void *) name, lttng_ht_seed),
/* Copy all events from ltt ust channel to ust app channel */
cds_lfht_for_each_entry(uchan->events->ht, &iter.iter, uevent, node.node) {
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
- uevent->filter, uevent->attr.loglevel);
+ uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (ua_event == NULL) {
DBG2("UST event %s not found on shadow copy channel",
uevent->attr.name);
/* Get event node */
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
- uevent->filter, uevent->attr.loglevel);
+ uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (ua_event != NULL) {
ret = -EEXIST;
goto end;
/* Get event node */
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
- uevent->filter, uevent->attr.loglevel);
+ uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (ua_event == NULL) {
DBG3("UST app enable event %s not found for app PID %d."
"Skipping app", uevent->attr.name, app->pid);
ua_chan = caa_container_of(ua_chan_node, struct ust_app_channel, node);
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
- uevent->filter, uevent->attr.loglevel);
+ uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (ua_event == NULL) {
ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
if (ret < 0) {