diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-27 09:56:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-27 21:41:57 +0100 |
commit | bf7cbaff417b45c15a11034f2809193a563064b7 (patch) | |
tree | be60e34570430ec0265c45144ad140ae0474347a | |
parent | 194d0ecc9846c5aff6a3e4f87c5719275f4f8a00 (diff) | |
download | poky-bf7cbaff417b45c15a11034f2809193a563064b7.tar.gz |
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 <richard.purdie@linuxfoundation.org>
5 files changed, 25 insertions, 15 deletions
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 = "" | |||
35 | SYSTEMTAP_nios2 = "" | 35 | SYSTEMTAP_nios2 = "" |
36 | SYSTEMTAP_riscv64 = "" | 36 | SYSTEMTAP_riscv64 = "" |
37 | 37 | ||
38 | # lttng-ust uses sched_getcpu() which is not there on for some platforms. | ||
39 | LTTNGUST = "lttng-ust" | ||
40 | LTTNGUST_arc = "" | ||
41 | |||
42 | LTTNGTOOLS = "lttng-tools" | 38 | LTTNGTOOLS = "lttng-tools" |
43 | LTTNGTOOLS_arc = "" | 39 | LTTNGTOOLS_arc = "" |
44 | LTTNGTOOLS_riscv64 = "" | ||
45 | |||
46 | LTTNGMODULES = "lttng-modules" | ||
47 | LTTNGMODULES_arc = "" | ||
48 | LTTNGMODULES_riscv64 = "" | ||
49 | 40 | ||
50 | BABELTRACE = "babeltrace" | 41 | BABELTRACE = "babeltrace" |
51 | BABELTRACE2 = "babeltrace2" | 42 | BABELTRACE2 = "babeltrace2" |
@@ -69,9 +60,7 @@ VALGRIND_linux-gnun32 = "" | |||
69 | 60 | ||
70 | RDEPENDS_${PN} = "\ | 61 | RDEPENDS_${PN} = "\ |
71 | ${PROFILETOOLS} \ | 62 | ${PROFILETOOLS} \ |
72 | ${LTTNGUST} \ | ||
73 | ${LTTNGTOOLS} \ | 63 | ${LTTNGTOOLS} \ |
74 | ${LTTNGMODULES} \ | ||
75 | ${BABELTRACE} \ | 64 | ${BABELTRACE} \ |
76 | ${BABELTRACE2} \ | 65 | ${BABELTRACE2} \ |
77 | ${SYSTEMTAP} \ | 66 | ${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" | |||
6 | 6 | ||
7 | inherit module | 7 | inherit module |
8 | 8 | ||
9 | COMPATIBLE_HOST_riscv64 = "null" | 9 | include lttng-platforms.inc |
10 | 10 | ||
11 | SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ | 11 | SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ |
12 | file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ | 12 | 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 @@ | |||
1 | # | ||
2 | # Whether the platform supports kernel tracing | ||
3 | # | ||
4 | LTTNGMODULES = "lttng-modules" | ||
5 | LTTNGMODULES_arc = "" | ||
6 | LTTNGMODULES_riscv64 = "" | ||
7 | |||
8 | COMPATIBLE_HOST_riscv64_pn-lttng-modules = "null" | ||
9 | COMPATIBLE_HOST_arc_pn-lttng-modules = "null" | ||
10 | |||
11 | # Whether the platform supports userspace tracing | ||
12 | # lttng-ust uses sched_getcpu() which is not there on for some platforms. | ||
13 | LTTNGUST = "lttng-ust" | ||
14 | LTTNGUST_arc = "" | ||
15 | |||
16 | COMPATIBLE_HOST_arc_pn-lttng-ust = "null" | ||
17 | |||
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 \ | |||
9 | file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \ | 9 | file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \ |
10 | file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95" | 10 | file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95" |
11 | 11 | ||
12 | include lttng-platforms.inc | ||
13 | |||
12 | DEPENDS = "liburcu popt libxml2 util-linux" | 14 | DEPENDS = "liburcu popt libxml2 util-linux" |
13 | RDEPENDS_${PN} = "libgcc" | 15 | RDEPENDS_${PN} = "libgcc" |
14 | RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core" | 16 | RRECOMMENDS_${PN} += "${LTTNGMODULES}" |
17 | RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core" | ||
15 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | 18 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" |
16 | RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils" | 19 | RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils" |
17 | # babelstats.pl wants getopt-long | 20 | # babelstats.pl wants getopt-long |
@@ -21,12 +24,11 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \ | |||
21 | am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ | 24 | am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \ |
22 | PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | 25 | PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
23 | " | 26 | " |
24 | PACKAGECONFIG ??= "lttng-ust" | 27 | PACKAGECONFIG ??= "${LTTNGUST}" |
25 | PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" | 28 | PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" |
26 | PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" | 29 | PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" |
27 | PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" | 30 | PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" |
28 | PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" | 31 | PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" |
29 | PACKAGECONFIG_remove_arc = "lttng-ust" | ||
30 | 32 | ||
31 | SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | 33 | SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ |
32 | file://0001-tests-do-not-strip-a-helper-library.patch \ | 34 | 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}' \ | |||
15 | 15 | ||
16 | inherit autotools lib_package manpages python3native | 16 | inherit autotools lib_package manpages python3native |
17 | 17 | ||
18 | include lttng-platforms.inc | ||
19 | |||
18 | EXTRA_OECONF = "--disable-numa" | 20 | EXTRA_OECONF = "--disable-numa" |
19 | 21 | ||
20 | DEPENDS = "liburcu util-linux" | 22 | DEPENDS = "liburcu util-linux" |