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>
This commit is contained in:
Sergey Matyukevich 2022-09-04 23:57:02 +03:00 committed by Yann E. MORIN
parent 7713f6dd98
commit 286928d9b5
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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