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=657d6e554310f70fdbed57d72d9f7165daf5b768;hb=b871e4b3a823857987e1ea909edcb39cbec6febe;hpb=10646003ec8dd54b76990cf335ef2bc56ab17a3e diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 657d6e554..c08246a25 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -404,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. * @@ -546,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); } @@ -638,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. */