diff options
| author | Ian Rogers <irogers@google.com> | 2026-06-02 08:25:12 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-03 16:52:27 -0300 |
| commit | da976dd4842981fa9fe8bf736ec3d440fa9ce029 (patch) | |
| tree | 0c58f3121111f5d9e4af79b5fa02f5f7d573805a | |
| parent | 13d5660026b5415caea341380d68bc75960ba502 (diff) | |
perf env: Remove unused perf_env__raw_arch
The switch to using e_machine has made the perf_env__raw_arch function
unused so remove it.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Honglei Wang <jameshongleiwang@126.com>
Cc: Jan Polensky <japo@linux.ibm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/perf/util/env.c | 18 | ||||
| -rw-r--r-- | tools/perf/util/env.h | 1 |
2 files changed, 0 insertions, 19 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index b41562fb06c6..28c54c58193e 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -470,19 +470,6 @@ int perf_env__read_cpuid(struct perf_env *env) return 0; } -static int perf_env__read_arch(struct perf_env *env) -{ - struct utsname uts; - - if (env->arch) - return 0; - - if (!uname(&uts)) - env->arch = strdup(uts.machine); - - return env->arch ? 0 : -ENOMEM; -} - static int perf_env__read_nr_cpus_avail(struct perf_env *env) { if (env->nr_cpus_avail == 0) @@ -601,11 +588,6 @@ error: return ret; } -const char *perf_env__raw_arch(struct perf_env *env) -{ - return env && !perf_env__read_arch(env) ? env->arch : "unknown"; -} - int perf_env__nr_cpus_avail(struct perf_env *env) { return env && !perf_env__read_nr_cpus_avail(env) ? env->nr_cpus_avail : 0; diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h index 5a917271ca0d..83e74328798f 100644 --- a/tools/perf/util/env.h +++ b/tools/perf/util/env.h @@ -190,7 +190,6 @@ uint16_t perf_env__e_machine(struct perf_env *env, uint32_t *e_flags); const char *perf_env__arch(struct perf_env *env); const char *perf_env__arch_strerrno(uint16_t e_machine, int err); const char *perf_env__cpuid(struct perf_env *env); -const char *perf_env__raw_arch(struct perf_env *env); int perf_env__nr_cpus_avail(struct perf_env *env); void perf_env__init(struct perf_env *env); |
