ctf: remove ctf_fs_trace::name
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 28 Aug 2019 18:30:57 +0000 (14:30 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 29 Aug 2019 14:37:03 +0000 (10:37 -0400)
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 <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1991
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/fs-src/fs.h

index 24209943149a5b050c8cb8a07f1fdad536c268c7..fe53c242598f7db049dea953782298d8be21cb3d 100644 (file)
@@ -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;
 }
index 4c0aa2efc600a907a155dd79c1cbcd23998c10c6..75faeb37a116991fca6fc3ec8cdf4586ad0f1109 100644 (file)
@@ -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;
 };
This page took 0.026683 seconds and 4 git commands to generate.