summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-kernel/lttng')
-rw-r--r--poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb19
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch43
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch49
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules_2.10.5.bb35
-rwxr-xr-xpoky/meta/recipes-kernel/lttng/lttng-tools/run-ptest6
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch16
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb123
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch17
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-ust_2.10.1.bb37
9 files changed, 345 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
new file mode 100644
index 000000000..a29402adb
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.4.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
+"
+
+EXTRA_OECONF = "--disable-debug-info"
+
+SRC_URI[md5sum] = "3e8cdafec3ac0346a389870e87bf1344"
+SRC_URI[sha256sum] = "9643039923a0abc75a25b3d594cee0017423b57f10d2b625e96ed1e8d4891fc1"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
new file mode 100644
index 000000000..76063607a
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
@@ -0,0 +1,43 @@
+From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
+From: Nathan Lynch <nathan_lynch@mentor.com>
+Date: Tue, 25 Apr 2017 16:26:57 -0500
+Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
+
+Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
+into a similar problem as Linux experienced with ilog2.
+
+See:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
+
+Upstream-Status: Pending
+Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
+---
+ lib/align.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/align.h b/lib/align.h
+index 5b91ae87410b..5e134cd485fe 100644
+--- a/lib/align.h
++++ b/lib/align.h
+@@ -48,7 +48,7 @@
+ */
+ #define offset_align(align_drift, alignment) \
+ ({ \
+- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
++ BUG_ON((alignment) == 0 \
+ || ((alignment) & ((alignment) - 1))); \
+ (((alignment) - (align_drift)) & ((alignment) - 1)); \
+ })
+@@ -63,7 +63,7 @@
+ */
+ #define offset_align_floor(align_drift, alignment) \
+ ({ \
+- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
++ BUG_ON((alignment) == 0 \
+ || ((alignment) & ((alignment) - 1))); \
+ (((align_drift) - (alignment)) & ((alignment) - 1)); \
+ })
+--
+2.9.3
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
new file mode 100644
index 000000000..e41124227
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
@@ -0,0 +1,49 @@
+From 1b0e574d680101105a6c1e8931c78824f5a97a42 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 5 Sep 2016 17:08:56 +0000
+Subject: [PATCH] Makefile: Do not fail if CONFIG_TRACEPOINTS is not enabled
+Organization: O.S. Systems Software LTDA.
+
+The lttng-modules are being pulled by the tools-profile image feature,
+however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
+
+This change makes the build do not fail when CONFIG_TRACEPOINTS is not
+available, allowing it to be kept being pulled by default.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8602649..75550cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,10 +8,7 @@ ifneq ($(KERNELRELEASE),)
+ # and defines the modules to be built.
+
+ ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
+- ifeq ($(CONFIG_TRACEPOINTS),)
+- $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
+- endif # CONFIG_TRACEPOINTS
+- endif # ifdef CONFIG_LOCALVERSION
++ ifneq ($(CONFIG_TRACEPOINTS),)
+
+ TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
+
+@@ -94,6 +91,10 @@ ifneq ($(KERNELRELEASE),)
+ obj-$(CONFIG_LTTNG) += lib/
+ obj-$(CONFIG_LTTNG) += tests/
+
++ else
++ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
++ endif # CONFIG_TRACEPOINTS
++ endif # ifdef CONFIG_LOCALVERSION
+ else # KERNELRELEASE
+
+ # This part of the Makefile is used when the 'make' command is runned in the
+--
+2.1.4
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.5.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.5.bb
new file mode 100644
index 000000000..370b78aae
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.5.bb
@@ -0,0 +1,35 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
+DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c4613d1f8a9587bd7b366191830364b3 \
+ file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
+ file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \
+ "
+
+inherit module
+
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
+
+SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+ file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+"
+
+SRC_URI[md5sum] = "4aaabaafd15d9455c83972e26ccfbca7"
+SRC_URI[sha256sum] = "b8dbbbee45a673c381f51b99c555e36655c3c2c7a5477aab927591cc7f003a1f"
+
+export INSTALL_MOD_DIR="kernel/lttng-modules"
+
+EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
+
+do_install_append() {
+ # Delete empty directories to avoid QA failures if no modules were built
+ find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+ if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
+ bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
+}
+
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest
new file mode 100755
index 000000000..705030ee5
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Without --ignore-exit, the tap harness causes any FAILs within a
+# test plan to raise ERRORs; this is just noise.
+makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
+make -k -t all >/dev/null 2>&1
+exec make -s $makeargs check 2>/dev/null
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch
new file mode 100644
index 000000000..b1bb8e493
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools/x32.patch
@@ -0,0 +1,16 @@
+Fix build for x32
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+--- lttng-tools-2.6.0/src/bin/lttng/utils.c~ 2015-01-26 18:17:15.000000000 +0100
++++ lttng-tools-2.6.0/src/bin/lttng/utils.c 2015-07-30 19:45:25.632045712 +0200
+@@ -130,7 +130,7 @@
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
new file mode 100644
index 000000000..93626dd4b
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
@@ -0,0 +1,123 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit Control"
+DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
+to extract program execution details from the Linux operating system \
+and interpret them."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
+ file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
+
+DEPENDS = "liburcu popt libxml2 util-linux"
+RDEPENDS_${PN} = "libgcc"
+RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps"
+# babelstats.pl wants getopt-long
+RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
+
+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[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
+PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
+PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
+PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+PACKAGECONFIG_remove_libc-musl = "lttng-ust"
+PACKAGECONFIG_remove_riscv64 = "lttng-ust"
+
+SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
+ file://x32.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "051224eb991aee07f8721ff1877d0b96"
+SRC_URI[sha256sum] = "77839eb6fc6c652125f08acfd9369701c2516eb05cc2084160e7efc7a3fb731c"
+
+inherit autotools ptest pkgconfig useradd python3-dir manpages
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "tracing"
+
+FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
+ ${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+
+# Since files are installed into ${libdir}/lttng/libexec we match
+# the libexec insane test so skip it.
+# Python module needs to keep _lttng.so
+INSANE_SKIP_${PN} = "libexec dev-so"
+INSANE_SKIP_${PN}-dbg = "libexec"
+
+do_install_ptest () {
+ for f in Makefile tests/Makefile tests/utils/utils.sh ; do
+ install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
+ done
+
+ for f in config/tap-driver.sh config/test-driver ; do
+ install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
+ done
+
+ # Prevent 'make check' from recursing into non-test subdirectories.
+ sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
+
+ # We don't need these
+ sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
+
+ # We shouldn't need to build anything in tests/utils
+ sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
+ "${D}${PTEST_PATH}/tests/Makefile"
+
+ # Copy the tests directory tree and the executables and
+ # Makefiles found within.
+ for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
+ install -d "${D}${PTEST_PATH}/tests/$d"
+ find "${B}/tests/$d" -maxdepth 1 -executable -type f \
+ -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
+ test -r "${B}/tests/$d/Makefile" && \
+ install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
+ done
+
+ # We shouldn't need to build anything in tests/regression/tools
+ sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
+ "${D}${PTEST_PATH}/tests/regression/Makefile"
+
+ # Prevent attempts to update Makefiles during test runs, and
+ # silence "Making check in $SUBDIR" messages.
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e '/echo "Making $$target in $$subdir"; \\/d' \
+ -e 's/^srcdir = \(.*\)/srcdir = ./' \
+ -e 's/^builddir = \(.*\)/builddir = ./' \
+ -e 's/^all-am:.*/all-am:/' \
+ {} +
+
+ # These objects trigger [rpaths] QA checks; the test harness
+ # skips the associated tests if they're missing, so delete
+ # them.
+ objs=""
+ objs="$objs regression/ust/ust-dl/libbar.so"
+ objs="$objs regression/ust/ust-dl/libfoo.so"
+ for obj in $objs ; do
+ rm -f "${D}${PTEST_PATH}/tests/${obj}"
+ done
+
+ find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+ touch -r "${B}/Makefile" {} +
+
+ # Substitute links to installed binaries.
+ for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do
+ exedir="${D}${PTEST_PATH}/src/bin/${prog}"
+ install -d "$exedir"
+ case "$prog" in
+ lttng-consumerd)
+ ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
+ ;;
+ *)
+ ln -s "${bindir}/$prog" "$exedir"
+ ;;
+ esac
+ done
+}
diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
new file mode 100644
index 000000000..bff852799
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Don't build the doc examples - we don't need them and in fact they
+never successfully built in previous iterations of the lttng-ust
+recipe anyway.
+
+Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
+
+Index: lttng-ust-2.9.1/doc/Makefile.am
+===================================================================
+--- lttng-ust-2.9.1.orig/doc/Makefile.am
++++ lttng-ust-2.9.1/doc/Makefile.am
+@@ -1,3 +1,3 @@
+-SUBDIRS = . man examples
++SUBDIRS = . man
+
+ dist_doc_DATA = java-agent.txt
diff --git a/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.1.bb b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.1.bb
new file mode 100644
index 000000000..d79a47931
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-ust_2.10.1.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
+DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
+HOMEPAGE = "http://lttng.org/ust"
+BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
+
+LICENSE = "LGPLv2.1+ & MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
+ file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
+ file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
+
+inherit autotools lib_package manpages
+
+DEPENDS = "liburcu util-linux"
+RDEPENDS_${PN}-bin = "python3-core"
+
+# For backwards compatibility after rename
+RPROVIDES_${PN} = "lttng2-ust"
+RREPLACES_${PN} = "lttng2-ust"
+RCONFLICTS_${PN} = "lttng2-ust"
+
+PE = "2"
+
+SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
+ file://lttng-ust-doc-examples-disable.patch \
+ "
+SRC_URI[md5sum] = "4863cc2f9f0a070b42438bb646bbba06"
+SRC_URI[sha256sum] = "07cc3c0b71e7b77f1913d5b7f340a78a9af414440e4662712aef2d635b88ee9d"
+
+CVE_PRODUCT = "ust"
+
+PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
+
+do_install_append() {
+ # Patch python tools to use Python 3; they should be source compatible, but
+ # still refer to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
+}
OpenPOWER on IntegriCloud