Skip to contentSkip to conversation

perf tools build process cleanups and extra hints

PATCH Applied Arnaldo Carvalho de Melo 4 participants 7 messages Jun 20, 2025 – Jun 24, 2025 perf events

lore
Share & tools
lore

Arnaldo Carvalho de Melo

author maintainer
#0 lore raw

cover perf tools build process cleanups and extra hints

From: Arnaldo Carvalho de Melo <[email protected]>

Hi,

Some simple cleanups and extra hints for the build process,

- Arnaldo

Arnaldo Carvalho de Melo (3):
perf build: Suggest java-latest-openjdk-devel instead of old 1.8.0 one perf build: Add the libpfm devel fedora package name to the hint perf build: The bfd features are opt-in, stop testing for them by default

 tools/build/feature/test-all.c | 19 -------------------
 tools/perf/Makefile.config     |  9 +++++++--
 2 files changed, 7 insertions(+), 21 deletions(-)
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

PATCH 1/3 perf build: Suggest java-latest-openjdk-devel instead of old 1.8.0 one

From: Arnaldo Carvalho de Melo <[email protected]>

Just tidying up the suggestion to pick the latest and not some specific version.

---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
index d1ea7bf449647eb2..afebd3b1e6cb9f58 100644
@@ -1144,7 +1144,7 @@ ifndef NO_JVMTI
       endif
     endif # NO_JVMTI_CMLR
   else
-    $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel)
+    $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-latest-openjdk-devel)
     NO_JVMTI := 1
   endif
 endif
Signature · 1 line
2.49.0
reviewer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] perf build: Suggest java-latest-openjdk-devel instead of old 1.8.0 one

Quoted 6 lines · Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

Just tidying up the suggestion to pick the latest and not some specific version.

Quoted 8 lines

For patches 1 to 3:

Thanks,
Ian

Quoted 20 lines
---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -2
index d1ea7bf449647eb2..afebd3b1e6cb9f58 100644
@@ -1144,7 +1144,7 @@ ifndef NO_JVMTI
       endif
     endif # NO_JVMTI_CMLR
   else
-    $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel)
+    $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-latest-openjdk-devel)
     NO_JVMTI := 1
   endif
 endif
--

2.49.0

author maintainer
#3 lore raw

PATCH 2/3 perf build: Add the libpfm devel fedora package name to the hint

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

Just to follow the pattern with other devel packages.

---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
index afebd3b1e6cb9f58..fd03ba83a48ee08b 100644
@@ -1157,7 +1157,7 @@ ifndef NO_LIBPFM4
     ASCIIDOC_EXTRA = -aHAVE_LIBPFM=1
     $(call detected,CONFIG_LIBPFM4)
   else
-    $(warning libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev)
+    $(warning libpfm4 not found, disables libpfm4 support. Please install libpfm-devel or libpfm4-dev)
   endif
 endif
 
Signature · 1 line
2.49.0
author maintainer
#4 lore raw

PATCH 3/3 perf build: The bfd features are opt-in, stop testing for them by default

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

These are leftovers noticed while updating a build container.

We don't need those so that test-all.c can build and thus speed up the feature detection.

Test for those features only if the user asks for BUILD_NONDISTRO=1 to build with libbfd.

Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/build/feature/test-all.c | 19 -------------------
 tools/perf/Makefile.config     |  5 +++++
 2 files changed, 5 insertions(+), 19 deletions(-)
tools/build/feature/test-all.c +0 -19
index 03ddaac6f4c4dfa2..1010f233d9c1ad49 100644
@@ -66,14 +66,6 @@
 # include "test-libslang.c"
 #undef main
 
-#define main main_test_libbfd
-# include "test-libbfd.c"
-#undef main
-
-#define main main_test_libbfd_buildid
-# include "test-libbfd-buildid.c"
-#undef main
-
 #define main main_test_backtrace
 # include "test-backtrace.c"
 #undef main
@@ -158,14 +150,6 @@
 # include "test-reallocarray.c"
 #undef main
 
-#define main main_test_disassembler_four_args
-# include "test-disassembler-four-args.c"
-#undef main
-
-#define main main_test_disassembler_init_styled
-# include "test-disassembler-init-styled.c"
-#undef main
-
 #define main main_test_libzstd
 # include "test-libzstd.c"
 #undef main
@@ -193,8 +177,6 @@ int main(int argc, char *argv[])
 	main_test_libelf_gelf_getnote();
 	main_test_libelf_getshdrstrndx();
 	main_test_libslang();
-	main_test_libbfd();
-	main_test_libbfd_buildid();
 	main_test_backtrace();
 	main_test_libnuma();
 	main_test_numa_num_possible_cpus();
@@ -213,7 +195,6 @@ int main(int argc, char *argv[])
 	main_test_setns();
 	main_test_libaio();
 	main_test_reallocarray();
-	main_test_disassembler_four_args();
 	main_test_libzstd();
 	main_test_libtraceevent();
 	main_test_libtracefs();
tools/perf/Makefile.config +5 -0
index fd03ba83a48ee08b..12193986effb954a 100644
@@ -918,6 +918,8 @@ ifneq ($(NO_JEVENTS),1)
 endif
 
 ifdef BUILD_NONDISTRO
+  $(call feature_check,libbfd)
+
   ifeq ($(feature-libbfd), 1)
     EXTLIBS += -lbfd -lopcodes
   else
@@ -946,6 +948,9 @@ ifdef BUILD_NONDISTRO
 
   CFLAGS += -DHAVE_LIBBFD_SUPPORT
   CXXFLAGS += -DHAVE_LIBBFD_SUPPORT
+
+  $(call feature_check,libbfd-buildid)
+
   ifeq ($(feature-libbfd-buildid), 1)
     CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
   else
Signature · 1 line
2.49.0
reviewer Reviewed-by on the v1 series
#5 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 8 lines · Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

Hi,

Some simple cleanups and extra hints for the build process,

- Arnaldo

Quoted 9 lines

Arnaldo Carvalho de Melo (3):
perf build: Suggest java-latest-openjdk-devel instead of old 1.8.0 one perf build: Add the libpfm devel fedora package name to the hint perf build: The bfd features are opt-in, stop testing for them by default

  tools/build/feature/test-all.c | 19 -------------------
  tools/perf/Makefile.config     |  9 +++++++--
  2 files changed, 7 insertions(+), 21 deletions(-)