mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 19:01:45 -04:00
perf tools: Deadcode removal
The last use of machine__fprintf_vmlinux_path() was removed in 2011 by commitab81f3fd35("perf top: Reuse the 'report' hist_entry/hists classes") mmap_cpu_mask__duplicate() was added in 2021 by commit6bd006c6eb("perf mmap: Introduce mmap_cpu_mask__duplicate()") but hasn't been used since. Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Tested-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250204220545.456435-1-linux@treblig.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
committed by
Namhyung Kim
parent
9e676a024f
commit
1df4b33f62
@@ -886,26 +886,6 @@ size_t machines__fprintf_dsos_buildid(struct machines *machines, FILE *fp,
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp)
|
||||
{
|
||||
int i;
|
||||
size_t printed = 0;
|
||||
struct dso *kdso = machine__kernel_dso(machine);
|
||||
|
||||
if (dso__has_build_id(kdso)) {
|
||||
char filename[PATH_MAX];
|
||||
|
||||
if (dso__build_id_filename(kdso, filename, sizeof(filename), false))
|
||||
printed += fprintf(fp, "[0] %s\n", filename);
|
||||
}
|
||||
|
||||
for (i = 0; i < vmlinux_path__nr_entries; ++i) {
|
||||
printed += fprintf(fp, "[%d] %s\n", i + dso__has_build_id(kdso),
|
||||
vmlinux_path[i]);
|
||||
}
|
||||
return printed;
|
||||
}
|
||||
|
||||
struct machine_fprintf_cb_args {
|
||||
FILE *fp;
|
||||
size_t printed;
|
||||
|
||||
@@ -266,8 +266,6 @@ int machines__create_kernel_maps(struct machines *machines, pid_t pid);
|
||||
int machines__create_guest_kernel_maps(struct machines *machines);
|
||||
void machines__destroy_kernel_maps(struct machines *machines);
|
||||
|
||||
size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp);
|
||||
|
||||
typedef int (*machine__dso_t)(struct dso *dso, struct machine *machine, void *priv);
|
||||
|
||||
int machine__for_each_dso(struct machine *machine, machine__dso_t fn,
|
||||
|
||||
@@ -356,14 +356,3 @@ int perf_mmap__push(struct mmap *md, void *to,
|
||||
out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int mmap_cpu_mask__duplicate(struct mmap_cpu_mask *original, struct mmap_cpu_mask *clone)
|
||||
{
|
||||
clone->nbits = original->nbits;
|
||||
clone->bits = bitmap_zalloc(original->nbits);
|
||||
if (!clone->bits)
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(clone->bits, original->bits, MMAP_CPU_MASK_BYTES(original));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,4 @@ size_t mmap__mmap_len(struct mmap *map);
|
||||
|
||||
void mmap_cpu_mask__scnprintf(struct mmap_cpu_mask *mask, const char *tag);
|
||||
|
||||
int mmap_cpu_mask__duplicate(struct mmap_cpu_mask *original,
|
||||
struct mmap_cpu_mask *clone);
|
||||
|
||||
#endif /*__PERF_MMAP_H */
|
||||
|
||||
Reference in New Issue
Block a user