فهرست منبع

package/linux-tools: perf: add host-python3 dependency

Linux kernel commit 00facc760903 ("perf jevents: Switch build to use
jevents.py") switched to auto-generation of arch-specific PMU events
using python script. Now custom PMU events for different platforms of
the selected target architecture are not embedded into perf binary if
an appropriate host python interpreter is not present. In practice it
means that perf is successfully built, but 'perf list pmu' will show
no custom events on a target platform even if those events are supported
and properly defined in tools/perf/pmu-events/arch/<target arch>
directory in the kernel source tree.

Since building host-python3 is not instantaneous, add a config option,
like we have in the kernel for a bunch of host packages, to id=ndicate
that host-python3 is required, and only add the dependency in that case.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
[yann.morin.1998@free.fr:
  - add BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3
  - extend commit log accordingly
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Sergey Matyukevich 2 سال پیش
والد
کامیت
286928d9b5
2فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 7 0
      package/linux-tools/Config.in
  2. 4 0
      package/linux-tools/linux-tool-perf.mk.in

+ 7 - 0
package/linux-tools/Config.in

@@ -92,6 +92,13 @@ config BR2_PACKAGE_LINUX_TOOLS_PERF_TUI
 	  enables zooming into DSOs and threads as well as other
 	  features.
 
+config BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3
+	bool "perf need python3 to build"
+	select BR2_PACKAGE_HOST_PYTHON3
+	help
+	  Starting with linux 6.0, parts of the perf source code
+	  is generated by running a python3 script.
+
 endif
 
 config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS

+ 4 - 0
package/linux-tools/linux-tool-perf.mk.in

@@ -8,6 +8,10 @@ LINUX_TOOLS += perf
 
 PERF_DEPENDENCIES = host-flex host-bison
 
+ifeq ($(BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3),y)
+PERF_DEPENDENCIES += host-python3
+endif
+
 ifeq ($(NORMALIZED_ARCH),x86_64)
 PERF_ARCH=x86
 else