]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf dump-insn: Remove dump-insn.c
authorIan Rogers <irogers@google.com>
Sat, 7 Feb 2026 08:24:25 +0000 (00:24 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 13 Mar 2026 21:26:27 +0000 (14:26 -0700)
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>
tools/perf/util/Build
tools/perf/util/dump-insn.c [deleted file]

index bcccad7487a9c47a42e0771af5f5c75a6ad1e74f..89de23dec40147ab19510f261862611dab4277f8 100644 (file)
@@ -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 (file)
index c1cc0ad..0000000
+++ /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;
-}