From: JP Ikaheimonen Date: Mon, 4 Nov 2013 14:35:51 +0000 (+0200) Subject: Add exclusion data to find_ust_app_event X-Git-Tag: v2.4.0-rc1~26 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=39c5a3a7d69d6a2c3bdd76f2ea1231ebf42537ac Add exclusion data to find_ust_app_event Add exclusion data to the prototype of find_ust_app_event and to wherever it is called. --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 9f9919e63..adb31e85b 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1022,7 +1022,8 @@ error: * 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; @@ -1036,6 +1037,8 @@ static struct ust_app_event *find_ust_app_event(struct lttng_ht *ht, 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), @@ -1471,7 +1474,7 @@ static void shadow_copy_channel(struct ust_app_channel *ua_chan, /* 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); @@ -2584,7 +2587,7 @@ int create_ust_app_event(struct ust_app_session *ua_sess, /* 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; @@ -3642,7 +3645,7 @@ int ust_app_enable_event_glb(struct ltt_ust_session *usess, /* 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); @@ -4368,7 +4371,7 @@ int ust_app_enable_event_pid(struct ltt_ust_session *usess, 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) {