OSDN Git Service

perf data: Rename directory "header" file to "data"
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 4 Oct 2019 08:31:19 +0000 (11:31 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Nov 2019 18:43:05 +0000 (15:43 -0300)
In preparation to support a single file directory format, rename "header"
to "data" because "header" is a mis-leading name when there is only 1 file.
Note, in the multi-file case, the "header" file also contains data.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20191004083121.12182-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/data.c
tools/perf/util/util.c

index 8993253..df173f0 100644 (file)
@@ -306,7 +306,7 @@ static int open_dir(struct perf_data *data)
         * So far we open only the header, so we can read the data version and
         * layout.
         */
-       if (asprintf(&data->file.path, "%s/header", data->path) < 0)
+       if (asprintf(&data->file.path, "%s/data", data->path) < 0)
                return -1;
 
        if (perf_data__is_write(data) &&
index ae56c76..3096654 100644 (file)
@@ -185,7 +185,7 @@ static int rm_rf_depth_pat(const char *path, int depth, const char **pat)
 int rm_rf_perf_data(const char *path)
 {
        const char *pat[] = {
-               "header",
+               "data",
                "data.*",
                NULL,
        };