summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-02-07 11:24:25 +0300
committerNamhyung Kim <namhyung@kernel.org>2026-03-14 00:26:27 +0300
commit8e6f3103c079d44b51177449cd93af4c18733194 (patch)
tree626f76270ee379e7383ad9d9ede4dac2fe30c918
parented09766cd0bff29a537c6262a2dfca3643c2f6e6 (diff)
downloadlinux-8e6f3103c079d44b51177449cd93af4c18733194.tar.xz
perf dump-insn: Remove dump-insn.c
dump_insn and arch_is_uncond_branch are declared in intel-pt-insn-decoder.c which is unconditionally part of all perf builds. Don't declare weak versions of these symbols that will be unused. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
-rw-r--r--tools/perf/util/Build1
-rw-r--r--tools/perf/util/dump-insn.c23
2 files changed, 0 insertions, 24 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index bcccad7487a9..89de23dec401 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -149,7 +149,6 @@ endif
perf-util-y += cs-etm-base.o
perf-util-y += parse-branch-options.o
-perf-util-y += dump-insn.o
perf-util-y += parse-regs-options.o
perf-util-y += parse-sublevel-options.o
perf-util-y += term.o
diff --git a/tools/perf/util/dump-insn.c b/tools/perf/util/dump-insn.c
deleted file mode 100644
index c1cc0ade48d0..000000000000
--- a/tools/perf/util/dump-insn.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/compiler.h>
-#include "dump-insn.h"
-
-/* Fallback code */
-
-__weak
-const char *dump_insn(struct perf_insn *x __maybe_unused,
- u64 ip __maybe_unused, u8 *inbuf __maybe_unused,
- int inlen __maybe_unused, int *lenp)
-{
- if (lenp)
- *lenp = 0;
- return "?";
-}
-
-__weak
-int arch_is_uncond_branch(const unsigned char *buf __maybe_unused,
- size_t len __maybe_unused,
- int x86_64 __maybe_unused)
-{
- return 0;
-}