Add exclusion data to trace_ust_find_event
authorJP Ikaheimonen <jp_ikaheimonen@mentor.com>
Mon, 4 Nov 2013 13:19:54 +0000 (15:19 +0200)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 14 Nov 2013 18:40:57 +0000 (13:40 -0500)
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
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng-sessiond/trace-ust.h

index 8be9fc6c44611b551ecfa22f60663c589dcfbf92..fedd18c85973292b3cf24f71b728f43d14f192f0 100644 (file)
@@ -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) {
index 21197171c567c2215e81557427318ca66f56bc84..657d6e554310f70fdbed57d72d9f7165daf5b768 100644 (file)
@@ -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);
index 9d2b4571a7e04290b1c90af4d7e93827ba912e2e..9f8d182b3cf610551df792b8cda82646c453110a 100644 (file)
@@ -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;
 }
This page took 0.027126 seconds and 4 git commands to generate.