From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Charlie Jenkins <charlie@rivosinc.com>,
Eric Biggers <ebiggers@kernel.org>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
James Clark <james.clark@linaro.org>,
Collin Funk <collin.funk1@gmail.com>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
Li Huafei <lihuafei1@huawei.com>,
Athira Rajeev <atrajeev@linux.ibm.com>,
Stephen Brennan <stephen.s.brennan@oracle.com>,
Dmitry Vyukov <dvyukov@google.com>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
Haibo Xu <haibo1.xu@intel.com>, Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
bpf@vger.kernel.org, llvm@lists.linux.dev,
Song Liu <song@kernel.org>
Subject: Re: [PATCH v7 00/11] Capstone/llvm improvements + dlopen support
Date: Mon, 6 Oct 2025 15:41:32 -0300 [thread overview]
Message-ID: <aOQNXBje78z-gPpi@x1> (raw)
In-Reply-To: <aOQMzhBqoL8qs5t2@x1>
On Mon, Oct 06, 2025 at 03:39:13PM -0300, Arnaldo Carvalho de Melo wrote:
> On Sun, Oct 05, 2025 at 02:22:01PM -0700, Ian Rogers wrote:
> > v7: Refactor now the first 5 patches, that largely moved code around,
> > have landed. Move the dlopen code to the end of the series so that
> > the first 8 patches can be picked improving capstone/LLVM support
> So I tentatively picked the first 8 patches, will test it now, hopefully
> we can go with it to have BPF annotation...
> Wait, will try to fix this one:
> ⬢ [acme@toolbx perf-tools-next]$ git log --oneline -1 ; time make -C tools/perf build-test
> make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 NO_LIBTRACEEVENT=1 NO_LIBELF=1 -j32 DESTDIR=/tmp/tmp.w26bDGykTM
> cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 NO_LIBTRACEEVENT=1 NO_LIBELF=1 -j32 DESTDIR=/tmp/tmp.w26bDGykTM
> BUILD: Doing 'make -j32' parallel build
> <SNIP>
> Auto-detecting system features:
> ... libdw: [ OFF ]
> ... glibc: [ on ]
> ... libelf: [ OFF ]
> ... libnuma: [ OFF ]
> ... numa_num_possible_cpus: [ OFF ]
> ... libpython: [ OFF ]
> ... libcapstone: [ OFF ]
> ... llvm-perf: [ OFF ]
> ... zlib: [ OFF ]
> ... lzma: [ OFF ]
> ... get_cpuid: [ on ]
> ... bpf: [ on ]
> ... libaio: [ on ]
> ... libzstd: [ OFF ]
> <SNIP>
> CC tests/api-io.o
> CC util/sha1.o
> CC util/smt.o
> LD util/intel-pt-decoder/perf-util-in.o
> CC tests/demangle-java-test.o
> CC util/strbuf.o
> CC util/string.o
> CC tests/demangle-ocaml-test.o
> CC util/strlist.o
> CC tests/demangle-rust-v0-test.o
> CC tests/pfm.o
> CC tests/parse-metric.o
> CC util/strfilter.o
> CC tests/pe-file-parsing.o
> util/llvm.c: In function ‘init_llvm’:
> util/llvm.c:78:17: error: implicit declaration of function ‘LLVMInitializeAllTargetInfos’ [-Wimplicit-function-declaration]
> 78 | LLVMInitializeAllTargetInfos();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/llvm.c:79:17: error: implicit declaration of function ‘LLVMInitializeAllTargetMCs’ [-Wimplicit-function-declaration]
> 79 | LLVMInitializeAllTargetMCs();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> util/llvm.c:80:17: error: implicit declaration of function ‘LLVMInitializeAllDisassemblers’ [-Wimplicit-function-declaration]
> 80 | LLVMInitializeAllDisassemblers();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/llvm.c: At top level:
> util/llvm.c:73:13: error: ‘init_llvm’ defined but not used [-Werror=unused-function]
> 73 | static void init_llvm(void)
> | ^~~~~~~~~
> cc1: all warnings being treated as errors
> CC tests/expand-cgroup.o
> CC util/top.o
> CC tests/perf-time-to-tsc.o
> CC util/usage.o
> make[6]: *** [/home/acme/git/perf-tools-next/tools/build/Makefile.build:86: util/llvm.o] Error 1
> make[6]: *** Waiting for unfinished jobs....
> CC tests/dlfilter-test.o
> CC tests/sigtrap.o
> CC tests/event_groups.o
Guess this will be enough:
diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c
index 565cad1969e5e51f..2ebf1f5f65bf77c7 100644
--- a/tools/perf/util/llvm.c
+++ b/tools/perf/util/llvm.c
@@ -70,6 +70,7 @@ int llvm__addr2line(const char *dso_name __maybe_unused, u64 addr __maybe_unused
#endif
}
+#ifdef HAVE_LIBLLVM_SUPPORT
static void init_llvm(void)
{
static bool init;
@@ -90,7 +91,6 @@ static void init_llvm(void)
* should add some textual annotation for after the instruction. The caller
* will use this information to add the actual annotation.
*/
-#ifdef HAVE_LIBLLVM_SUPPORT
struct symbol_lookup_storage {
u64 branch_addr;
u64 pcrel_load_addr;
next prev parent reply other threads:[~2025-10-06 18:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-05 21:22 [PATCH v7 00/11] Capstone/llvm improvements + dlopen support Ian Rogers
2025-10-05 21:22 ` [PATCH v7 01/11] perf check: Add libLLVM feature Ian Rogers
2025-10-05 21:22 ` [PATCH v7 02/11] perf llvm: Reduce LLVM initialization Ian Rogers
2025-10-05 21:22 ` [PATCH v7 03/11] perf dso: Move read_symbol from llvm/capstone to dso Ian Rogers
2025-10-05 21:22 ` [PATCH v7 04/11] perf dso: Support BPF programs in dso__read_symbol Ian Rogers
2025-10-05 21:22 ` [PATCH v7 05/11] perf dso: Clean up read_symbol error handling Ian Rogers
2025-10-05 21:22 ` [PATCH v7 06/11] perf disasm: Make ins__scnprintf and ins__is_nop static Ian Rogers
2025-10-05 21:22 ` [PATCH v7 07/11] perf srcline: Fallback between addr2line implementations Ian Rogers
2025-10-05 21:22 ` [PATCH v7 08/11] perf disasm: Remove unused evsel from annotate_args Ian Rogers
2025-10-05 21:22 ` [PATCH v7 09/11] perf capstone: Support for dlopen-ing libcapstone.so Ian Rogers
2025-10-05 21:22 ` [PATCH v7 10/11] perf llvm: Support for dlopen-ing libLLVM.so Ian Rogers
2025-10-05 21:22 ` [PATCH v7 11/11] perf llvm: Mangle libperf-llvm.so function names Ian Rogers
2025-10-06 18:39 ` [PATCH v7 00/11] Capstone/llvm improvements + dlopen support Arnaldo Carvalho de Melo
2025-10-06 18:41 ` Arnaldo Carvalho de Melo [this message]
2025-10-06 18:44 ` Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aOQNXBje78z-gPpi@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexghiti@rivosinc.com \
--cc=atrajeev@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=charlie@rivosinc.com \
--cc=collin.funk1@gmail.com \
--cc=dvyukov@google.com \
--cc=ebiggers@kernel.org \
--cc=haibo1.xu@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=justinstitt@google.com \
--cc=lihuafei1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux@treblig.org \
--cc=llvm@lists.linux.dev \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=peterz@infradead.org \
--cc=song@kernel.org \
--cc=stephen.s.brennan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).