Initial commit
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# use target=recheck if you want to recheck failing tests
|
||||
[ "$target" = "" ] && target=check
|
||||
|
||||
# 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"
|
||||
|
||||
exec make -C tests -k -s $makeargs $target 2>/dev/null
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 56986190e4b0c10945ce6aaa7ca10d6bd8a26a39 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Puhlman <jpuhlman@mvista.com>
|
||||
Date: Mon, 9 Mar 2020 21:10:35 +0000
|
||||
Subject: [PATCH] Make manpages multilib identical
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
|
||||
---
|
||||
doc/man/asciidoc-attrs.conf.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/man/asciidoc-attrs.conf.in b/doc/man/asciidoc-attrs.conf.in
|
||||
index ad1183f1..e11c7031 100644
|
||||
--- a/doc/man/asciidoc-attrs.conf.in
|
||||
+++ b/doc/man/asciidoc-attrs.conf.in
|
||||
@@ -1,7 +1,7 @@
|
||||
[attributes]
|
||||
# default values
|
||||
-system_plugin_path="@LIBDIR@/babeltrace2/plugins"
|
||||
-system_plugin_provider_path="@LIBDIR@/babeltrace2/plugin-providers"
|
||||
+system_plugin_path="@prefix@/lib*/babeltrace2/plugins"
|
||||
+system_plugin_provider_path="@prefix@/lib*/babeltrace2/plugin-providers"
|
||||
babeltrace_version="@PACKAGE_VERSION@"
|
||||
enable_debug_info="@ENABLE_DEBUG_INFO_VAL@"
|
||||
defrdport=5344
|
||||
--
|
||||
2.24.1
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 582713cc9a013481eeef253195d644020f637ec4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <582713cc9a013481eeef253195d644020f637ec4.1583403622.git.wallinux@gmail.com>
|
||||
From: Anders Wallin <wallinux@gmail.com>
|
||||
Date: Thu, 5 Mar 2020 11:20:04 +0100
|
||||
Subject: [PATCH] tests: do not run test applications from .libs
|
||||
|
||||
Cross compile specific change
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
|
||||
Signed-off-by: Anders Wallin <wallinux@gmail.com>
|
||||
---
|
||||
tests/lib/test_plugin | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin
|
||||
index 652c90cc..1f817c50 100755
|
||||
--- a/tests/lib/test_plugin
|
||||
+++ b/tests/lib/test_plugin
|
||||
@@ -26,4 +26,4 @@ fi
|
||||
# shellcheck source=../utils/utils.sh
|
||||
source "$UTILSSH"
|
||||
|
||||
-"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs"
|
||||
+"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# use target=recheck if you want to recheck failing tests
|
||||
[ "$target" = "" ] && target=check
|
||||
|
||||
# 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 abs_top_srcdir=$PWD abs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3"
|
||||
|
||||
exec 2> error.log
|
||||
make -C tests -k -s $makeargs $target
|
||||
exitcode=$?
|
||||
if [ -e error.log ]; then
|
||||
cat error.log
|
||||
fi
|
||||
if [ -e tests/test-suite.log ]; then
|
||||
cat tests/test-suite.log
|
||||
fi
|
||||
|
||||
exit $exitcode
|
||||
@@ -0,0 +1,95 @@
|
||||
SUMMARY = "Babeltrace2 - 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://babeltrace.org/"
|
||||
BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
|
||||
LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only & BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e"
|
||||
|
||||
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
|
||||
|
||||
SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0;protocol=https \
|
||||
file://run-ptest \
|
||||
file://0001-tests-do-not-run-test-applications-from-.libs.patch \
|
||||
file://0001-Make-manpages-multilib-identical.patch \
|
||||
"
|
||||
SRCREV = "66e76d1ea601705928899138f02730a3a2a3153d"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig ptest python3targetconfig
|
||||
|
||||
EXTRA_OECONF = "--disable-debug-info --disable-Werror"
|
||||
|
||||
PACKAGECONFIG ??= "manpages"
|
||||
PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native"
|
||||
|
||||
FILES:${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a"
|
||||
FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so"
|
||||
|
||||
ASNEEDED = ""
|
||||
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd ', '', d)}"
|
||||
|
||||
# coreutils since we need full mktemp
|
||||
RDEPENDS:${PN}-ptest += "bash gawk python3 make grep coreutils findutils"
|
||||
|
||||
do_compile_ptest () {
|
||||
make -C tests all
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
install -d "${D}${PTEST_PATH}/tests"
|
||||
|
||||
# Copy required files from source directory
|
||||
for d in $(find "${S}/tests" -type d -printf '%P ') ; do
|
||||
install -d "${D}${PTEST_PATH}/tests/$d"
|
||||
find "${S}/tests/$d" -maxdepth 1 -executable -type f \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
|
||||
find "${S}/tests/$d" -maxdepth 1 -name *.sh \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
|
||||
find "${S}/tests/$d" -maxdepth 1 -name *.py \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
|
||||
find "${S}/tests/$d" -maxdepth 1 -name *.expect \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
|
||||
done
|
||||
install -d "${D}${PTEST_PATH}/tests/data/ctf-traces/"
|
||||
cp -a ${S}/tests/data/ctf-traces/* ${D}${PTEST_PATH}/tests/data/ctf-traces/
|
||||
|
||||
# Copy the tests directory tree and the executables and
|
||||
# Makefiles found within.
|
||||
install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/"
|
||||
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"
|
||||
find "${B}/tests/$d" -maxdepth 1 -name *.sh \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
|
||||
done
|
||||
|
||||
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
|
||||
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
|
||||
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
|
||||
done
|
||||
done
|
||||
|
||||
# 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:/' \
|
||||
{} +
|
||||
|
||||
# Substitute links to installed binaries.
|
||||
install -d "${D}${PTEST_PATH}/src/cli/"
|
||||
ln -s "${bindir}/babeltrace2" ${D}${PTEST_PATH}/src/cli/
|
||||
|
||||
# Remove architechture specific testfiles
|
||||
rm -rf ${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/*
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
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://babeltrace.org/"
|
||||
BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
|
||||
LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
|
||||
|
||||
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
|
||||
|
||||
SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5;protocol=https \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRCREV = "91c00f70884887ff5c4849a8e3d47e311a22ba9d"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>1(\.\d+)+)$"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig ptest
|
||||
|
||||
EXTRA_OECONF = "--disable-debug-info"
|
||||
|
||||
ASNEEDED = ""
|
||||
|
||||
RDEPENDS:${PN}-ptest += "bash gawk make"
|
||||
|
||||
addtask do_patch_ptest_path after do_patch before do_configure
|
||||
do_patch_ptest_path () {
|
||||
for f in $(grep -l -r abs_top_srcdir ${S}/tests); do
|
||||
sed -i 's:\@abs_top_srcdir\@:${PTEST_PATH}:' ${f}
|
||||
done
|
||||
|
||||
for f in $(grep -l -r abs_top_builddir ${S}/tests); do
|
||||
sed -i 's:\@abs_top_builddir\@:${PTEST_PATH}:' ${f}
|
||||
done
|
||||
for f in $(grep -l -r GREP ${S}/tests); do
|
||||
sed -i 's:\@GREP\@:grep:' ${f}
|
||||
done
|
||||
|
||||
for f in $(grep -l -r SED ${S}/tests); do
|
||||
sed -i 's:\@SED\@:sed:' ${f}
|
||||
done
|
||||
}
|
||||
|
||||
do_compile_ptest () {
|
||||
make -C tests all
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
# Copy required files from source directory
|
||||
for f in config/tap-driver.sh config/test-driver; do
|
||||
install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
|
||||
done
|
||||
install -d "$f" "${D}${PTEST_PATH}/tests/ctf-traces/"
|
||||
cp -a ${S}/tests/ctf-traces/* ${D}${PTEST_PATH}/tests/ctf-traces/
|
||||
|
||||
# Copy the tests directory tree and the executables and
|
||||
# Makefiles found within.
|
||||
install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/"
|
||||
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"
|
||||
find "${B}/tests/$d" -maxdepth 1 -name *.sh \
|
||||
-exec install -t "${D}${PTEST_PATH}/tests/$d" {} \;
|
||||
done
|
||||
|
||||
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
|
||||
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
|
||||
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
|
||||
done
|
||||
done
|
||||
|
||||
install -D ${B}/formats/ctf/metadata/.libs/ctf-parser-test \
|
||||
${D}${PTEST_PATH}/formats/ctf/metadata/ctf-parser-test
|
||||
|
||||
# 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 '/$(check_SCRIPTS)/s/^/#/' \
|
||||
-e '/%: %.in/,/^$/d' \
|
||||
-e '/echo "Making $$target in $$subdir"; \\/d' \
|
||||
-e 's/^srcdir = \(.*\)/srcdir = ./' \
|
||||
-e 's/^builddir = \(.*\)/builddir = ./' \
|
||||
-e 's/^all-am:.*/all-am:/' \
|
||||
{} +
|
||||
|
||||
# Remove path to babeltrace.
|
||||
for f in $(grep -l -r "^BABELTRACE_BIN" ${D}${PTEST_PATH}); do
|
||||
sed -i 's:^BABELTRACE_BIN.*:BABELTRACE_BIN=/usr/bin/babeltrace:' ${f}
|
||||
done
|
||||
for f in $(grep -l -r "^BTBIN" ${D}${PTEST_PATH}); do
|
||||
sed -i 's:^BTBIN.*:BTBIN=/usr/bin/babeltrace:' ${f}
|
||||
done
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
From 939200ef160c95c8a9d71fd80c99f42a1de0a9f0 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 7 Mar 2023 11:41:14 -0500
|
||||
Subject: [PATCH 1/4] fix: mm: introduce vma->vm_flags wrapper functions (v6.3)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit bc292ab00f6c7a661a8a605c714e8a148f629ef6
|
||||
Author: Suren Baghdasaryan <surenb@google.com>
|
||||
Date: Thu Jan 26 11:37:47 2023 -0800
|
||||
|
||||
mm: introduce vma->vm_flags wrapper functions
|
||||
|
||||
vm_flags are among VMA attributes which affect decisions like VMA merging
|
||||
and splitting. Therefore all vm_flags modifications are performed after
|
||||
taking exclusive mmap_lock to prevent vm_flags updates racing with such
|
||||
operations. Introduce modifier functions for vm_flags to be used whenever
|
||||
flags are updated. This way we can better check and control correct
|
||||
locking behavior during these updates.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I2cf662420d9d7748e5e310d3ea4bac98ba7d7f94
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/wrapper/mm.h | 16 ++++++++++++++++
|
||||
src/lib/ringbuffer/ring_buffer_mmap.c | 4 +++-
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/wrapper/mm.h b/include/wrapper/mm.h
|
||||
index d3bdda66..61ac8127 100644
|
||||
--- a/include/wrapper/mm.h
|
||||
+++ b/include/wrapper/mm.h
|
||||
@@ -13,6 +13,22 @@
|
||||
|
||||
#include <lttng/kernel-version.h>
|
||||
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
|
||||
+static inline
|
||||
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
|
||||
+ vm_flags_t flags)
|
||||
+{
|
||||
+ vm_flags_set(vma, flags);
|
||||
+}
|
||||
+#else
|
||||
+static inline
|
||||
+void wrapper_vm_flags_set(struct vm_area_struct *vma,
|
||||
+ vm_flags_t flags)
|
||||
+{
|
||||
+ vma->vm_flags |= flags;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0) \
|
||||
|| LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
|
||||
|
||||
diff --git a/src/lib/ringbuffer/ring_buffer_mmap.c b/src/lib/ringbuffer/ring_buffer_mmap.c
|
||||
index 25e2d8d5..d24b76a3 100644
|
||||
--- a/src/lib/ringbuffer/ring_buffer_mmap.c
|
||||
+++ b/src/lib/ringbuffer/ring_buffer_mmap.c
|
||||
@@ -17,6 +17,8 @@
|
||||
#include <ringbuffer/frontend.h>
|
||||
#include <ringbuffer/vfs.h>
|
||||
|
||||
+#include <wrapper/mm.h>
|
||||
+
|
||||
/*
|
||||
* fault() vm_op implementation for ring buffer file mapping.
|
||||
*/
|
||||
@@ -113,7 +115,7 @@ static int lib_ring_buffer_mmap_buf(struct lttng_kernel_ring_buffer *buf,
|
||||
return -EINVAL;
|
||||
|
||||
vma->vm_ops = &lib_ring_buffer_mmap_ops;
|
||||
- vma->vm_flags |= VM_DONTEXPAND;
|
||||
+ wrapper_vm_flags_set(vma, VM_DONTEXPAND);
|
||||
vma->vm_private_data = buf;
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
From 878f89b6136ff7b870a19e04901cc6f316bbe10a Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
Date: Sat, 15 May 2021 10:26:38 -0400
|
||||
Subject: [PATCH] src/Kbuild: change missing CONFIG_TRACEPOINTS to warning
|
||||
|
||||
Taken from a previous patch to the main lttng-modules Makefile, by
|
||||
Otavio Salvador:
|
||||
|
||||
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: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||
---
|
||||
src/Kbuild | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Kbuild b/src/Kbuild
|
||||
index 7137874..04eb5c9 100644
|
||||
--- a/src/Kbuild
|
||||
+++ b/src/Kbuild
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
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)
|
||||
+ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
|
||||
+ DISABLE_MODULE = y
|
||||
endif # CONFIG_TRACEPOINTS
|
||||
endif # ifdef CONFIG_LOCALVERSION
|
||||
|
||||
+ifneq ($(DISABLE_MODULE),y)
|
||||
+
|
||||
TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
|
||||
|
||||
lttng_check_linux_version = $(shell pwd)/include/linux/version.h
|
||||
@@ -150,3 +153,5 @@ lttng-statedump-objs := lttng-statedump-impl.o
|
||||
obj-$(CONFIG_LTTNG) += probes/
|
||||
obj-$(CONFIG_LTTNG) += lib/
|
||||
obj-$(CONFIG_LTTNG) += tests/
|
||||
+
|
||||
+endif # DISABLE_MODULE
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
From b3756eaa49a3de2f388bc269b2928a0233358fea Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 7 Mar 2023 12:05:00 -0500
|
||||
Subject: [PATCH 2/4] fix: uuid: Decouple guid_t and uuid_le types and
|
||||
respective macros (v6.3)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit 5e6a51787fef20b849682d8c49ec9c2beed5c373
|
||||
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Date: Tue Jan 24 15:38:38 2023 +0200
|
||||
|
||||
uuid: Decouple guid_t and uuid_le types and respective macros
|
||||
|
||||
The guid_t type and respective macros are being used internally only.
|
||||
The uuid_le has its user outside the kernel. Decouple these types and
|
||||
macros, and make guid_t completely internal type to the kernel.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I8644fd139b0630e9cf18886b84e33bffab1e5abd
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/lttng/events-internal.h | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h
|
||||
index e31e6abb..a91a659e 100644
|
||||
--- a/include/lttng/events-internal.h
|
||||
+++ b/include/lttng/events-internal.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#define _LTTNG_EVENTS_INTERNAL_H
|
||||
|
||||
#include <wrapper/compiler_attributes.h>
|
||||
+#include <wrapper/uuid.h>
|
||||
|
||||
#include <lttng/events.h>
|
||||
|
||||
@@ -289,7 +290,7 @@ struct lttng_metadata_cache {
|
||||
atomic_t producing; /* Metadata being produced (incomplete) */
|
||||
struct kref refcount; /* Metadata cache usage */
|
||||
struct list_head metadata_stream; /* Metadata stream list */
|
||||
- uuid_le uuid; /* Trace session unique ID (copy) */
|
||||
+ guid_t uuid; /* Trace session unique ID (copy) */
|
||||
struct mutex lock; /* Produce/consume lock */
|
||||
uint64_t version; /* Current version of the metadata */
|
||||
};
|
||||
@@ -463,7 +464,7 @@ struct lttng_kernel_session_private {
|
||||
struct list_head events; /* Event list head */
|
||||
struct list_head list; /* Session list */
|
||||
unsigned int free_chan_id; /* Next chan ID to allocate */
|
||||
- uuid_le uuid; /* Trace session unique ID */
|
||||
+ guid_t uuid; /* Trace session unique ID */
|
||||
struct lttng_metadata_cache *metadata_cache;
|
||||
unsigned int metadata_dumped:1,
|
||||
tstate:1; /* Transient enable state */
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
From d0eeda3f84ba1643831561a2488ca2e99e9472b1 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 7 Mar 2023 11:26:25 -0500
|
||||
Subject: [PATCH 3/4] fix: btrfs: pass find_free_extent_ctl to allocator
|
||||
tracepoints (v6.3)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit cfc2de0fce015d4249c674ef9f5e0b4817ba5c53
|
||||
Author: Boris Burkov <boris@bur.io>
|
||||
Date: Thu Dec 15 16:06:31 2022 -0800
|
||||
|
||||
btrfs: pass find_free_extent_ctl to allocator tracepoints
|
||||
|
||||
The allocator tracepoints currently have a pile of values from ffe_ctl.
|
||||
In modifying the allocator and adding more tracepoints, I found myself
|
||||
adding to the already long argument list of the tracepoints. It makes it
|
||||
a lot simpler to just send in the ffe_ctl itself.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: Iab4132a9d3df3a6369591a50fb75374b1e399fa4
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/instrumentation/events/btrfs.h | 60 +++++++++++++++++++++++++-
|
||||
1 file changed, 58 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/instrumentation/events/btrfs.h b/include/instrumentation/events/btrfs.h
|
||||
index 01157107..7c7b9b0c 100644
|
||||
--- a/include/instrumentation/events/btrfs.h
|
||||
+++ b/include/instrumentation/events/btrfs.h
|
||||
@@ -13,6 +13,10 @@
|
||||
#include <../fs/btrfs/accessors.h>
|
||||
#endif
|
||||
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
|
||||
+#include <../fs/btrfs/extent-tree.h>
|
||||
+#endif
|
||||
+
|
||||
#ifndef _TRACE_BTRFS_DEF_
|
||||
#define _TRACE_BTRFS_DEF_
|
||||
struct btrfs_root;
|
||||
@@ -1963,7 +1967,26 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
|
||||
|
||||
#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
|
||||
|
||||
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
+
|
||||
+ btrfs_find_free_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_root *root,
|
||||
+ const struct find_free_extent_ctl *ffe_ctl),
|
||||
+
|
||||
+ TP_ARGS(root, ffe_ctl),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, root_objectid, root->root_key.objectid)
|
||||
+ ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
|
||||
+ ctf_integer(u64, empty_size, ffe_ctl->empty_size)
|
||||
+ ctf_integer(u64, flags, ffe_ctl->flags)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
|
||||
LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
|
||||
LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
|
||||
LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
|
||||
@@ -2102,7 +2125,40 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
|
||||
)
|
||||
#endif
|
||||
|
||||
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_block_group *block_group,
|
||||
+ const struct find_free_extent_ctl *ffe_ctl),
|
||||
+
|
||||
+ TP_ARGS(block_group, ffe_ctl),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
|
||||
+ ctf_integer(u64, bg_objectid, block_group->start)
|
||||
+ ctf_integer(u64, flags, block_group->flags)
|
||||
+ ctf_integer(u64, start, ffe_ctl->search_start)
|
||||
+ ctf_integer(u64, len, ffe_ctl->num_bytes)
|
||||
+ )
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_block_group *block_group,
|
||||
+ const struct find_free_extent_ctl *ffe_ctl),
|
||||
+
|
||||
+ TP_ARGS(block_group, ffe_ctl)
|
||||
+)
|
||||
+
|
||||
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
|
||||
+
|
||||
+ TP_PROTO(const struct btrfs_block_group *block_group,
|
||||
+ const struct find_free_extent_ctl *ffe_ctl),
|
||||
+
|
||||
+ TP_ARGS(block_group, ffe_ctl)
|
||||
+)
|
||||
+
|
||||
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
|
||||
LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
|
||||
|
||||
TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
From 12f43cab7daceff0c73c78276b5a5b9cc1d5056f Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 7 Mar 2023 11:10:26 -0500
|
||||
Subject: [PATCH 4/4] fix: net: add location to trace_consume_skb() (v6.3)
|
||||
|
||||
See upstream commit :
|
||||
|
||||
commit dd1b527831a3ed659afa01b672d8e1f7e6ca95a5
|
||||
Author: Eric Dumazet <edumazet@google.com>
|
||||
Date: Thu Feb 16 15:47:18 2023 +0000
|
||||
|
||||
net: add location to trace_consume_skb()
|
||||
|
||||
kfree_skb() includes the location, it makes sense
|
||||
to add it to consume_skb() as well.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I8d871187d90e7fe113a63e209b00aebe0df475f3
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/instrumentation/events/skb.h | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/include/instrumentation/events/skb.h b/include/instrumentation/events/skb.h
|
||||
index 186732ea..3c43f32d 100644
|
||||
--- a/include/instrumentation/events/skb.h
|
||||
+++ b/include/instrumentation/events/skb.h
|
||||
@@ -61,6 +61,21 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
|
||||
)
|
||||
#endif
|
||||
|
||||
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
|
||||
+LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
|
||||
+
|
||||
+ skb_consume,
|
||||
+
|
||||
+ TP_PROTO(struct sk_buff *skb, void *location),
|
||||
+
|
||||
+ TP_ARGS(skb, location),
|
||||
+
|
||||
+ TP_FIELDS(
|
||||
+ ctf_integer_hex(void *, skbaddr, skb)
|
||||
+ ctf_integer_hex(void *, location, location)
|
||||
+ )
|
||||
+)
|
||||
+#else
|
||||
LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
|
||||
|
||||
skb_consume,
|
||||
@@ -73,6 +88,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
|
||||
ctf_integer_hex(void *, skbaddr, skb)
|
||||
)
|
||||
)
|
||||
+#endif
|
||||
|
||||
LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
From 82fbf9d383ff9069808fb0f5f75c660098dbae52 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Jeanson <mjeanson@efficios.com>
|
||||
Date: Tue, 5 Apr 2022 14:57:41 -0400
|
||||
Subject: [PATCH 09/10] Rename genhd wrapper to blkdev
|
||||
|
||||
The genhd.h header was folded into blkdev.h in v5.18, rename our wrapper
|
||||
to follow upstream.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Change-Id: I4ec94fb94d11712dd20f0680aea1de77fbfa9d17
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/wrapper/{genhd.h => blkdev.h} | 10 +++++-----
|
||||
src/lttng-statedump-impl.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
rename include/wrapper/{genhd.h => blkdev.h} (93%)
|
||||
|
||||
diff --git a/include/wrapper/genhd.h b/include/wrapper/blkdev.h
|
||||
similarity index 93%
|
||||
rename from include/wrapper/genhd.h
|
||||
rename to include/wrapper/blkdev.h
|
||||
index 4a59b68e..0d5ad90f 100644
|
||||
--- a/include/wrapper/genhd.h
|
||||
+++ b/include/wrapper/blkdev.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
|
||||
*
|
||||
- * wrapper/genhd.h
|
||||
+ * wrapper/blkdev.h
|
||||
*
|
||||
* wrapper around block layer functions and data structures. Using
|
||||
* KALLSYMS to get its address when available, else we need to have a
|
||||
@@ -9,8 +9,8 @@
|
||||
* Copyright (C) 2011-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
*/
|
||||
|
||||
-#ifndef _LTTNG_WRAPPER_GENHD_H
|
||||
-#define _LTTNG_WRAPPER_GENHD_H
|
||||
+#ifndef _LTTNG_WRAPPER_BLKDEV_H
|
||||
+#define _LTTNG_WRAPPER_BLKDEV_H
|
||||
|
||||
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
|
||||
#include <linux/blkdev.h>
|
||||
@@ -45,7 +45,7 @@ struct class *wrapper_get_block_class(void)
|
||||
/*
|
||||
* Canary function to check for 'block_class' at compile time.
|
||||
*
|
||||
- * From 'include/linux/genhd.h':
|
||||
+ * From 'include/linux/blkdev.h':
|
||||
*
|
||||
* extern struct class block_class;
|
||||
*/
|
||||
@@ -104,4 +104,4 @@ struct device_type *wrapper_get_disk_type(void)
|
||||
|
||||
#endif
|
||||
|
||||
-#endif /* _LTTNG_WRAPPER_GENHD_H */
|
||||
+#endif /* _LTTNG_WRAPPER_BLKDEV_H */
|
||||
diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
|
||||
index 4d7b2921..0e753090 100644
|
||||
--- a/src/lttng-statedump-impl.c
|
||||
+++ b/src/lttng-statedump-impl.c
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <wrapper/namespace.h>
|
||||
#include <wrapper/irq.h>
|
||||
#include <wrapper/tracepoint.h>
|
||||
-#include <wrapper/genhd.h>
|
||||
+#include <wrapper/blkdev.h>
|
||||
#include <wrapper/file.h>
|
||||
#include <wrapper/fdtable.h>
|
||||
#include <wrapper/sched.h>
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
SECTION = "devel"
|
||||
SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
|
||||
DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
|
||||
HOMEPAGE = "https://lttng.org/"
|
||||
LICENSE = "LGPL-2.1-only & GPL-2.0-only & MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
|
||||
|
||||
inherit module
|
||||
|
||||
include lttng-platforms.inc
|
||||
|
||||
SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
file://0009-Rename-genhd-wrapper-to-blkdev.patch \
|
||||
file://0001-fix-mm-introduce-vma-vm_flags-wrapper-functions-v6.3.patch \
|
||||
file://0002-fix-uuid-Decouple-guid_t-and-uuid_le-types-and-respe.patch \
|
||||
file://0003-fix-btrfs-pass-find_free_extent_ctl-to-allocator-tra.patch \
|
||||
file://0004-fix-net-add-location-to-trace_consume_skb-v6.3.patch \
|
||||
"
|
||||
|
||||
# Use :append here so that the patch is applied also when using devupstream
|
||||
SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "bf808b113544287cfe837a6382887fa66354ef5cc8216460cebbef3d27dc3581"
|
||||
|
||||
export INSTALL_MOD_DIR="kernel/lttng-modules"
|
||||
|
||||
EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
|
||||
|
||||
MODULES_MODULE_SYMVERS_LOCATION = "src"
|
||||
|
||||
do_install:append() {
|
||||
# Delete empty directories to avoid QA failures if no modules were built
|
||||
if [ -d ${D}/${nonarch_base_libdir} ]; then
|
||||
find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
|
||||
fi
|
||||
}
|
||||
|
||||
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'))
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13;protocol=https"
|
||||
SRCREV:class-devupstream = "7584cfc04914cb0842a986e9808686858b9c8630"
|
||||
SRCREV_FORMAT ?= "lttng_git"
|
||||
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# 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"
|
||||
|
||||
# Whether the platform supports lttng-tools
|
||||
# lttng-tools requires SYS_ppoll and SYS_pselect6 which are not supported on riscv32.
|
||||
# It's also turned off for riscv32 in meta-riscv. See https://github.com/riscv/meta-riscv/blob/master/conf/layer.conf
|
||||
COMPATIBLE_HOST:riscv32:pn-lttng-tools = "null"
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
From 74b3844737b03492756b4f896c938b504b069f14 Mon Sep 17 00:00:00 2001
|
||||
From: Jérémie Galarneau <jeremie.galarneau@efficios.com>
|
||||
Date: Tue, 17 Jan 2023 16:57:35 -0500
|
||||
Subject: [PATCH] compat: off64_t is not defined by musl
|
||||
|
||||
This helps compile with latest musl, where off64_t is not defined unless
|
||||
_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined
|
||||
if _GNU_SOURCE is defined, so the problem is only seen with musl.
|
||||
|
||||
Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc:
|
||||
"arrange for 64-bit file offsets, known as large-file support."
|
||||
|
||||
As such, it is safe to assume off_t is 64-bit wide. This is checked by a
|
||||
static_assert to catch any platform where autoconf would let a 32-bit
|
||||
off_t slip.
|
||||
|
||||
Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/9268]
|
||||
Reported-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
|
||||
Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
|
||||
---
|
||||
|
||||
--- a/src/common/compat/compat-fcntl.c
|
||||
+++ b/src/common/compat/compat-fcntl.c
|
||||
@@ -8,14 +8,17 @@
|
||||
#define _LGPL_SOURCE
|
||||
#include <common/compat/fcntl.h>
|
||||
#include <common/macros.h>
|
||||
+#include <common/bug.h>
|
||||
+#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
LTTNG_HIDDEN
|
||||
-int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
|
||||
+int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
|
||||
unsigned int flags)
|
||||
{
|
||||
+ LTTNG_BUILD_BUG_ON(sizeof(off_t) != sizeof(int64_t));
|
||||
#ifdef HAVE_SYNC_FILE_RANGE
|
||||
return sync_file_range(fd, offset, nbytes, flags);
|
||||
#else
|
||||
--- a/src/common/compat/fcntl.h
|
||||
+++ b/src/common/compat/fcntl.h
|
||||
@@ -13,16 +13,12 @@
|
||||
|
||||
#include <common/compat/errno.h>
|
||||
|
||||
-#if (defined(__CYGWIN__))
|
||||
-typedef long long off64_t;
|
||||
-#endif
|
||||
-
|
||||
#if (defined(__FreeBSD__) || defined(__sun__))
|
||||
typedef off64_t loff_t;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
|
||||
+extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
|
||||
unsigned int flags);
|
||||
#define lttng_sync_file_range(fd, offset, nbytes, flags) \
|
||||
compat_sync_file_range(fd, offset, nbytes, flags)
|
||||
@@ -37,8 +33,8 @@ extern int compat_sync_file_range(int fd
|
||||
#define SYNC_FILE_RANGE_WAIT_BEFORE 0
|
||||
#define SYNC_FILE_RANGE_WRITE 0
|
||||
|
||||
-static inline int lttng_sync_file_range(int fd, off64_t offset,
|
||||
- off64_t nbytes, unsigned int flags)
|
||||
+static inline int lttng_sync_file_range(int fd, off_t offset,
|
||||
+ off_t nbytes, unsigned int flags)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
From ab238c213fac190972f55e73cf3e0bb1c7846eb8 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 12 Dec 2019 16:52:07 +0100
|
||||
Subject: [PATCH] tests: do not strip a helper library
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
tests/utils/testapp/userspace-probe-elf-binary/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
|
||||
index 03f5d5a..d12c343 100644
|
||||
--- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
|
||||
+++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
|
||||
@@ -12,7 +12,7 @@ userspace_probe_elf_binary_LDADD = libfoo.la
|
||||
libfoo.strip: libfoo.la
|
||||
$(OBJCOPY) --strip-all .libs/libfoo.so
|
||||
|
||||
-all-local: libfoo.strip
|
||||
+all-local:
|
||||
@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
|
||||
for script in $(EXTRA_DIST); do \
|
||||
cp -f $(srcdir)/$$script $(builddir); \
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
From 40b2a4a793c81221a28f822d07135069456ea021 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Dion <odion@efficios.com>
|
||||
Date: Fri, 10 Mar 2023 13:17:46 -0500
|
||||
Subject: [PATCH] Tests: fix: parse-callback reports missing addr2line
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
addr2line from binutils is required for this script to work correctly.
|
||||
However, it silently fails. Fix this by using `subprocess.run' with
|
||||
`check=True' instead of `subprocess.getoutput'. That way, an exception
|
||||
is raised if an error occurs.
|
||||
|
||||
Fix the shebang by not assuming where python is installed while at it.
|
||||
|
||||
Change-Id: I5157b3dbccf6bfbe08a6b6840b38f5db9010fe96
|
||||
Signed-off-by: Olivier Dion <odion@efficios.com>
|
||||
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
|
||||
---
|
||||
tests/utils/parse-callstack.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
|
||||
index 3bfddd9ef..c3f0e2e9b 100755
|
||||
--- a/tests/utils/parse-callstack.py
|
||||
+++ b/tests/utils/parse-callstack.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python3
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
|
||||
#
|
||||
@@ -24,7 +24,9 @@ def addr2line(executable, addr):
|
||||
# Expand inlined functions
|
||||
cmd += ['--addresses', addr]
|
||||
|
||||
- addr2line_output = subprocess.getoutput(' '.join(cmd))
|
||||
+ status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
|
||||
+
|
||||
+ addr2line_output = status.stdout.decode("utf-8")
|
||||
|
||||
# Omit the last 2 lines as the caller of main can not be determine
|
||||
fcts = [addr2line_output.split()[-2]]
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
Upstream-Status: Inappropriate [need to root cause the test hangs]
|
||||
|
||||
We keep seeing hangs in the tools/notifications tests on x86 and arm for
|
||||
a variety of distros. Exclude them for now to work out if this is the
|
||||
only place we see them and give SWAT/triage a break from the stream
|
||||
of them.
|
||||
|
||||
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14263
|
||||
|
||||
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
|
||||
Index: lttng-tools-2.13.1/tests/regression/Makefile.am
|
||||
===================================================================
|
||||
--- lttng-tools-2.13.1.orig/tests/regression/Makefile.am
|
||||
+++ lttng-tools-2.13.1/tests/regression/Makefile.am
|
||||
@@ -29,18 +29,6 @@ TESTS = tools/base-path/test_ust \
|
||||
tools/crash/test_crash \
|
||||
tools/regen-metadata/test_ust \
|
||||
tools/regen-statedump/test_ust \
|
||||
- tools/notification/test_notification_ust_error \
|
||||
- tools/notification/test_notification_ust_buffer_usage \
|
||||
- tools/notification/test_notification_ust_capture \
|
||||
- tools/notification/test_notification_ust_event_rule_condition_exclusion \
|
||||
- tools/notification/test_notification_kernel_error \
|
||||
- tools/notification/test_notification_kernel_buffer_usage \
|
||||
- tools/notification/test_notification_kernel_capture \
|
||||
- tools/notification/test_notification_kernel_instrumentation \
|
||||
- tools/notification/test_notification_kernel_syscall \
|
||||
- tools/notification/test_notification_notifier_discarded_count \
|
||||
- tools/notification/test_notification_kernel_userspace_probe \
|
||||
- tools/notification/test_notification_multi_app \
|
||||
tools/rotation/test_ust \
|
||||
tools/rotation/test_kernel \
|
||||
tools/rotation/test_save_load_mi \
|
||||
@@ -0,0 +1,107 @@
|
||||
From 844be4dc46deeec83199da80e9e2a6058e9f5a53 Mon Sep 17 00:00:00 2001
|
||||
From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
|
||||
<jeremie.galarneau@efficios.com>
|
||||
Date: Thu, 25 May 2023 19:15:20 -0400
|
||||
Subject: [PATCH] Tests fix: test_callstack: output of addr2line incorrectly
|
||||
parsed
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Issue observed
|
||||
--------------
|
||||
|
||||
The test_callstack test fails with GCC 13.1 with the following output:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 160, in <module>
|
||||
main()
|
||||
File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 155, in main
|
||||
raise Exception('Expected function name not found in recorded callstack')
|
||||
Exception: Expected function name not found in recorded callstack
|
||||
ok 10 - Destroy session callstack
|
||||
PASS: kernel/test_callstack 10 - Destroy session callstack
|
||||
not ok 11 - Validate userspace callstack
|
||||
FAIL: kernel/test_callstack 11 - Validate userspace callstack
|
||||
|
||||
Cause
|
||||
-----
|
||||
|
||||
parse-callstack.py uses 'split()' to split the lines of addr2line's
|
||||
output. By default, 'split()' splits a string on any whitespace.
|
||||
Typically this was fine as addr2line's output doesn't contain spaces and
|
||||
the function then splits on new lines.
|
||||
|
||||
Typical output of addr2line:
|
||||
|
||||
$ addr2line -e ./tests/regression/kernel//../../utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack --functions --addresses 0x40124B
|
||||
0x000000000040124b
|
||||
my_gettid
|
||||
/tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:40
|
||||
|
||||
However, with the test app compiled using gcc 13.1, a "discriminator"
|
||||
annotation is present:
|
||||
|
||||
0x0000000000401279
|
||||
fct_b
|
||||
/tmp/test-callstack-master/src/lttng-tools/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c:58 (discriminator 1)
|
||||
|
||||
Hence, by selecting the second to last element (-2, with negative
|
||||
indexing), the addr2line function returns '(discriminator' as the
|
||||
function name.
|
||||
|
||||
Solution
|
||||
--------
|
||||
|
||||
The parsing code is changed to simply iterate on groups of 3 lines,
|
||||
following addr2line's output format.
|
||||
|
||||
Fixes #1377
|
||||
|
||||
Change-Id: I8c1eab97e84ca7cad171904bed6660540061cf08
|
||||
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
|
||||
---
|
||||
tests/utils/parse-callstack.py | 25 +++++++++++++++++--------
|
||||
1 file changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py
|
||||
index c3f0e2e9bc..029100b618 100755
|
||||
--- a/tests/utils/parse-callstack.py
|
||||
+++ b/tests/utils/parse-callstack.py
|
||||
@@ -26,14 +26,23 @@ def addr2line(executable, addr):
|
||||
|
||||
status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
|
||||
|
||||
- addr2line_output = status.stdout.decode("utf-8")
|
||||
-
|
||||
- # Omit the last 2 lines as the caller of main can not be determine
|
||||
- fcts = [addr2line_output.split()[-2]]
|
||||
-
|
||||
- fcts = [ f for f in fcts if '??' not in f]
|
||||
-
|
||||
- return fcts
|
||||
+ addr2line_output = status.stdout.decode("utf-8").splitlines()
|
||||
+ # addr2line's output is made of 3-tuples:
|
||||
+ # - address
|
||||
+ # - function name
|
||||
+ # - source location
|
||||
+ if len(addr2line_output) % 3 != 0:
|
||||
+ raise Exception('Unexpected addr2line output:\n\t{}'.format('\n\t'.join(addr2line_output)))
|
||||
+
|
||||
+ function_names = []
|
||||
+ for address_line_number in range(0, len(addr2line_output), 3):
|
||||
+ function_name = addr2line_output[address_line_number + 1]
|
||||
+
|
||||
+ # Filter-out unresolved functions
|
||||
+ if "??" not in function_name:
|
||||
+ function_names.append(addr2line_output[address_line_number + 1])
|
||||
+
|
||||
+ return function_names
|
||||
|
||||
def extract_user_func_names(executable, raw_callstack):
|
||||
"""
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=LTTng 2.x central tracing registry session daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/lttng-sessiond -d
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Without --ignore-exit, the tap harness causes any FAILs within a
|
||||
# test plan to raise ERRORs; this is just noise.
|
||||
export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
|
||||
makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=FIXMEPTESTPATH top_builddir=FIXMEPTESTPATH"
|
||||
make -k -t all >error.log 2>&1
|
||||
# Can specify a test e.g.:
|
||||
# -C tests/regression/ check TESTS='kernel/test_callstack'
|
||||
make -k -s $makeargs check 2>error.log | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'
|
||||
exitcode=$?
|
||||
if [ -e error.log ]; then
|
||||
cat error.log
|
||||
fi
|
||||
if [ -e tests/unit/test-suite.log ]; then
|
||||
cat tests/unit/test-suite.log
|
||||
fi
|
||||
if [ -e tests/regression/test-suite.log ]; then
|
||||
cat tests/regression/test-suite.log
|
||||
fi
|
||||
exit $exitcode
|
||||
@@ -0,0 +1,197 @@
|
||||
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."
|
||||
HOMEPAGE = "https://github.com/lttng/lttng-tools"
|
||||
|
||||
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
|
||||
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 bison-native"
|
||||
RDEPENDS:${PN} = "libgcc"
|
||||
RRECOMMENDS:${PN} += "${LTTNGMODULES}"
|
||||
RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils"
|
||||
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
|
||||
RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils"
|
||||
# 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 ??= "${LTTNGUST} kmod"
|
||||
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"
|
||||
|
||||
SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
|
||||
file://0001-tests-do-not-strip-a-helper-library.patch \
|
||||
file://run-ptest \
|
||||
file://lttng-sessiond.service \
|
||||
file://disable-tests.patch \
|
||||
file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
|
||||
file://40b2a4a793c81221a28f822d07135069456ea021.patch \
|
||||
file://gcc13-ptest-fix.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337"
|
||||
|
||||
inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
|
||||
|
||||
CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
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"
|
||||
|
||||
PRIVATE_LIBS:${PN}-ptest = "libfoo.so"
|
||||
|
||||
do_install:append () {
|
||||
# install systemd unit file
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir}
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \
|
||||
tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \
|
||||
tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \
|
||||
tests/regression/tools/notification/util_event_generator.sh \
|
||||
tests/regression/tools/base-path/*.lttng; do
|
||||
install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
|
||||
done
|
||||
|
||||
for f in tests/utils/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.1.xsd; do
|
||||
install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
|
||||
done
|
||||
|
||||
# Patch in the correct path for the custom libraries a helper executable needs
|
||||
sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest"
|
||||
|
||||
# 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" {} +
|
||||
# Take all .py scripts for tests using the python bindings.
|
||||
find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \
|
||||
-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
|
||||
|
||||
for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
|
||||
for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
|
||||
cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
|
||||
case $f in
|
||||
*.so|userspace-probe-elf-*)
|
||||
install -d ${D}${PTEST_PATH}/tests/$d/
|
||||
ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
|
||||
# Remove any rpath/runpath to pass QA check.
|
||||
chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f
|
||||
;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
|
||||
chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary
|
||||
chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary
|
||||
chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libbar.so
|
||||
chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libfoo.so
|
||||
|
||||
#
|
||||
# Use the versioned libs of liblttng-ust-dl.
|
||||
#
|
||||
ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py"
|
||||
if [ -e $ustdl ]; then
|
||||
sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl
|
||||
fi
|
||||
|
||||
install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
|
||||
|
||||
# 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:/' \
|
||||
{} +
|
||||
|
||||
find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
|
||||
touch -r "${B}/Makefile" {} +
|
||||
|
||||
#
|
||||
# Need to stop generated binaries from rebuilding by removing their source dependencies
|
||||
#
|
||||
sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
|
||||
-e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
|
||||
-e 's#\(^test.*SOURCES.=\)#disable\1#g' \
|
||||
-e 's#\(^test.*LDADD.=\)#disable\1#g' \
|
||||
-i ${D}${PTEST_PATH}/tests/unit/Makefile
|
||||
|
||||
# Fix hardcoded build path
|
||||
sed -e 's#TESTAPP_PATH=.*/tests/regression/#TESTAPP_PATH="${PTEST_PATH}/tests/regression/#' \
|
||||
-i ${D}${PTEST_PATH}/tests/regression/ust/python-logging/test_python_logging
|
||||
|
||||
# Substitute links to installed binaries.
|
||||
for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; 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
|
||||
}
|
||||
|
||||
INHIBIT_PACKAGE_STRIP_FILES = "\
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/.libs/userspace-probe-elf-cxx-binary \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/gen-syscall-events \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/.libs/gen-syscall-events \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack \
|
||||
${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/.libs/gen-syscall-events-callstack \
|
||||
"
|
||||
@@ -0,0 +1,35 @@
|
||||
From 06279f50e924d1d55b43eb3b299f6633ecb1f7a4 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Wed, 22 Sep 2021 16:33:10 +0800
|
||||
Subject: [PATCH] Makefile.am: update rpath link
|
||||
|
||||
since commit 6339062 Move liblttng-ust to 'src/lib/',
|
||||
liblttng-ust.so/liblttng-ust-common.so/liblttng-ust-tracepoint.so
|
||||
's location changed from one dir to multiple dirs. which make below
|
||||
error:
|
||||
ld: warning: liblttng-ust-common.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)
|
||||
ld: warning: liblttng-ust-tracepoint.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link)
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/61]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
doc/examples/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
|
||||
index 8ee0564..20d246c 100644
|
||||
--- a/doc/examples/Makefile.am
|
||||
+++ b/doc/examples/Makefile.am
|
||||
@@ -142,7 +142,7 @@ all-local:
|
||||
CFLAGS='$(CFLAGS)' \
|
||||
AM_CFLAGS='$(AM_CFLAGS)' \
|
||||
LDFLAGS="$(LDFLAGS)" \
|
||||
- AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/"' \
|
||||
+ AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/:$(PWD)/../../src/lib/lttng-ust-tracepoint/.libs:$(PWD)/../../src/lib/lttng-ust-common/.libs/"' \
|
||||
LTTNG_GEN_TP_PATH="$$rel_src_subdir$(top_srcdir)/tools/" \
|
||||
AM_V_P="$(AM_V_P)" \
|
||||
AM_V_at="$(AM_V_at)" \
|
||||
--
|
||||
2.17.1
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From 2058584b7e87d6bd9d1765577766e0df7752232c Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Sun, 5 Sep 2021 10:44:19 +0200
|
||||
Subject: [PATCH] lttng-ust-common: link with liburcu explicitly
|
||||
|
||||
Otherwise linking errors are seen on x86-32.
|
||||
|
||||
Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
src/lib/lttng-ust-common/Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/lib/lttng-ust-common/Makefile.am b/src/lib/lttng-ust-common/Makefile.am
|
||||
index caeea2b..30febf0 100644
|
||||
--- a/src/lib/lttng-ust-common/Makefile.am
|
||||
+++ b/src/lib/lttng-ust-common/Makefile.am
|
||||
@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
|
||||
|
||||
liblttng_ust_common_la_LIBADD = \
|
||||
$(top_builddir)/src/common/libcommon.la \
|
||||
+ $(URCU_LIBS) \
|
||||
$(DL_LIBS)
|
||||
|
||||
liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
From dd1fdc841d069dbd4e284f430a88af79de951124 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Thu, 26 Sep 2019 17:54:00 +0800
|
||||
Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py
|
||||
|
||||
Otherwise it may install to /usr/lib, but should be /usr/lib64 when cross
|
||||
building.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59]
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
|
||||
---
|
||||
src/python-lttngust/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/python-lttngust/Makefile.am b/src/python-lttngust/Makefile.am
|
||||
index f95482d..f76d95b 100644
|
||||
--- a/src/python-lttngust/Makefile.am
|
||||
+++ b/src/python-lttngust/Makefile.am
|
||||
@@ -32,7 +32,7 @@ install-exec-local: build-python-bindings.stamp
|
||||
if [ "$(DESTDIR)" != "" ]; then \
|
||||
opts="$$opts --root=$(DESTDIR)"; \
|
||||
fi; \
|
||||
- $(PYTHON) $(builddir)/setup.py install $$opts;
|
||||
+ $(PYTHON) $(builddir)/setup.py install $$opts --install-lib=$(pythondir);
|
||||
|
||||
clean-local:
|
||||
rm -rf $(builddir)/build
|
||||
@@ -0,0 +1,53 @@
|
||||
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 = "LGPL-2.1-or-later & MIT & GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a46577a38ad0c36ff6ff43ccf40c480f"
|
||||
|
||||
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}' \
|
||||
"
|
||||
|
||||
inherit autotools lib_package manpages python3native pkgconfig
|
||||
|
||||
include lttng-platforms.inc
|
||||
|
||||
EXTRA_OECONF = "--disable-numa"
|
||||
CPPFLAGS:append:arm = "${@oe.utils.vartrue('DEBUG_BUILD', '-DUATOMIC_NO_LINK_ERROR', '', d)}"
|
||||
|
||||
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://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \
|
||||
file://0001-lttng-ust-common-link-with-liburcu-explicitly.patch \
|
||||
file://0001-Makefile.am-update-rpath-link.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "e7e04596dd73ac7aa99e27cd000f949dbb0fed51bd29099f9b08a25c1df0ced5"
|
||||
|
||||
CVE_PRODUCT = "ust"
|
||||
|
||||
PACKAGECONFIG[examples] = "--enable-examples, --disable-examples,"
|
||||
PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
|
||||
PACKAGECONFIG[python3-agent] = "--enable-python-agent ${PYTHON_OPTION}, --disable-python-agent, python3, python3"
|
||||
|
||||
FILES:${PN} += " ${PYTHON_SITEPACKAGES_DIR}/*"
|
||||
FILES:${PN}-staticdev += " ${PYTHON_SITEPACKAGES_DIR}/*.a"
|
||||
FILES:${PN}-dev += " ${PYTHON_SITEPACKAGES_DIR}/*.la"
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user