Add exclusion data to trace_ust_create_event
authorJP Ikaheimonen <jp_ikaheimonen@mentor.com>
Mon, 4 Nov 2013 13:08:59 +0000 (15:08 +0200)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 14 Nov 2013 18:40:57 +0000 (13:40 -0500)
Add exclusion data to the prototype of trace_ust_create_event
Copy exclusion data to the newly created ltt_ust_event structure
Call trace_ust_create_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
tests/unit/test_ust_data.c

index 791251e7d09605a638301e6fe84fa8e43223d14b..8be9fc6c44611b551ecfa22f60663c589dcfbf92 100644 (file)
@@ -364,7 +364,7 @@ int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess,
                }
 
                /* Create ust event */
-               uevent = trace_ust_create_event(&events[i], filter);
+               uevent = trace_ust_create_event(&events[i], filter, NULL);
                if (uevent == NULL) {
                        ret = LTTNG_ERR_FATAL;
                        goto error_destroy;
@@ -423,7 +423,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess,
        uevent = trace_ust_find_event(uchan->events, event->name, filter,
                        event->loglevel);
        if (uevent == NULL) {
-               uevent = trace_ust_create_event(event, filter);
+               uevent = trace_ust_create_event(event, filter, exclusion);
                if (uevent == NULL) {
                        ret = LTTNG_ERR_UST_ENABLE_FAIL;
                        goto error;
index c0fc3a0253fe7c630b5abd5ed0db86a3c1272d9c..21197171c567c2215e81557427318ca66f56bc84 100644 (file)
@@ -330,7 +330,8 @@ error:
  * Return pointer to structure or NULL.
  */
 struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev,
-               struct lttng_filter_bytecode *filter)
+               struct lttng_filter_bytecode *filter,
+               struct lttng_event_exclusion *exclusion)
 {
        struct ltt_ust_event *lue;
 
@@ -384,6 +385,7 @@ struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev,
 
        /* Same layout. */
        lue->filter = (struct lttng_ust_filter_bytecode *) filter;
+       lue->exclusion = (struct lttng_event_exclusion *) exclusion;
 
        /* Init node */
        lttng_ht_node_init_str(&lue->node, lue->attr.name);
index 06d0202d1d1fdb323f94baafd8577c8e58714f29..9d2b4571a7e04290b1c90af4d7e93827ba912e2e 100644 (file)
@@ -167,7 +167,8 @@ struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
 struct ltt_ust_session *trace_ust_create_session(uint64_t session_id);
 struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr);
 struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev,
-               struct lttng_filter_bytecode *filter);
+               struct lttng_filter_bytecode *filter,
+               struct lttng_event_exclusion *exclusion);
 struct ltt_ust_metadata *trace_ust_create_metadata(char *path);
 struct ltt_ust_context *trace_ust_create_context(
                struct lttng_event_context *ctx);
@@ -214,7 +215,8 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr)
 }
 static inline
 struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev,
-               struct lttng_filter_bytecode *filter)
+               struct lttng_filter_bytecode *filter,
+               struct lttng_event_exclusion *exclusion)
 {
        return NULL;
 }
index ae8b1232a02a1b3f0f9a2095f2741c99b975fb10..7c48c5cb35637e5017add8ed6e876dacd5f75c0e 100644 (file)
@@ -151,7 +151,7 @@ static void test_create_ust_event(void)
        ev.type = LTTNG_EVENT_TRACEPOINT;
        ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
 
-       event = trace_ust_create_event(&ev, NULL);
+       event = trace_ust_create_event(&ev, NULL, NULL);
 
        ok(event != NULL, "Create UST event");
 
This page took 0.036609 seconds and 4 git commands to generate.