From bf7cbaff417b45c15a11034f2809193a563064b7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 27 Aug 2020 09:56:28 +0100 Subject: lttng: Move platform logic to dedicated inc file Some platforms support kernel tracing, some support userspace tracing. This change: * Moves the knowledge/config to one place in an inc file * Allows lttng-tools to build without lttng-modules * Hence enables tools+ust for riscv64 * Has the packagegroup just depend on lttng-tools which will pull in ust/modules as needed (From OE-Core rev: 1824cf062df928de65c1bff5e86e26b7b4d9d784) Signed-off-by: Richard Purdie --- .../packagegroups/packagegroup-core-tools-profile.bb | 11 ----------- meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb | 2 +- meta/recipes-kernel/lttng/lttng-platforms.inc | 17 +++++++++++++++++ meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb | 8 +++++--- meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb | 2 ++ 5 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 meta/recipes-kernel/lttng/lttng-platforms.inc diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb index 608e406f83..17b1391a47 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb @@ -35,17 +35,8 @@ SYSTEMTAP_libc-musl = "" SYSTEMTAP_nios2 = "" SYSTEMTAP_riscv64 = "" -# lttng-ust uses sched_getcpu() which is not there on for some platforms. -LTTNGUST = "lttng-ust" -LTTNGUST_arc = "" - LTTNGTOOLS = "lttng-tools" LTTNGTOOLS_arc = "" -LTTNGTOOLS_riscv64 = "" - -LTTNGMODULES = "lttng-modules" -LTTNGMODULES_arc = "" -LTTNGMODULES_riscv64 = "" BABELTRACE = "babeltrace" BABELTRACE2 = "babeltrace2" @@ -69,9 +60,7 @@ VALGRIND_linux-gnun32 = "" RDEPENDS_${PN} = "\ ${PROFILETOOLS} \ - ${LTTNGUST} \ ${LTTNGTOOLS} \ - ${LTTNGMODULES} \ ${BABELTRACE} \ ${BABELTRACE2} \ ${SYSTEMTAP} \ diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb b/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb index b9b3643001..c2fc65e019 100644 --- a/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb +++ b/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128" inherit module -COMPATIBLE_HOST_riscv64 = "null" +include lttng-platforms.inc SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ diff --git a/meta/recipes-kernel/lttng/lttng-platforms.inc b/meta/recipes-kernel/lttng/lttng-platforms.inc new file mode 100644 index 0000000000..aa8220bbb4 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-platforms.inc @@ -0,0 +1,17 @@ +# +# Whether the platform supports kernel tracing +# +LTTNGMODULES = "lttng-modules" +LTTNGMODULES_arc = "" +LTTNGMODULES_riscv64 = "" + +COMPATIBLE_HOST_riscv64_pn-lttng-modules = "null" +COMPATIBLE_HOST_arc_pn-lttng-modules = "null" + +# Whether the platform supports userspace tracing +# lttng-ust uses sched_getcpu() which is not there on for some platforms. +LTTNGUST = "lttng-ust" +LTTNGUST_arc = "" + +COMPATIBLE_HOST_arc_pn-lttng-ust = "null" + diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb b/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb index 0614e86713..f7e6ec2cba 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb @@ -9,9 +9,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \ file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \ file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95" +include lttng-platforms.inc + DEPENDS = "liburcu popt libxml2 util-linux" RDEPENDS_${PN} = "libgcc" -RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core" +RRECOMMENDS_${PN} += "${LTTNGMODULES}" +RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core" RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils" # babelstats.pl wants getopt-long @@ -21,12 +24,11 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ " -PACKAGECONFIG ??= "lttng-ust" +PACKAGECONFIG ??= "${LTTNGUST}" PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" -PACKAGECONFIG_remove_arc = "lttng-ust" SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://0001-tests-do-not-strip-a-helper-library.patch \ diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb index ad544d1b4a..67a4307c7b 100644 --- a/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb +++ b/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb @@ -15,6 +15,8 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ inherit autotools lib_package manpages python3native +include lttng-platforms.inc + EXTRA_OECONF = "--disable-numa" DEPENDS = "liburcu util-linux" -- cgit v1.2.3-54-g00ecf