From: Ian Rogers Date: Sun, 5 Oct 2025 21:22:02 +0000 (-0700) Subject: perf check: Add libLLVM feature X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e444c2d4a2b5fe65759ba826d7444bb83fc4fc16;p=users%2Fhch%2Fmisc.git perf check: Add libLLVM feature Advertise when perf is built with the HAVE_LIBLLVM_SUPPORT option. Committer testing: $ perf -vv | grep LLVM libLLVM: [ on ] # HAVE_LIBLLVM_SUPPORT $ And the form to use in scripts, notably the tools/perf/tests/shell/ 'perf test' ones: $ perf check feature libllvm libLLVM: [ on ] # HAVE_LIBLLVM_SUPPORT $ perf check -q feature libllvm && echo LLVM is present LLVM is present $ perf check -q feature liballvm && echo ALLVM is present $ Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andi Kleen Cc: Athira Rajeev Cc: Bill Wendling Cc: Charlie Jenkins Cc: Collin Funk Cc: Dmitriy Vyukov Cc: Dr. David Alan Gilbert Cc: Eric Biggers Cc: Haibo Xu Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Justin Stitt Cc: Li Huafei Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Song Liu Cc: Stephen Brennan Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documentation/perf-check.txt index ee92042082f7..4c9ccda6ce91 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -56,6 +56,7 @@ feature:: libcapstone / HAVE_LIBCAPSTONE_SUPPORT libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT libelf / HAVE_LIBELF_SUPPORT + libLLVM / HAVE_LIBLLVM_SUPPORT libnuma / HAVE_LIBNUMA_SUPPORT libopencsd / HAVE_CSTRACE_SUPPORT libperl / HAVE_LIBPERL_SUPPORT diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 8c0668911fb1..9ce2e71999df 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -48,6 +48,7 @@ struct feature_status supported_features[] = { FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("libelf", HAVE_LIBELF_SUPPORT), + FEATURE_STATUS("libLLVM", HAVE_LIBLLVM_SUPPORT), FEATURE_STATUS("libnuma", HAVE_LIBNUMA_SUPPORT), FEATURE_STATUS("libopencsd", HAVE_CSTRACE_SUPPORT), FEATURE_STATUS_TIP("libperl", HAVE_LIBPERL_SUPPORT, "Deprecated, use LIBPERL=1 and install perl-ExtUtils-Embed/libperl-dev to build with it"),