From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- ...-Support-out-of-tree-builds-in-babeltrace.patch | 17 ++ ...n-t-perform-unaligned-integer-read-writes.patch | 252 +++++++++++++++++++++ ...uffers-from-objstack_alloc-on-sizeof-void.patch | 54 +++++ meta/recipes-kernel/lttng/babeltrace_1.2.1.bb | 26 +++ ...probes-should-calculate-alignment-and-eve.patch | 130 +++++++++++ ...compaction-instrumentation-to-3.16-kernel.patch | 83 +++++++ ...e-kvm-instrumentation-compile-on-3.17-rc1.patch | 46 ++++ .../Update-statedump-to-3.17-nsproxy-locking.patch | 70 ++++++ ...ate-vmscan-instrumentation-to-3.16-kernel.patch | 70 ++++++ .../lttng/lttng-modules/bio-bvec-iter.patch | 156 +++++++++++++ ...-fix-mm_compaction_isolate_template-build.patch | 41 ++++ .../fix_build_with_v3.17_kernel.patch | 113 +++++++++ ...lttng-modules-remove-kernel-version-check.patch | 30 +++ ...modules-replace-KERNELDIR-with-KERNEL_SRC.patch | 81 +++++++ meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb | 44 ++++ meta/recipes-kernel/lttng/lttng-tools/run-ptest | 4 + .../lttng/lttng-tools/runtest-2.4.0.patch | 27 +++ .../recipes-kernel/lttng/lttng-tools/runtest.patch | 52 +++++ meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb | 77 +++++++ .../lttng/lttng-ust/add-aarch64.patch | 13 ++ .../lttng-ust/lttng-ust-doc-examples-disable.patch | 18 ++ meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb | 34 +++ 22 files changed, 1438 insertions(+) create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch create mode 100644 meta/recipes-kernel/lttng/babeltrace_1.2.1.bb create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch create mode 100644 meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb create mode 100755 meta/recipes-kernel/lttng/lttng-tools/run-ptest create mode 100644 meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch create mode 100644 meta/recipes-kernel/lttng/lttng-tools/runtest.patch create mode 100644 meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb create mode 100644 meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch create mode 100644 meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch create mode 100644 meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb (limited to 'meta/recipes-kernel/lttng') diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch new file mode 100644 index 0000000000..258eedd3ba --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch @@ -0,0 +1,17 @@ +Upstream-Status: backport + +babeltrace: Fix support out of tree builds in babeltrace + +Signed-off-by: Lars Persson + +diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am +index c834699..2c6b0bd 100644 +--- a/formats/lttng-live/Makefile.am ++++ b/formats/lttng-live/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include ++AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir) + + lib_LTLIBRARIES = libbabeltrace-lttng-live.la + + diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch new file mode 100644 index 0000000000..ea0aad699d --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch @@ -0,0 +1,252 @@ +From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Wed, 16 Jul 2014 10:58:48 -0400 +Subject: [PATCH] Fix: don't perform unaligned integer read/writes + +Signed-off-by: Mathieu Desnoyers + +Upstream-Status: Backport +Signed-off-by: Saul Wold + +--- + formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++---------------- + 1 file changed, 70 insertions(+), 38 deletions(-) + +diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c +index 189943e..85931be 100644 +--- a/formats/ctf/types/integer.c ++++ b/formats/ctf/types/integer.c +@@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint8_t v; + +- v = *(const uint8_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = v; + break; + } +@@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint16_t v; + +- v = *(const uint16_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT16_SWAP_LE_BE(v) : v; + break; +@@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint32_t v; + +- v = *(const uint32_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT32_SWAP_LE_BE(v) : v; + break; +@@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + uint64_t v; + +- v = *(const uint64_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._unsigned = + rbo ? GUINT64_SWAP_LE_BE(v) : v; + break; +@@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int8_t v; + +- v = *(const int8_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = v; + break; + } +@@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int16_t v; + +- v = *(const int16_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v; + break; +@@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int32_t v; + +- v = *(const int32_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v; + break; +@@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos, + { + int64_t v; + +- v = *(const int64_t *) ctf_get_pos_addr(pos); ++ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v)); + integer_definition->value._signed = + rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v; + break; +@@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos, + if (pos->dummy) + goto end; + if (!integer_declaration->signedness) { +- uint64_t v = integer_definition->value._unsigned; +- + switch (integer_declaration->len) { +- case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v; ++ case 8: ++ { ++ uint8_t v = integer_definition->value._unsigned; ++ ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 16: +- *(uint16_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT16_SWAP_LE_BE((uint16_t) v) : +- (uint16_t) v; ++ { ++ uint16_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT16_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 32: +- *(uint32_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT32_SWAP_LE_BE((uint32_t) v) : +- (uint32_t) v; ++ { ++ uint32_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT32_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 64: +- *(uint64_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT64_SWAP_LE_BE(v) : v; ++ { ++ uint64_t v = integer_definition->value._unsigned; ++ ++ if (rbo) ++ v = GUINT64_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + default: + assert(0); + } + } else { +- int64_t v = integer_definition->value._signed; +- + switch (integer_declaration->len) { +- case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v; ++ case 8: ++ { ++ uint8_t v = integer_definition->value._signed; ++ ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 16: +- *(int16_t *) ctf_get_pos_addr(pos) = rbo ? +- (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) : +- (int16_t) v; ++ { ++ int16_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT16_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 32: +- *(int32_t *) ctf_get_pos_addr(pos) = rbo ? +- (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) : +- (int32_t) v; ++ { ++ int32_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT32_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + case 64: +- *(int64_t *) ctf_get_pos_addr(pos) = rbo ? +- GUINT64_SWAP_LE_BE(v) : v; ++ { ++ int64_t v = integer_definition->value._signed; ++ ++ if (rbo) ++ v = GUINT64_SWAP_LE_BE(v); ++ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v)); + break; ++ } + default: + assert(0); + } +@@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio + if (!integer_declaration->signedness) { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._unsigned); + else + bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._unsigned); + } else { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_read_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._signed); + else + bt_bitfield_read_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + &integer_definition->value._signed); + } +@@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti + if (!integer_declaration->signedness) { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._unsigned); + else + bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._unsigned); + } else { + if (integer_declaration->byte_order == LITTLE_ENDIAN) + bt_bitfield_write_le(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._signed); + else + bt_bitfield_write_be(mmap_align_addr(pos->base_mma) + +- pos->mmap_base_offset, unsigned long, ++ pos->mmap_base_offset, unsigned char, + pos->offset, integer_declaration->len, + integer_definition->value._signed); + } +-- +1.8.3.1 + diff --git a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch new file mode 100644 index 0000000000..8e81d2d781 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch @@ -0,0 +1,54 @@ +From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= +Date: Fri, 16 May 2014 10:10:38 +0800 +Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport + +The buffers from objstack_alloc will store pointers, so they must +be aligned on a pointer's size, or else it will cause issues on the +CPUs which do not support unaligned addresses access. + +Signed-off-by: Fredrik Markstrom +Signed-off-by: Roy Li +Signed-off-by: Jérémie Galarneau +--- + formats/ctf/metadata/objstack.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c +index 9e264a4..14d9252 100644 +--- a/formats/ctf/metadata/objstack.c ++++ b/formats/ctf/metadata/objstack.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #define OBJSTACK_INIT_LEN 128 + #define OBJSTACK_POISON 0xcc +@@ -39,7 +40,7 @@ struct objstack_node { + struct bt_list_head node; + size_t len; + size_t used_len; +- char data[]; ++ char __attribute__ ((aligned (sizeof(void *)))) data[]; + }; + + BT_HIDDEN +@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len) + struct objstack_node *last_node; + void *p; + ++ len = ALIGN(len, sizeof(void *)); ++ + /* Get last node */ + last_node = bt_list_entry(objstack->head.prev, + struct objstack_node, node); +-- +1.7.10.4 + diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb new file mode 100644 index 0000000000..1c41e25827 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb @@ -0,0 +1,26 @@ +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" + +inherit autotools pkgconfig + +DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" + +SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79" +PV = "1.2.1+git${SRCPV}" + +SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \ + file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \ + file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \ + file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \ +" + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} diff --git a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch new file mode 100644 index 0000000000..9c3dc9c1e1 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch @@ -0,0 +1,130 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Fri, 25 Jul 2014 12:30:43 -0400 +Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event + length + +A noargs probe could have event fields. noargs just means that the probe +does not receive any argument as parameter. However, it could very well +serialize data into fields (global variables, constants, etc). + +It just happens that LTTng does not serialize any data in noargs events +at the moment, but this may very well change. + +The if (0) with (void) variable access strategy to stop compiler from +complaining from unused variables does not seem to work as expected with +gcc 4.9.1. Use "unused" attribute instead. + +Signed-off-by: Mathieu Desnoyers +--- + probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 35 insertions(+), 14 deletions(-) + +diff --git a/probes/lttng-events.h b/probes/lttng-events.h +index 596b70608584..ba9563b15cf9 100644 +--- a/probes/lttng-events.h ++++ b/probes/lttng-events.h +@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { + static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ + { \ + size_t __event_len = 0; \ +- unsigned int __dynamic_len_idx = 0; \ ++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ ++ \ ++ _tstruct \ ++ return __event_len; \ ++} ++ ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ ++static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \ ++{ \ ++ size_t __event_len = 0; \ ++ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ + \ +- if (0) \ +- (void) __dynamic_len_idx; /* don't warn if unused */ \ + _tstruct \ + return __event_len; \ + } +@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \ + return __event_align; \ + } + ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ ++static inline size_t __event_get_align__##_name(void) \ ++{ \ ++ size_t __event_align = 1; \ ++ _tstruct \ ++ return __event_align; \ ++} ++ + #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + + +@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \ + #undef TP_STRUCT__entry + #define TP_STRUCT__entry(args...) args + +-#undef DECLARE_EVENT_CLASS +-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ ++#undef DECLARE_EVENT_CLASS_NOARGS ++#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ + struct __event_typemap__##_name { \ + _tstruct \ + }; + ++#undef DECLARE_EVENT_CLASS ++#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ ++ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) ++ + #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + + +@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \ + struct lttng_channel *__chan = __event->chan; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ +- size_t __dynamic_len_idx = 0; \ +- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \ +- struct __event_typemap__##_name __typemap; \ ++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \ ++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ ++ struct __event_typemap__##_name __typemap __attribute__((unused)); \ + int __ret; \ + \ +- if (0) { \ +- (void) __dynamic_len_idx; /* don't warn if unused */ \ +- (void) __typemap; /* don't warn if unused */ \ +- } \ + if (!_TP_SESSION_CHECK(session, __chan->session)) \ + return; \ + if (unlikely(!ACCESS_ONCE(__chan->session->active))) \ +@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \ + struct lttng_channel *__chan = __event->chan; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ ++ size_t __dynamic_len_idx __attribute__((unused)) = 0; \ ++ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \ ++ struct __event_typemap__##_name __typemap __attribute__((unused)); \ + int __ret; \ + \ + if (!_TP_SESSION_CHECK(session, __chan->session)) \ +@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \ + return; \ + if (unlikely(!ACCESS_ONCE(__event->enabled))) \ + return; \ +- __event_len = 0; \ +- __event_align = 1; \ ++ __event_len = __event_get_size__##_name(__dynamic_len); \ ++ __event_align = __event_get_align__##_name(); \ + lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ + __event_align, -1); \ + __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ +-- +1.8.1.2 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch new file mode 100644 index 0000000000..0a056a9475 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch @@ -0,0 +1,83 @@ +From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Sun, 13 Jul 2014 13:33:21 -0400 +Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/compaction.h | 45 +++++++++++++++++++++++- + 1 file changed, 44 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h +index 1b237fa45ab0..22024e9ee582 100644 +--- a/instrumentation/events/lttng-module/compaction.h ++++ b/instrumentation/events/lttng-module/compaction.h +@@ -6,6 +6,7 @@ + + #include + #include ++#include + #include + + DECLARE_EVENT_CLASS(mm_compaction_isolate_template, +@@ -45,6 +46,48 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, + TP_ARGS(nr_scanned, nr_taken) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++TRACE_EVENT(mm_compaction_migratepages, ++ ++ TP_PROTO(unsigned long nr_all, ++ int migrate_rc, ++ struct list_head *migratepages), ++ ++ TP_ARGS(nr_all, migrate_rc, migratepages), ++ ++ TP_STRUCT__entry( ++ __field(unsigned long, nr_migrated) ++ __field(unsigned long, nr_failed) ++ ), ++ ++ TP_fast_assign( ++ tp_assign(nr_migrated, ++ nr_all - ++ (migrate_rc >= 0 ? migrate_rc : ++ ({ ++ unsigned long nr_failed = 0; ++ struct list_head *page_lru; ++ ++ list_for_each(page_lru, migratepages) ++ nr_failed++; ++ nr_failed; ++ }))) ++ tp_assign(nr_failed, ++ ({ ++ unsigned long nr_failed = 0; ++ struct list_head *page_lru; ++ ++ list_for_each(page_lru, migratepages) ++ nr_failed++; ++ nr_failed; ++ })) ++ ), ++ ++ TP_printk("nr_migrated=%lu nr_failed=%lu", ++ __entry->nr_migrated, ++ __entry->nr_failed) ++) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_migrated, +@@ -66,7 +109,7 @@ TRACE_EVENT(mm_compaction_migratepages, + __entry->nr_migrated, + __entry->nr_failed) + ) +- ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + + #endif /* _TRACE_COMPACTION_H */ + +-- +1.8.1.2 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch new file mode 100644 index 0000000000..3541b50b79 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch @@ -0,0 +1,46 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 21 Aug 2014 11:15:50 -0400 +Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1 + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h +index 2354884074eb..3c299c58a1cf 100644 +--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h ++++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h +@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn, + tp_memcpy(insn, + vcpu->arch.emulate_ctxt.decode.fetch.data, + 15) +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start) + tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) + tp_assign(len, vcpu->arch.emulate_ctxt._eip +@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn, + tp_memcpy(insn, + vcpu->arch.emulate_ctxt.fetch.data, + 15) ++#else ++ tp_assign(rip, vcpu->arch.emulate_ctxt._eip - ++ (vcpu->arch.emulate_ctxt.fetch.ptr - ++ vcpu->arch.emulate_ctxt.fetch.data)) ++ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS)) ++ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr - ++ vcpu->arch.emulate_ctxt.fetch.data) ++ tp_memcpy(insn, ++ vcpu->arch.emulate_ctxt.fetch.data, ++ 15) + #endif + tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode)) + tp_assign(failed, failed) +-- +1.8.1.2 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch new file mode 100644 index 0000000000..0f18c8a3e6 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch @@ -0,0 +1,70 @@ +Upstream-Status: Backport +Signed-off-by: Bruce Ashfield + +From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 21 Aug 2014 10:53:12 -0400 +Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking + +This Linux upstream commit introduces locking strategy back and forth: + +commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 +Author: Eric W. Biederman +Date: Mon Feb 3 19:13:49 2014 -0800 + + namespaces: Use task_lock and not rcu to protect nsproxy + +Use the task lock starting from kernel 3.17 rather than RCU to access +the task nsproxy. + +Signed-off-by: Mathieu Desnoyers +--- + lttng-statedump-impl.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c +index dad51ddaa250..e4caa488e436 100644 +--- a/lttng-statedump-impl.c ++++ b/lttng-statedump-impl.c +@@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session) + } + #endif + ++/* ++ * Called with task lock held. ++ */ + static + void lttng_statedump_process_ns(struct lttng_session *session, + struct task_struct *p, +@@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session, + struct nsproxy *proxy; + struct pid_namespace *pid_ns; + ++ /* ++ * Back and forth on locking strategy within Linux upstream for nsproxy. ++ * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 ++ * "namespaces: Use task_lock and not rcu to protect nsproxy" ++ * for details. ++ */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + rcu_read_lock(); + proxy = task_nsproxy(p); ++#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ ++ proxy = p->nsproxy; ++#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ + if (proxy) { + pid_ns = lttng_get_proxy_pid_ns(proxy); + do { +@@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session, + trace_lttng_statedump_process_state(session, + p, type, mode, submode, status, NULL); + } ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) + rcu_read_unlock(); ++#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ + } + + static +-- +1.8.1.2 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch new file mode 100644 index 0000000000..5f02270e89 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch @@ -0,0 +1,70 @@ +From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Sun, 13 Jul 2014 13:27:01 -0400 +Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h +index 1fd50ba7c235..0b4aa56761dc 100644 +--- a/instrumentation/events/lttng-module/vmscan.h ++++ b/instrumentation/events/lttng-module/vmscan.h +@@ -238,6 +238,44 @@ TRACE_EVENT(mm_shrink_slab_start, + __entry->total_scan) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++TRACE_EVENT(mm_shrink_slab_end, ++ TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval, ++ long unused_scan_cnt, long new_scan_cnt, long total_scan), ++ ++ TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt, ++ total_scan), ++ ++ TP_STRUCT__entry( ++ __field(struct shrinker *, shr) ++ __field(int, nid) ++ __field(void *, shrink) ++ __field(long, unused_scan) ++ __field(long, new_scan) ++ __field(int, retval) ++ __field(long, total_scan) ++ ), ++ ++ TP_fast_assign( ++ tp_assign(shr, shr) ++ tp_assign(nid, nid) ++ tp_assign(shrink, shr->scan_objects) ++ tp_assign(unused_scan, unused_scan_cnt) ++ tp_assign(new_scan, new_scan_cnt) ++ tp_assign(retval, shrinker_retval) ++ tp_assign(total_scan, total_scan) ++ ), ++ ++ TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", ++ __entry->shrink, ++ __entry->shr, ++ __entry->nid, ++ __entry->unused_scan, ++ __entry->new_scan, ++ __entry->total_scan, ++ __entry->retval) ++) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + TRACE_EVENT(mm_shrink_slab_end, + TP_PROTO(struct shrinker *shr, int shrinker_retval, + long unused_scan_cnt, long new_scan_cnt), +@@ -274,6 +312,7 @@ TRACE_EVENT(mm_shrink_slab_end, + __entry->total_scan, + __entry->retval) + ) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + #endif + + DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, +-- +1.8.1.2 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch b/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch new file mode 100644 index 0000000000..d6c66e4f2b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch @@ -0,0 +1,156 @@ +Upstream-Status: Pending + +In 3.14, bi_sector and bi_size were moved into an iterator, thus +breaking any tracepoints that still expect them in the bio. Fix up +the lttng-module tracepoints to use the new scheme when the kernel +version is >= 3.14. + +Signed-off-by: Tom Zanussi + +diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h +index f3b8bff..0a61543 100644 +--- a/instrumentation/events/lttng-module/block.h ++++ b/instrumentation/events/lttng-module/block.h +@@ -341,9 +341,15 @@ TRACE_EVENT(block_bio_bounce, + TP_fast_assign( + tp_assign(dev, bio->bi_bdev ? + bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -385,14 +391,24 @@ TRACE_EVENT(block_bio_complete, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) + tp_assign(error, error) + #else + tp_assign(error, 0) + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ), + + TP_printk("%d,%d %s %llu + %u [%d]", +@@ -419,9 +435,15 @@ DECLARE_EVENT_CLASS(block_bio_merge, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -485,9 +507,15 @@ TRACE_EVENT(block_bio_queue, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -513,9 +541,15 @@ DECLARE_EVENT_CLASS(block_bio, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -587,10 +621,17 @@ DECLARE_EVENT_CLASS(block_get_rq, + + TP_fast_assign( + tp_assign(dev, bio ? bio->bi_bdev->bd_dev : 0) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio ? bio->bi_iter.bi_sector : 0) ++ tp_assign(nr_sector, bio ? bio->bi_iter.bi_size >> 9 : 0) ++ blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, ++ bio ? bio->bi_iter.bi_size >> 9 : 0) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio ? bio->bi_sector : 0) + tp_assign(nr_sector, bio ? bio->bi_size >> 9 : 0) + blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0, + bio ? bio->bi_size >> 9 : 0) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -759,9 +800,15 @@ TRACE_EVENT(block_split, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(new_sector, new_sector) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(new_sector, new_sector) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_memcpy(comm, current->comm, TASK_COMM_LEN) + ), + +@@ -805,11 +852,19 @@ TRACE_EVENT(block_remap, + + TP_fast_assign( + tp_assign(dev, bio->bi_bdev->bd_dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) ++ tp_assign(sector, bio->bi_iter.bi_sector) ++ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9) ++ tp_assign(old_dev, dev) ++ tp_assign(old_sector, from) ++ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size) ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + tp_assign(sector, bio->bi_sector) + tp_assign(nr_sector, bio->bi_size >> 9) + tp_assign(old_dev, dev) + tp_assign(old_sector, from) + blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ), + + TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", diff --git a/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch b/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch new file mode 100644 index 0000000000..a99871a62e --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch @@ -0,0 +1,41 @@ +From af48c7b08de4b811d3d974e65e362b86ce8c4a34 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Wed, 10 Dec 2014 03:19:28 -0500 +Subject: [PATCH] compaction: fix mm_compaction_isolate_template build + +linux-stable integrated the 3.16 commit f8c9301fa5a2a [mm/compaction: do +not count migratepages when unnecessary] with the 3.14.25 update. + +So we have to update the lttng-module linux version codes to use the +new definition in builds greater than 3.14.24 or 3.16. + +Signed-off-by: Bruce Ashfield +--- + instrumentation/events/lttng-module/compaction.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h +index 22024e9ee582..07afbe06f1a6 100644 +--- a/instrumentation/events/lttng-module/compaction.h ++++ b/instrumentation/events/lttng-module/compaction.h +@@ -46,7 +46,7 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, + TP_ARGS(nr_scanned, nr_taken) + ) + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_all, +@@ -87,7 +87,7 @@ TRACE_EVENT(mm_compaction_migratepages, + __entry->nr_migrated, + __entry->nr_failed) + ) +-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) */ + TRACE_EVENT(mm_compaction_migratepages, + + TP_PROTO(unsigned long nr_migrated, +-- +2.1.0 + diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch new file mode 100644 index 0000000000..97b7a53a07 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch @@ -0,0 +1,113 @@ + +Upstream-Status: Backport + +commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e +Author: Nitin A Kamble +Date: Thu Sep 25 18:19:43 2014 -0700 + + asoc.h: fix build with v3.17 kernel + + The snd_soc_codec structure has changed in the v3.17 kernel. Some + of the redundant fields have been removed. To be specific this commit + from the v3.17 kernel causes the build failure for lttng-modules. + + |commit f4333203ec933f9272c90c7add01774ec2cf94d3 + |Author: Lars-Peter Clausen + |Date: Mon Jun 16 18:13:02 2014 +0200 + | + | ASoC: Move name and id from CODEC/platform to component + | + | The component struct already has a name and id field which are initialized to + | the same values as the same fields in the CODEC and platform structs. So remove + | them from the CODEC and platform structs and used the ones from the component + | struct instead. + | + | Signed-off-by: Lars-Peter Clausen + | Signed-off-by: Mark Brown + + The asoc.h is changed according to the change in the above kernel commit + to fix the lttng-modules build. The change in the lttng-modules code is + conditional on the kernel version, so that it does not break builds with + previous kernel versions. + + Signed-off-by: Nitin A Kamble + Signed-off-by: Mathieu Desnoyers + +diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h +index 672bea4..bf9cf86 100644 +--- a/instrumentation/events/lttng-module/asoc.h ++++ b/instrumentation/events/lttng-module/asoc.h +@@ -21,6 +21,14 @@ struct snd_soc_card; + struct snd_soc_dapm_widget; + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) ++#define CODEC_NAME_FIELD component.name ++#define CODEC_ID_FIELD component.id ++#else ++#define CODEC_NAME_FIELD name ++#define CODEC_ID_FIELD id ++#endif ++ + /* + * Log register events + */ +@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg, + TP_ARGS(codec, reg, val), + + TP_STRUCT__entry( +- __string( name, codec->name ) ++ __string( name, codec->CODEC_NAME_FIELD ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + + TP_fast_assign( +- tp_strcpy(name, codec->name) +- tp_assign(id, codec->id) ++ tp_strcpy(name, codec->CODEC_NAME_FIELD) ++ tp_assign(id, codec->CODEC_ID_FIELD) + tp_assign(reg, reg) + tp_assign(val, val) + ), +@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg, + TP_ARGS(platform, reg, val), + + TP_STRUCT__entry( +- __string( name, platform->name ) ++ __string( name, platform->CODEC_NAME_FIELD ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + + TP_fast_assign( +- tp_strcpy(name, platform->name) +- tp_assign(id, platform->id) ++ tp_strcpy(name, platform->CODEC_NAME_FIELD) ++ tp_assign(id, platform->CODEC_ID_FIELD) + tp_assign(reg, reg) + tp_assign(val, val) + ), +@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync, + TP_ARGS(codec, type, status), + + TP_STRUCT__entry( +- __string( name, codec->name ) ++ __string( name, codec->CODEC_NAME_FIELD ) + __string( status, status ) + __string( type, type ) + __field( int, id ) + ), + + TP_fast_assign( +- tp_strcpy(name, codec->name) ++ tp_strcpy(name, codec->CODEC_NAME_FIELD) + tp_strcpy(status, status) + tp_strcpy(type, type) +- tp_assign(id, codec->id) ++ tp_assign(id, codec->CODEC_ID_FIELD) + ), + + TP_printk("codec=%s.%d type=%s status=%s", __get_str(name), diff --git a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch new file mode 100644 index 0000000000..02d8d8827e --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch @@ -0,0 +1,30 @@ +This is required in order the make the build succeed for +machine k2hk-evm, image enea-image-demo. + +The patch for commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f is already part of the build. +It is located here: +poky/meta-ti/recipes-kernel/linux/linux-keystone-3.10.10/Fix_HRTICK_related_deadlock_from_ntp_lock.patch +and it is applied for kernel recipe poky/meta-ti/recipes-kernel/linux/linux-keystone_3.10.bb, +that is the kernel used for k2hk-evm. + +In this regard, I removed the check until TI upgrade their +kernels to a supported version. + +Upstream-Status: Not Applicable + +Signed-off-by: Liviu Gheorghisan + +--- +--- a/wrapper/trace-clock.h 2014-07-25 15:54:00.677739746 +0200 ++++ b/wrapper/trace-clock.h 2014-07-25 15:55:49.807390266 +0200 +@@ -36,10 +36,6 @@ + #include "../lttng-kernel-version.h" + #include "random.h" + +-#if LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3) +-#error "Linux kernels 3.10 and 3.11 introduce a deadlock in the timekeeping subsystem. Fixed by commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f \"timekeeping: Fix HRTICK related deadlock from ntp lock changes\" in Linux." +-#endif +- + static inline u64 trace_clock_monotonic_wrapper(void) + { + ktime_t ktime; diff --git a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch new file mode 100644 index 0000000000..30f825c414 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch @@ -0,0 +1,81 @@ +Upstream-Status: Inappropriate [embedded specific] + +lttng-modules: replace KERNELDIR with KERNEL_SRC + +Since lttng-modules uses the default way of module.bbclass to +build and install lttng-modules, we do this replacement for +it as-is. + +Signed-off-by: Zumeng Chen + +diff --git a/Makefile b/Makefile +index a9d1cb1..c1b65b9 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,19 +43,19 @@ obj-m += lib/ + endif # CONFIG_TRACEPOINTS + + else # KERNELRELEASE +- KERNELDIR ?= /lib/modules/$(shell uname -r)/build ++ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) + + default: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules + + modules_install: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install + + clean: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + + %.i: %.c +- $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $@ + endif # KERNELRELEASE +diff --git a/README b/README +index 8c5dd46..6bd3334 100644 +--- a/README ++++ b/README +@@ -27,8 +27,8 @@ access to your full kernel source tree), and use: + If you need to specify the target directory to the kernel you want to build + against, use: + +-% KERNELDIR=path_to_kernel_dir make +-# KERNELDIR=path_to_kernel_dir make modules_install ++% KERNEL_SRC=path_to_kernel_dir make ++# KERNEL_SRC=path_to_kernel_dir make modules_install + # depmod -a kernel_version + + Use lttng-tools to control the tracer. LTTng tools should automatically load +diff --git a/probes/Makefile b/probes/Makefile +index 225803c..3449866 100644 +--- a/probes/Makefile ++++ b/probes/Makefile +@@ -212,18 +212,18 @@ endif + endif + + else +- KERNELDIR ?= /lib/modules/$(shell uname -r)/build ++ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) + + default: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules + + modules_install: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install + /sbin/depmod -a + + clean: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + + endif diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb new file mode 100644 index 0000000000..1a352209ed --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb @@ -0,0 +1,44 @@ +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=1412caf5a1aa90d6a48588a4794c0eac \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" + +DEPENDS = "virtual/kernel" + +inherit module + +SRCREV = "789fd1d06d07aeb9a403bdce1b3318560cfc6eca" + +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux' + +SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \ + file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \ + file://Update-compaction-instrumentation-to-3.16-kernel.patch \ + file://Update-vmscan-instrumentation-to-3.16-kernel.patch \ + file://lttng-modules-remove-kernel-version-check.patch \ + file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \ + file://Update-statedump-to-3.17-nsproxy-locking.patch \ + file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \ + file://fix_build_with_v3.17_kernel.patch \ + file://compaction-fix-mm_compaction_isolate_template-build.patch \ + " + +export INSTALL_MOD_DIR="kernel/lttng-modules" +export KERNEL_SRC="${STAGING_KERNEL_DIR}" + + +S = "${WORKDIR}/git" + +do_install_append() { + # Delete empty directories to avoid QA failures if no modules were built + find ${D}/lib -depth -type d -empty -exec rmdir {} \; +} + +python do_package_prepend() { + if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')): + bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True)) +} + diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest new file mode 100755 index 0000000000..e758815c77 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +make -C tests installcheck + diff --git a/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch b/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch new file mode 100644 index 0000000000..958bce48e0 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.am b/Makefile.am +index 584f59b..c2bcabd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ + dist_noinst_DATA = CodingStyle + + EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt ++ ++install-ptest: ++ cp -r $(srcdir)/tests $(DESTDIR) ++ for m in $$(find $(DESTDIR)/tests -name Makefile); do \ ++ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ ++ done +diff --git a/tests/run.sh b/tests/run.sh +index c6c50fd..6455359 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -19,4 +19,7 @@ + + [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +-prove --merge --exec '' - < $1 ++prove --merge -v --exec '' - < $1 | sed \ ++ -e 's|^ok \(.*\)|PASS: \1|' \ ++ -e 's|^not ok \(.*\)|FAIL: \1|' \ ++ | egrep -h 'PASS|FAIL' diff --git a/meta/recipes-kernel/lttng/lttng-tools/runtest.patch b/meta/recipes-kernel/lttng/lttng-tools/runtest.patch new file mode 100644 index 0000000000..545a5dc083 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/runtest.patch @@ -0,0 +1,52 @@ +diff --git a/Makefile.am b/Makefile.am +index 584f59b..c2bcabd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ + dist_noinst_DATA = CodingStyle + + EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt ++ ++install-ptest: ++ cp -r $(srcdir)/tests $(DESTDIR) ++ for m in $$(find $(DESTDIR)/tests -name Makefile); do \ ++ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ ++ done +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 6d5b00d..3774f9d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1,14 +1,17 @@ + SUBDIRS = utils regression unit stress + +-if USE_PYTHON +-check-am: ++installcheck-am: + ./run.sh unit_tests + ./run.sh fast_regression ++if USE_PYTHON + ./run.sh with_bindings_regression +-else ++endif ++ + check-am: + ./run.sh unit_tests + ./run.sh fast_regression ++if USE_PYTHON ++ ./run.sh with_bindings_regression + endif + + dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression +diff --git a/tests/run.sh b/tests/run.sh +index c6c50fd..6455359 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -19,4 +19,7 @@ + + [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +-prove --merge --exec '' - < $1 ++prove --merge -v --exec '' - < $1 | sed \ ++ -e 's|^ok \(.*\)|PASS: \1|' \ ++ -e 's|^not ok \(.*\)|FAIL: \1|' \ ++ | egrep -h 'PASS|FAIL' diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb new file mode 100644 index 0000000000..fd44aa5f6d --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb @@ -0,0 +1,77 @@ +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 lttng-ust libxml2" +RDEPENDS_${PN}-ptest += "make perl bash" + +SRCREV = "8b27cacb277c2cdab791139b08da8eb87ab14a88" +PV = "v2.5.0" + +PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \ +" +PACKAGECONFIG ??= "lttng-ust" +PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native" +PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust" + +SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \ + file://runtest-2.4.0.patch \ + file://run-ptest \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep ptest pkgconfig + +export KERNELDIR="${STAGING_KERNEL_DIR}" + +FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ + ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" +FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \ + ${libdir}/python2.7/site-packages/.debug" +FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a" +FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.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_configure_prepend () { + # Delete a shipped m4 file that overrides our patched one + rm -f ${S}/config/libxml.m4 +} + +do_install_ptest () { + chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh + for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do + sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -i $i + done + + sed -e "s:src/bin/lttng-sessiond:$bindir:g" \ + -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \ + -i ${D}${PTEST_PATH}/tests/regression/run-report.py + sed -e "s:src/bin:bin:g" -e "s:lt-::g" \ + -i ${D}${PTEST_PATH}/tests/utils/utils.sh + sed -e "s:ini_config:\.libs\/ini_config:" \ + -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config +} diff --git a/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch new file mode 100644 index 0000000000..b8b2cc3452 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index f507883..40a57d8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -194,6 +194,8 @@ changequote([,])dnl + s390) NO_UNALIGNED_ACCESS=1 ;; + s390x) NO_UNALIGNED_ACCESS=1 ;; + arm*) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64_be) NO_UNALIGNED_ACCESS=1 ;; + mips*) NO_UNALIGNED_ACCESS=1 ;; + tile*) NO_UNALIGNED_ACCESS=1 ;; + *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;; diff --git a/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch new file mode 100644 index 0000000000..b68a9899c9 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch @@ -0,0 +1,18 @@ +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 + +Index: doc/Makefile.am +=================================================================== +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + dist_man_MANS = man/lttng-gen-tp.1 \ + man/lttng-ust.3 \ diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb new file mode 100644 index 0000000000..e07d3c726b --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb @@ -0,0 +1,34 @@ +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 + +DEPENDS = "liburcu util-linux" +RDEPENDS_${PN}-bin = "python-core" + +# For backwards compatibility after rename +RPROVIDES_${PN} = "lttng2-ust" +RREPLACES_${PN} = "lttng2-ust" +RCONFLICTS_${PN} = "lttng2-ust" + +SRCREV = "ce59a997afdb7dc8af02b464430bb7e35549fa66" +PV = "2.5.0" +PE = "2" + +SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \ + file://lttng-ust-doc-examples-disable.patch \ + file://add-aarch64.patch \ + " + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} -- cgit v1.2.3-54-g00ecf