From: linux@treblig.org
To: irogers@google.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, kan.liang@linux.intel.com,
namhyung@kernel.org
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 4/6] perf util: Remove unused perf_data__update_dir
Date: Wed, 5 Mar 2025 02:31:18 +0000 [thread overview]
Message-ID: <20250305023120.155420-5-linux@treblig.org> (raw)
In-Reply-To: <20250305023120.155420-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
tools/perf/util/data.c | 20 --------------------
tools/perf/util/data.h | 1 -
2 files changed, 21 deletions(-)
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 98661ede2a73..164eb45a0b36 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -158,26 +158,6 @@ int perf_data__open_dir(struct perf_data *data)
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;
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
index 110f3ebde30f..1438e32e0451 100644
--- a/tools/perf/util/data.h
+++ b/tools/perf/util/data.h
@@ -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);
--
2.48.1
next prev parent reply other threads:[~2025-03-05 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 2:31 [PATCH 0/6] perf: Deadcode - the P's linux
2025-03-05 2:31 ` [PATCH 1/6] perf core: Remove perf_event_attrs and perf_event_refresh linux
2025-03-05 2:31 ` [PATCH 2/6] perf util: Remove unused perf_color_default_config linux
2025-03-05 2:31 ` [PATCH 3/6] perf util: Remove unused pstack__pop linux
2025-03-05 2:31 ` linux [this message]
2025-03-05 2:31 ` [PATCH 5/6] perf util: Remove unused perf_pmus__default_pmu_name linux
2025-03-05 2:31 ` [PATCH 6/6] perf util: Remove unused perf_config__refresh linux
2025-03-06 7:17 ` [PATCH 0/6] perf: Deadcode - the P's Ian Rogers
2025-03-06 13:13 ` Dr. David Alan Gilbert
2025-03-11 16:11 ` (subset) " Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250305023120.155420-5-linux@treblig.org \
--to=linux@treblig.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).