From 10646003ec8dd54b76990cf335ef2bc56ab17a3e Mon Sep 17 00:00:00 2001 From: JP Ikaheimonen Date: Mon, 4 Nov 2013 15:19:54 +0200 Subject: [PATCH] Add exclusion data to trace_ust_find_event Add exclusion data to prototype of trace_ust_find_event() Add exclusion data to the key structure in trace_ust_find_event() Call trace_ust_find_event with exclusion data wherever possible --- src/bin/lttng-sessiond/event.c | 4 ++-- src/bin/lttng-sessiond/trace-ust.c | 4 +++- src/bin/lttng-sessiond/trace-ust.h | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 8be9fc6c4..fedd18c85 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -350,7 +350,7 @@ int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess, * previously. */ uevent = trace_ust_find_event(uchan->events, events[i].name, filter, - events[i].loglevel); + events[i].loglevel, NULL); if (uevent != NULL) { ret = ust_app_enable_event_pid(usess, uchan, uevent, events[i].pid); @@ -421,7 +421,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); + event->loglevel, exclusion); if (uevent == NULL) { uevent = trace_ust_create_event(event, filter, exclusion); if (uevent == NULL) { diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 21197171c..657d6e554 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -168,7 +168,8 @@ error: * MUST be acquired before calling this. */ struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, - char *name, struct lttng_filter_bytecode *filter, int loglevel) + char *name, struct lttng_filter_bytecode *filter, int loglevel, + struct lttng_event_exclusion *exclusion) { struct lttng_ht_node_str *node; struct lttng_ht_iter iter; @@ -180,6 +181,7 @@ struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, key.name = name; key.filter = filter; key.loglevel = loglevel; + key.exclusion = exclusion; cds_lfht_lookup(ht->ht, ht->hash_fct((void *) name, lttng_ht_seed), trace_ust_ht_match_event, &key, &iter.iter); diff --git a/src/bin/lttng-sessiond/trace-ust.h b/src/bin/lttng-sessiond/trace-ust.h index 9d2b4571a..9f8d182b3 100644 --- a/src/bin/lttng-sessiond/trace-ust.h +++ b/src/bin/lttng-sessiond/trace-ust.h @@ -157,7 +157,8 @@ int trace_ust_ht_match_event_by_name(struct cds_lfht_node *node, * Lookup functions. NULL is returned if not found. */ struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, - char *name, struct lttng_filter_bytecode *filter, int loglevel); + char *name, struct lttng_filter_bytecode *filter, int loglevel, + struct lttng_event_exclusion *exclusion); struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht, char *name); @@ -252,7 +253,8 @@ struct ltt_ust_context *trace_ust_create_context( return NULL; } static inline struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, - char *name, struct lttng_filter_bytecode *filter, int loglevel) + char *name, struct lttng_filter_bytecode *filter, int loglevel, + struct lttng_event_exclusion *exclusion) { return NULL; } -- 2.34.1