perf util: Remove unused perf_data__update_dir
authorDr. David Alan Gilbert <linux@treblig.org>
Wed, 5 Mar 2025 02:31:18 +0000 (02:31 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 10 Mar 2025 18:31:24 +0000 (11:31 -0700)
perf_data__update_dir() was added in 2019's
commit e8be135751f2 ("perf data: Add perf_data__update_dir() function")
but has never been used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250305023120.155420-5-linux@treblig.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/data.c
tools/perf/util/data.h

index 98661ede2a736320c690b3160cc350beefde368a..164eb45a0b3690b6edd96ce0a8466e202bd3a675 100644 (file)
@@ -158,26 +158,6 @@ out_err:
        return ret;
 }
 
-int perf_data__update_dir(struct perf_data *data)
-{
-       int i;
-
-       if (WARN_ON(!data->is_dir))
-               return -EINVAL;
-
-       for (i = 0; i < data->dir.nr; i++) {
-               struct perf_data_file *file = &data->dir.files[i];
-               struct stat st;
-
-               if (fstat(file->fd, &st))
-                       return -1;
-
-               file->size = st.st_size;
-       }
-
-       return 0;
-}
-
 static bool check_pipe(struct perf_data *data)
 {
        struct stat st;
index 110f3ebde30fdb4611e9ca813285d87eb857d606..1438e32e04515f5ec8d1e46f5c4a0608cfc0ad33 100644 (file)
@@ -97,7 +97,6 @@ int perf_data__switch(struct perf_data *data,
 int perf_data__create_dir(struct perf_data *data, int nr);
 int perf_data__open_dir(struct perf_data *data);
 void perf_data__close_dir(struct perf_data *data);
-int perf_data__update_dir(struct perf_data *data);
 unsigned long perf_data__size(struct perf_data *data);
 int perf_data__make_kcore_dir(struct perf_data *data, char *buf, size_t buf_sz);
 bool has_kcore_dir(const char *path);