X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-ust.c;h=c08246a25a9f441360fb5ad4a1b6c5ef1a04d7e0;hp=21197171c567c2215e81557427318ca66f56bc84;hb=b871e4b3a823857987e1ea909edcb39cbec6febe;hpb=561c68970ca461ccf8451aee47efc29da20ad8f1 diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 21197171c..c08246a25 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); @@ -402,48 +404,6 @@ error: return NULL; } -/* - * Allocate and initialize a ust metadata. - * - * Return pointer to structure or NULL. - */ -struct ltt_ust_metadata *trace_ust_create_metadata(char *path) -{ - int ret; - struct ltt_ust_metadata *lum; - - assert(path); - - lum = zmalloc(sizeof(struct ltt_ust_metadata)); - if (lum == NULL) { - PERROR("ust metadata zmalloc"); - goto error; - } - - /* Set default attributes */ - lum->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE; - lum->attr.subbuf_size = default_get_metadata_subbuf_size(); - lum->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM; - lum->attr.switch_timer_interval = DEFAULT_METADATA_SWITCH_TIMER; - lum->attr.read_timer_interval = DEFAULT_METADATA_READ_TIMER; - lum->attr.output = LTTNG_UST_MMAP; - - lum->handle = -1; - /* Set metadata trace path */ - ret = snprintf(lum->pathname, PATH_MAX, "%s/" DEFAULT_METADATA_NAME, path); - if (ret < 0) { - PERROR("asprintf ust metadata"); - goto error_free_metadata; - } - - return lum; - -error_free_metadata: - free(lum); -error: - return NULL; -} - /* * Allocate and initialize an UST context. * @@ -544,6 +504,7 @@ void trace_ust_destroy_event(struct ltt_ust_event *event) DBG2("Trace destroy UST event %s", event->attr.name); free(event->filter); + free(event->exclusion); free(event); } @@ -636,20 +597,6 @@ void trace_ust_delete_channel(struct lttng_ht *ht, assert(!ret); } -/* - * Cleanup ust metadata structure. - */ -void trace_ust_destroy_metadata(struct ltt_ust_metadata *metadata) -{ - assert(metadata); - - if (!metadata->handle) { - return; - } - DBG2("Trace UST destroy metadata %d", metadata->handle); - free(metadata); -} - /* * Iterate over a hash table containing channels and cleanup safely. */