From bc70f84a59eacc7734dd15a6fbcc452168e3687f Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 28 Aug 2019 14:30:57 -0400 Subject: [PATCH] ctf: remove ctf_fs_trace::name Now that we don't report the name of CTF traces in `babeltrace.trace-info`, it is no longer useful to invent a name for each trace. So remove the ctf_fs_trace::name field, and everything related to it. Note that the name set on the bt_trace (in set_trace_name) does not depend on this field. Change-Id: Ia1d3e917e7b1c553c0da0c8365cda9ec600c854b Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1991 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- src/plugins/ctf/fs-src/fs.c | 14 -------------- src/plugins/ctf/fs-src/fs.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/src/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c index 24209943..fe53c242 100644 --- a/src/plugins/ctf/fs-src/fs.c +++ b/src/plugins/ctf/fs-src/fs.c @@ -359,10 +359,6 @@ void ctf_fs_trace_destroy(struct ctf_fs_trace *ctf_fs_trace) g_string_free(ctf_fs_trace->path, TRUE); } - if (ctf_fs_trace->name) { - g_string_free(ctf_fs_trace->name, TRUE); - } - if (ctf_fs_trace->metadata) { ctf_fs_metadata_fini(ctf_fs_trace->metadata); g_free(ctf_fs_trace->metadata); @@ -1025,11 +1021,6 @@ struct ctf_fs_trace *ctf_fs_trace_create(bt_self_component *self_comp, goto error; } - ctf_fs_trace->name = g_string_new(name); - if (!ctf_fs_trace->name) { - goto error; - } - ctf_fs_trace->metadata = g_new0(struct ctf_fs_metadata, 1); if (!ctf_fs_trace->metadata) { goto error; @@ -1559,7 +1550,6 @@ int merge_ctf_fs_traces(struct ctf_fs_trace **traces, unsigned int num_traces) struct ctf_fs_trace *winner; guint i; int ret = 0; - char uuid_str[BT_UUID_STR_LEN + 1]; BT_ASSERT(num_traces >= 2); @@ -1604,10 +1594,6 @@ int merge_ctf_fs_traces(struct ctf_fs_trace **traces, unsigned int num_traces) traces[i] = NULL; } - /* Use the string representation of the UUID as the trace name. */ - bt_uuid_to_str(winner->metadata->tc->uuid, uuid_str); - g_string_printf(winner->name, "%s", uuid_str); - end: return ret; } diff --git a/src/plugins/ctf/fs-src/fs.h b/src/plugins/ctf/fs-src/fs.h index 4c0aa2ef..75faeb37 100644 --- a/src/plugins/ctf/fs-src/fs.h +++ b/src/plugins/ctf/fs-src/fs.h @@ -99,9 +99,6 @@ struct ctf_fs_trace { /* Owned by this */ GString *path; - /* Owned by this */ - GString *name; - /* Next automatic stream ID when not provided by packet header */ uint64_t next_stream_id; }; -- 2.34.1