]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
perf tools: Deadcode removal
authorDr. David Alan Gilbert <linux@treblig.org>
Tue, 4 Feb 2025 22:05:45 +0000 (22:05 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 10 Feb 2025 19:46:02 +0000 (11:46 -0800)
The last use of machine__fprintf_vmlinux_path() was removed in 2011 by
commit ab81f3fd350c ("perf top: Reuse the 'report' hist_entry/hists
classes")

mmap_cpu_mask__duplicate() was added in 2021 by
commit 6bd006c6eb7f ("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>
tools/perf/util/machine.c
tools/perf/util/machine.h
tools/perf/util/mmap.c
tools/perf/util/mmap.h

index 2d51badfbf2e2d1588fa4fdd42ef6c8fea35bf0e..321cc110698c4349ccf636bccbf85fbb7f1a1264 100644 (file)
@@ -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;
index 2e5a4cb342d82c2261ec0500a4fd71090bacbe7f..ae3e5542d57df26b0aaca63ec570f084ddafcb90 100644 (file)
@@ -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,
index 43b02293f1d2daf9786e5eb31714f1d19e93dd16..a7ef4d8d57d8bc9efc097e2fdc173ea76bc39487 100644 (file)
@@ -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;
-}
index 0df6e1621c7e8fcf5857d3f3ce5709739fe53064..4d72c5fa50843c2b111a240fea013ef930364d0e 100644 (file)
@@ -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 */