From patchwork Tue Aug 22 17:00:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2562AEE49A3 for ; Tue, 22 Aug 2023 17:00:45 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1525.1692723642811864763 for ; Tue, 22 Aug 2023 10:00:42 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3F53B11FB; Tue, 22 Aug 2023 10:01:23 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 702043F762; Tue, 22 Aug 2023 10:00:39 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 1/5] perf: enable verbose feature detection Date: Tue, 22 Aug 2023 18:00:14 +0100 Message-Id: <20230822170018.315470-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Aug 2023 17:00:45 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186513 From: Ross Burton Having verbose feature detection is helpful to see exactly what has been enabled or disabled. Signed-off-by: Ross Burton --- meta/recipes-kernel/perf/perf.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 7d90ac3612f..68d59f69c7d 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -73,6 +73,7 @@ LDFLAGS="-ldl -lutil" EXTRA_OEMAKE = '\ V=1 \ + VF=1 \ -C ${S}/tools/perf \ O=${B} \ CROSS_COMPILE=${TARGET_PREFIX} \ From patchwork Tue Aug 22 17:00:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29262 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08453EE4993 for ; Tue, 22 Aug 2023 17:00:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1527.1692723645569218714 for ; Tue, 22 Aug 2023 10:00:45 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1926611FB; Tue, 22 Aug 2023 10:01:26 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 495A13F762; Tue, 22 Aug 2023 10:00:42 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 2/5] perf: add more PACKAGECONFIGs Date: Tue, 22 Aug 2023 18:00:15 +0100 Message-Id: <20230822170018.315470-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822170018.315470-1-ross.burton@arm.com> References: <20230822170018.315470-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Aug 2023 17:00:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186514 From: Ross Burton libpfm4 and babeltrace are enabled if they're found, so add PACKAGECONFIGs so that our configuration is explicit. Signed-off-by: Ross Burton --- meta/recipes-kernel/perf/perf.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 68d59f69c7d..9eeb1003f3a 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -30,6 +30,8 @@ PACKAGECONFIG[cap] = ",,libcap" PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent" # Arm CoreSight PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd" +PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4" +PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace" # libunwind is not yet ported for some architectures PACKAGECONFIG:remove:arc = "libunwind" From patchwork Tue Aug 22 17:00:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29260 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13C15EE49A3 for ; Tue, 22 Aug 2023 17:00:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1529.1692723648377266758 for ; Tue, 22 Aug 2023 10:00:48 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D64A411FB; Tue, 22 Aug 2023 10:01:28 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 224963F762; Tue, 22 Aug 2023 10:00:45 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 3/5] perf: fix perl binding support Date: Tue, 22 Aug 2023 18:00:16 +0100 Message-Id: <20230822170018.315470-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822170018.315470-1-ross.burton@arm.com> References: <20230822170018.315470-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Aug 2023 17:00:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186515 From: Ross Burton The build of the perl integration has been broken for some time. Update the PERL_* variables so that it can find libperl in the new location. This then fails because the Perl headers cause warnings and the feature checks run with -Werror, so disable the errors. The perf-dbg package then has target build paths, so set INSANE_SKIP for now until this is resolved. Signed-off-by: Ross Burton --- meta/recipes-kernel/perf/perf-perl.inc | 10 +++++++--- meta/recipes-kernel/perf/perf.bb | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meta/recipes-kernel/perf/perf-perl.inc b/meta/recipes-kernel/perf/perf-perl.inc index ae77319b203..491f54c3280 100644 --- a/meta/recipes-kernel/perf/perf-perl.inc +++ b/meta/recipes-kernel/perf/perf-perl.inc @@ -2,6 +2,10 @@ inherit perlnative cpan-base # Env var which tells perl if it should use host (no) or target (yes) settings export PERLCONFIGTARGET = "${@is_target(d)}" -export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE" -export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" -export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" +export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE" +export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}" +export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" + +# The perl symbols CPPSTDIN and CPPRUN embed the sysroot into the +# binaries, work needed to remove this +INSANE_SKIP:${PN}-dbg += "buildpaths" diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 9eeb1003f3a..327934b72a7 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -323,6 +323,9 @@ do_configure:prepend () { if [ -e "${S}/tools/build/Makefile.feature" ]; then sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature fi + # The libperl feature check produces fatal warnings due to -Werror being + # used, silence enough errors that the check passes. + sed -i 's/\(FLAGS_PERL_EMBED=.*\)/\1 -Wno-error=unused-function -Wno-error=attributes/' ${S}/tools/build/feature/Makefile # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then From patchwork Tue Aug 22 17:00:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14EEFEE49AA for ; Tue, 22 Aug 2023 17:00:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1530.1692723651239758833 for ; Tue, 22 Aug 2023 10:00:51 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B460E11FB; Tue, 22 Aug 2023 10:01:31 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DEDB33F762; Tue, 22 Aug 2023 10:00:48 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 4/5] perf: split scripting PACKAGECONFIG into perl and python Date: Tue, 22 Aug 2023 18:00:17 +0100 Message-Id: <20230822170018.315470-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822170018.315470-1-ross.burton@arm.com> References: <20230822170018.315470-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Aug 2023 17:00:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186516 From: Ross Burton There's no reason for Python and Perl support to be tied together, so split the PACKAGECONFIG into two. Signed-off-by: Ross Burton --- meta/recipes-kernel/perf/perf.bb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 327934b72a7..f89ab20ca41 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -11,9 +11,10 @@ LICENSE = "GPL-2.0-only" PR = "r9" -PACKAGECONFIG ??= "scripting tui libunwind libtraceevent" +PACKAGECONFIG ??= "perl python tui libunwind libtraceevent" PACKAGECONFIG[dwarf] = ",NO_DWARF=1" -PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python3 python3-setuptools-native" +PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" +PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native" # gui support was added with kernel 3.6.35 # since 3.10 libnewt was replaced by slang # to cover a wide range of kernel we add both dependencies @@ -51,7 +52,7 @@ PROVIDES = "virtual/perf" inherit linux-kernel-base kernel-arch manpages # needed for building the tools/perf Python bindings -inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'python3targetconfig', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} inherit python3-dir export PYTHON_SITEPACKAGES_DIR @@ -61,7 +62,7 @@ export WERROR = "0" do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" # needed for building the tools/perf Perl binding -include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)} +include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} inherit kernelsrc @@ -107,7 +108,7 @@ EXTRA_OEMAKE += "\ 'sharedir=${@os.path.relpath(datadir, prefix)}' \ 'mandir=${@os.path.relpath(mandir, prefix)}' \ 'infodir=${@os.path.relpath(infodir, prefix)}' \ - ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ " # During do_configure, we might run a 'make clean'. That often breaks @@ -152,7 +153,7 @@ do_install() { unset CFLAGS oe_runmake install # we are checking for this make target to be compatible with older perf versions - if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then oe_runmake DESTDIR=${D} install-python_ext if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt @@ -370,9 +371,10 @@ RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PAC RDEPENDS:${PN}-perl =+ "bash perl perl-modules" RDEPENDS:${PN}-tests =+ "python3 bash" -RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" -RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" - +RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \ + ${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \ + " FILES_SOLIBSDEV = "" FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" From patchwork Tue Aug 22 17:00:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 29263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06ED0EE4993 for ; Tue, 22 Aug 2023 17:01:05 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1535.1692723655058354016 for ; Tue, 22 Aug 2023 10:00:55 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C87D511FB; Tue, 22 Aug 2023 10:01:34 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C42343F762; Tue, 22 Aug 2023 10:00:51 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 5/5] perf: disable perl support Date: Tue, 22 Aug 2023 18:00:18 +0100 Message-Id: <20230822170018.315470-5-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822170018.315470-1-ross.burton@arm.com> References: <20230822170018.315470-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Aug 2023 17:01:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/186517 From: Ross Burton The perf support was broken and if enabled results in non-reproducible binaries, so disable it for now. Signed-off-by: Ross Burton --- meta/recipes-kernel/perf/perf.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index f89ab20ca41..e22a1bebb26 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -11,7 +11,7 @@ LICENSE = "GPL-2.0-only" PR = "r9" -PACKAGECONFIG ??= "perl python tui libunwind libtraceevent" +PACKAGECONFIG ??= "python tui libunwind libtraceevent" PACKAGECONFIG[dwarf] = ",NO_DWARF=1" PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native"