Skip to content

Commit

Permalink
package/linux-tools: perf: add host-python3 dependency
Browse files Browse the repository at this point in the history
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 <[email protected]>
[[email protected]:
  - add BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3
  - extend commit log accordingly
]
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
geomatsi authored and yann-morin-1998 committed Sep 5, 2022
1 parent 7713f6d commit 286928d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package/linux-tools/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions package/linux-tools/linux-tool-perf.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 286928d

Please sign in to comment.