summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-kernel/lttng
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch17
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch252
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch54
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.2.1.bb26
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch130
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch83
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch70
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch70
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/bio-bvec-iter.patch156
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/compaction-fix-mm_compaction_isolate_template-build.patch41
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch113
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/lttng-modules-remove-kernel-version-check.patch30
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch81
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb44
-rwxr-xr-xmeta/recipes-kernel/lttng/lttng-tools/run-ptest4
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch27
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/runtest.patch52
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb77
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch13
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch18
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb34
22 files changed, 1438 insertions, 0 deletions
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 @@
1Upstream-Status: backport
2
3babeltrace: Fix support out of tree builds in babeltrace
4
5Signed-off-by: Lars Persson <larper@axis.com>
6
7diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am
8index c834699..2c6b0bd 100644
9--- a/formats/lttng-live/Makefile.am
10+++ b/formats/lttng-live/Makefile.am
11@@ -1,4 +1,4 @@
12-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
13+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
14
15 lib_LTLIBRARIES = libbabeltrace-lttng-live.la
16
17
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 @@
1From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Wed, 16 Jul 2014 10:58:48 -0400
4Subject: [PATCH] Fix: don't perform unaligned integer read/writes
5
6Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7
8Upstream-Status: Backport
9Signed-off-by: Saul Wold <sgw@linux.intel.com>
10
11---
12 formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++----------------
13 1 file changed, 70 insertions(+), 38 deletions(-)
14
15diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c
16index 189943e..85931be 100644
17--- a/formats/ctf/types/integer.c
18+++ b/formats/ctf/types/integer.c
19@@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
20 {
21 uint8_t v;
22
23- v = *(const uint8_t *) ctf_get_pos_addr(pos);
24+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
25 integer_definition->value._unsigned = v;
26 break;
27 }
28@@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
29 {
30 uint16_t v;
31
32- v = *(const uint16_t *) ctf_get_pos_addr(pos);
33+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
34 integer_definition->value._unsigned =
35 rbo ? GUINT16_SWAP_LE_BE(v) : v;
36 break;
37@@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
38 {
39 uint32_t v;
40
41- v = *(const uint32_t *) ctf_get_pos_addr(pos);
42+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
43 integer_definition->value._unsigned =
44 rbo ? GUINT32_SWAP_LE_BE(v) : v;
45 break;
46@@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
47 {
48 uint64_t v;
49
50- v = *(const uint64_t *) ctf_get_pos_addr(pos);
51+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
52 integer_definition->value._unsigned =
53 rbo ? GUINT64_SWAP_LE_BE(v) : v;
54 break;
55@@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
56 {
57 int8_t v;
58
59- v = *(const int8_t *) ctf_get_pos_addr(pos);
60+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
61 integer_definition->value._signed = v;
62 break;
63 }
64@@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
65 {
66 int16_t v;
67
68- v = *(const int16_t *) ctf_get_pos_addr(pos);
69+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
70 integer_definition->value._signed =
71 rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v;
72 break;
73@@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
74 {
75 int32_t v;
76
77- v = *(const int32_t *) ctf_get_pos_addr(pos);
78+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
79 integer_definition->value._signed =
80 rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v;
81 break;
82@@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
83 {
84 int64_t v;
85
86- v = *(const int64_t *) ctf_get_pos_addr(pos);
87+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
88 integer_definition->value._signed =
89 rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v;
90 break;
91@@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos,
92 if (pos->dummy)
93 goto end;
94 if (!integer_declaration->signedness) {
95- uint64_t v = integer_definition->value._unsigned;
96-
97 switch (integer_declaration->len) {
98- case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v;
99+ case 8:
100+ {
101+ uint8_t v = integer_definition->value._unsigned;
102+
103+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
104 break;
105+ }
106 case 16:
107- *(uint16_t *) ctf_get_pos_addr(pos) = rbo ?
108- GUINT16_SWAP_LE_BE((uint16_t) v) :
109- (uint16_t) v;
110+ {
111+ uint16_t v = integer_definition->value._unsigned;
112+
113+ if (rbo)
114+ v = GUINT16_SWAP_LE_BE(v);
115+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
116 break;
117+ }
118 case 32:
119- *(uint32_t *) ctf_get_pos_addr(pos) = rbo ?
120- GUINT32_SWAP_LE_BE((uint32_t) v) :
121- (uint32_t) v;
122+ {
123+ uint32_t v = integer_definition->value._unsigned;
124+
125+ if (rbo)
126+ v = GUINT32_SWAP_LE_BE(v);
127+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
128 break;
129+ }
130 case 64:
131- *(uint64_t *) ctf_get_pos_addr(pos) = rbo ?
132- GUINT64_SWAP_LE_BE(v) : v;
133+ {
134+ uint64_t v = integer_definition->value._unsigned;
135+
136+ if (rbo)
137+ v = GUINT64_SWAP_LE_BE(v);
138+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
139 break;
140+ }
141 default:
142 assert(0);
143 }
144 } else {
145- int64_t v = integer_definition->value._signed;
146-
147 switch (integer_declaration->len) {
148- case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v;
149+ case 8:
150+ {
151+ uint8_t v = integer_definition->value._signed;
152+
153+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
154 break;
155+ }
156 case 16:
157- *(int16_t *) ctf_get_pos_addr(pos) = rbo ?
158- (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) :
159- (int16_t) v;
160+ {
161+ int16_t v = integer_definition->value._signed;
162+
163+ if (rbo)
164+ v = GUINT16_SWAP_LE_BE(v);
165+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
166 break;
167+ }
168 case 32:
169- *(int32_t *) ctf_get_pos_addr(pos) = rbo ?
170- (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) :
171- (int32_t) v;
172+ {
173+ int32_t v = integer_definition->value._signed;
174+
175+ if (rbo)
176+ v = GUINT32_SWAP_LE_BE(v);
177+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
178 break;
179+ }
180 case 64:
181- *(int64_t *) ctf_get_pos_addr(pos) = rbo ?
182- GUINT64_SWAP_LE_BE(v) : v;
183+ {
184+ int64_t v = integer_definition->value._signed;
185+
186+ if (rbo)
187+ v = GUINT64_SWAP_LE_BE(v);
188+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
189 break;
190+ }
191 default:
192 assert(0);
193 }
194@@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio
195 if (!integer_declaration->signedness) {
196 if (integer_declaration->byte_order == LITTLE_ENDIAN)
197 bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
198- pos->mmap_base_offset, unsigned long,
199+ pos->mmap_base_offset, unsigned char,
200 pos->offset, integer_declaration->len,
201 &integer_definition->value._unsigned);
202 else
203 bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
204- pos->mmap_base_offset, unsigned long,
205+ pos->mmap_base_offset, unsigned char,
206 pos->offset, integer_declaration->len,
207 &integer_definition->value._unsigned);
208 } else {
209 if (integer_declaration->byte_order == LITTLE_ENDIAN)
210 bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
211- pos->mmap_base_offset, unsigned long,
212+ pos->mmap_base_offset, unsigned char,
213 pos->offset, integer_declaration->len,
214 &integer_definition->value._signed);
215 else
216 bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
217- pos->mmap_base_offset, unsigned long,
218+ pos->mmap_base_offset, unsigned char,
219 pos->offset, integer_declaration->len,
220 &integer_definition->value._signed);
221 }
222@@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti
223 if (!integer_declaration->signedness) {
224 if (integer_declaration->byte_order == LITTLE_ENDIAN)
225 bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
226- pos->mmap_base_offset, unsigned long,
227+ pos->mmap_base_offset, unsigned char,
228 pos->offset, integer_declaration->len,
229 integer_definition->value._unsigned);
230 else
231 bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
232- pos->mmap_base_offset, unsigned long,
233+ pos->mmap_base_offset, unsigned char,
234 pos->offset, integer_declaration->len,
235 integer_definition->value._unsigned);
236 } else {
237 if (integer_declaration->byte_order == LITTLE_ENDIAN)
238 bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
239- pos->mmap_base_offset, unsigned long,
240+ pos->mmap_base_offset, unsigned char,
241 pos->offset, integer_declaration->len,
242 integer_definition->value._signed);
243 else
244 bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
245- pos->mmap_base_offset, unsigned long,
246+ pos->mmap_base_offset, unsigned char,
247 pos->offset, integer_declaration->len,
248 integer_definition->value._signed);
249 }
250--
2511.8.3.1
252
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 @@
1From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
3Date: Fri, 16 May 2014 10:10:38 +0800
4Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Backport
10
11The buffers from objstack_alloc will store pointers, so they must
12be aligned on a pointer's size, or else it will cause issues on the
13CPUs which do not support unaligned addresses access.
14
15Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
16Signed-off-by: Roy Li <rongqing.li@windriver.com>
17Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
18---
19 formats/ctf/metadata/objstack.c | 5 ++++-
20 1 file changed, 4 insertions(+), 1 deletion(-)
21
22diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c
23index 9e264a4..14d9252 100644
24--- a/formats/ctf/metadata/objstack.c
25+++ b/formats/ctf/metadata/objstack.c
26@@ -27,6 +27,7 @@
27 #include <stdlib.h>
28 #include <babeltrace/list.h>
29 #include <babeltrace/babeltrace-internal.h>
30+#include <babeltrace/align.h>
31
32 #define OBJSTACK_INIT_LEN 128
33 #define OBJSTACK_POISON 0xcc
34@@ -39,7 +40,7 @@ struct objstack_node {
35 struct bt_list_head node;
36 size_t len;
37 size_t used_len;
38- char data[];
39+ char __attribute__ ((aligned (sizeof(void *)))) data[];
40 };
41
42 BT_HIDDEN
43@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len)
44 struct objstack_node *last_node;
45 void *p;
46
47+ len = ALIGN(len, sizeof(void *));
48+
49 /* Get last node */
50 last_node = bt_list_entry(objstack->head.prev,
51 struct objstack_node, node);
52--
531.7.10.4
54
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 @@
1SUMMARY = "Babeltrace - Trace Format Babel Tower"
2DESCRIPTION = "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."
3HOMEPAGE = "http://www.efficios.com/babeltrace/"
4BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
5
6LICENSE = "MIT & GPLv2"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
8
9inherit autotools pkgconfig
10
11DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
12
13SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79"
14PV = "1.2.1+git${SRCPV}"
15
16SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
17 file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \
18 file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \
19 file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \
20"
21
22S = "${WORKDIR}/git"
23
24do_configure_prepend () {
25 ( cd ${S}; ${S}/bootstrap )
26}
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 @@
1Upstream-Status: Backport
2Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
3
4From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001
5From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6Date: Fri, 25 Jul 2014 12:30:43 -0400
7Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event
8 length
9
10A noargs probe could have event fields. noargs just means that the probe
11does not receive any argument as parameter. However, it could very well
12serialize data into fields (global variables, constants, etc).
13
14It just happens that LTTng does not serialize any data in noargs events
15at the moment, but this may very well change.
16
17The if (0) with (void) variable access strategy to stop compiler from
18complaining from unused variables does not seem to work as expected with
19gcc 4.9.1. Use "unused" attribute instead.
20
21Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22---
23 probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++--------------
24 1 file changed, 35 insertions(+), 14 deletions(-)
25
26diff --git a/probes/lttng-events.h b/probes/lttng-events.h
27index 596b70608584..ba9563b15cf9 100644
28--- a/probes/lttng-events.h
29+++ b/probes/lttng-events.h
30@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
31 static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
32 { \
33 size_t __event_len = 0; \
34- unsigned int __dynamic_len_idx = 0; \
35+ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
36+ \
37+ _tstruct \
38+ return __event_len; \
39+}
40+
41+#undef DECLARE_EVENT_CLASS_NOARGS
42+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
43+static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \
44+{ \
45+ size_t __event_len = 0; \
46+ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
47 \
48- if (0) \
49- (void) __dynamic_len_idx; /* don't warn if unused */ \
50 _tstruct \
51 return __event_len; \
52 }
53@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \
54 return __event_align; \
55 }
56
57+#undef DECLARE_EVENT_CLASS_NOARGS
58+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
59+static inline size_t __event_get_align__##_name(void) \
60+{ \
61+ size_t __event_align = 1; \
62+ _tstruct \
63+ return __event_align; \
64+}
65+
66 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
67
68
69@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \
70 #undef TP_STRUCT__entry
71 #define TP_STRUCT__entry(args...) args
72
73-#undef DECLARE_EVENT_CLASS
74-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
75+#undef DECLARE_EVENT_CLASS_NOARGS
76+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
77 struct __event_typemap__##_name { \
78 _tstruct \
79 };
80
81+#undef DECLARE_EVENT_CLASS
82+#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
83+ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print)
84+
85 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
86
87
88@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \
89 struct lttng_channel *__chan = __event->chan; \
90 struct lib_ring_buffer_ctx __ctx; \
91 size_t __event_len, __event_align; \
92- size_t __dynamic_len_idx = 0; \
93- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \
94- struct __event_typemap__##_name __typemap; \
95+ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
96+ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
97+ struct __event_typemap__##_name __typemap __attribute__((unused)); \
98 int __ret; \
99 \
100- if (0) { \
101- (void) __dynamic_len_idx; /* don't warn if unused */ \
102- (void) __typemap; /* don't warn if unused */ \
103- } \
104 if (!_TP_SESSION_CHECK(session, __chan->session)) \
105 return; \
106 if (unlikely(!ACCESS_ONCE(__chan->session->active))) \
107@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \
108 struct lttng_channel *__chan = __event->chan; \
109 struct lib_ring_buffer_ctx __ctx; \
110 size_t __event_len, __event_align; \
111+ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
112+ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
113+ struct __event_typemap__##_name __typemap __attribute__((unused)); \
114 int __ret; \
115 \
116 if (!_TP_SESSION_CHECK(session, __chan->session)) \
117@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \
118 return; \
119 if (unlikely(!ACCESS_ONCE(__event->enabled))) \
120 return; \
121- __event_len = 0; \
122- __event_align = 1; \
123+ __event_len = __event_get_size__##_name(__dynamic_len); \
124+ __event_align = __event_get_align__##_name(); \
125 lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
126 __event_align, -1); \
127 __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
128--
1291.8.1.2
130
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 @@
1From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Sun, 13 Jul 2014 13:33:21 -0400
4Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel
5
6Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7---
8 instrumentation/events/lttng-module/compaction.h | 45 +++++++++++++++++++++++-
9 1 file changed, 44 insertions(+), 1 deletion(-)
10
11diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h
12index 1b237fa45ab0..22024e9ee582 100644
13--- a/instrumentation/events/lttng-module/compaction.h
14+++ b/instrumentation/events/lttng-module/compaction.h
15@@ -6,6 +6,7 @@
16
17 #include <linux/types.h>
18 #include <linux/tracepoint.h>
19+#include <linux/version.h>
20 #include <trace/events/gfpflags.h>
21
22 DECLARE_EVENT_CLASS(mm_compaction_isolate_template,
23@@ -45,6 +46,48 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
24 TP_ARGS(nr_scanned, nr_taken)
25 )
26
27+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
28+TRACE_EVENT(mm_compaction_migratepages,
29+
30+ TP_PROTO(unsigned long nr_all,
31+ int migrate_rc,
32+ struct list_head *migratepages),
33+
34+ TP_ARGS(nr_all, migrate_rc, migratepages),
35+
36+ TP_STRUCT__entry(
37+ __field(unsigned long, nr_migrated)
38+ __field(unsigned long, nr_failed)
39+ ),
40+
41+ TP_fast_assign(
42+ tp_assign(nr_migrated,
43+ nr_all -
44+ (migrate_rc >= 0 ? migrate_rc :
45+ ({
46+ unsigned long nr_failed = 0;
47+ struct list_head *page_lru;
48+
49+ list_for_each(page_lru, migratepages)
50+ nr_failed++;
51+ nr_failed;
52+ })))
53+ tp_assign(nr_failed,
54+ ({
55+ unsigned long nr_failed = 0;
56+ struct list_head *page_lru;
57+
58+ list_for_each(page_lru, migratepages)
59+ nr_failed++;
60+ nr_failed;
61+ }))
62+ ),
63+
64+ TP_printk("nr_migrated=%lu nr_failed=%lu",
65+ __entry->nr_migrated,
66+ __entry->nr_failed)
67+)
68+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
69 TRACE_EVENT(mm_compaction_migratepages,
70
71 TP_PROTO(unsigned long nr_migrated,
72@@ -66,7 +109,7 @@ TRACE_EVENT(mm_compaction_migratepages,
73 __entry->nr_migrated,
74 __entry->nr_failed)
75 )
76-
77+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
78
79 #endif /* _TRACE_COMPACTION_H */
80
81--
821.8.1.2
83
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 @@
1Upstream-Status: Backport
2Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
3
4From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001
5From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6Date: Thu, 21 Aug 2014 11:15:50 -0400
7Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1
8
9Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10---
11 instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++-
12 1 file changed, 11 insertions(+), 1 deletion(-)
13
14diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
15index 2354884074eb..3c299c58a1cf 100644
16--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
17+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
18@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn,
19 tp_memcpy(insn,
20 vcpu->arch.emulate_ctxt.decode.fetch.data,
21 15)
22-#else
23+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
24 tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start)
25 tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
26 tp_assign(len, vcpu->arch.emulate_ctxt._eip
27@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn,
28 tp_memcpy(insn,
29 vcpu->arch.emulate_ctxt.fetch.data,
30 15)
31+#else
32+ tp_assign(rip, vcpu->arch.emulate_ctxt._eip -
33+ (vcpu->arch.emulate_ctxt.fetch.ptr -
34+ vcpu->arch.emulate_ctxt.fetch.data))
35+ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
36+ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr -
37+ vcpu->arch.emulate_ctxt.fetch.data)
38+ tp_memcpy(insn,
39+ vcpu->arch.emulate_ctxt.fetch.data,
40+ 15)
41 #endif
42 tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
43 tp_assign(failed, failed)
44--
451.8.1.2
46
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 @@
1Upstream-Status: Backport
2Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
3
4From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001
5From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6Date: Thu, 21 Aug 2014 10:53:12 -0400
7Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking
8
9This Linux upstream commit introduces locking strategy back and forth:
10
11commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
12Author: Eric W. Biederman <ebiederm@xmission.com>
13Date: Mon Feb 3 19:13:49 2014 -0800
14
15 namespaces: Use task_lock and not rcu to protect nsproxy
16
17Use the task lock starting from kernel 3.17 rather than RCU to access
18the task nsproxy.
19
20Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
21---
22 lttng-statedump-impl.c | 15 +++++++++++++++
23 1 file changed, 15 insertions(+)
24
25diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
26index dad51ddaa250..e4caa488e436 100644
27--- a/lttng-statedump-impl.c
28+++ b/lttng-statedump-impl.c
29@@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session)
30 }
31 #endif
32
33+/*
34+ * Called with task lock held.
35+ */
36 static
37 void lttng_statedump_process_ns(struct lttng_session *session,
38 struct task_struct *p,
39@@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session,
40 struct nsproxy *proxy;
41 struct pid_namespace *pid_ns;
42
43+ /*
44+ * Back and forth on locking strategy within Linux upstream for nsproxy.
45+ * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
46+ * "namespaces: Use task_lock and not rcu to protect nsproxy"
47+ * for details.
48+ */
49+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
50 rcu_read_lock();
51 proxy = task_nsproxy(p);
52+#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
53+ proxy = p->nsproxy;
54+#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
55 if (proxy) {
56 pid_ns = lttng_get_proxy_pid_ns(proxy);
57 do {
58@@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session,
59 trace_lttng_statedump_process_state(session,
60 p, type, mode, submode, status, NULL);
61 }
62+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
63 rcu_read_unlock();
64+#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
65 }
66
67 static
68--
691.8.1.2
70
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 @@
1From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Sun, 13 Jul 2014 13:27:01 -0400
4Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel
5
6Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7---
8 instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++
9 1 file changed, 39 insertions(+)
10
11diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h
12index 1fd50ba7c235..0b4aa56761dc 100644
13--- a/instrumentation/events/lttng-module/vmscan.h
14+++ b/instrumentation/events/lttng-module/vmscan.h
15@@ -238,6 +238,44 @@ TRACE_EVENT(mm_shrink_slab_start,
16 __entry->total_scan)
17 )
18
19+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
20+TRACE_EVENT(mm_shrink_slab_end,
21+ TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
22+ long unused_scan_cnt, long new_scan_cnt, long total_scan),
23+
24+ TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
25+ total_scan),
26+
27+ TP_STRUCT__entry(
28+ __field(struct shrinker *, shr)
29+ __field(int, nid)
30+ __field(void *, shrink)
31+ __field(long, unused_scan)
32+ __field(long, new_scan)
33+ __field(int, retval)
34+ __field(long, total_scan)
35+ ),
36+
37+ TP_fast_assign(
38+ tp_assign(shr, shr)
39+ tp_assign(nid, nid)
40+ tp_assign(shrink, shr->scan_objects)
41+ tp_assign(unused_scan, unused_scan_cnt)
42+ tp_assign(new_scan, new_scan_cnt)
43+ tp_assign(retval, shrinker_retval)
44+ tp_assign(total_scan, total_scan)
45+ ),
46+
47+ TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
48+ __entry->shrink,
49+ __entry->shr,
50+ __entry->nid,
51+ __entry->unused_scan,
52+ __entry->new_scan,
53+ __entry->total_scan,
54+ __entry->retval)
55+)
56+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
57 TRACE_EVENT(mm_shrink_slab_end,
58 TP_PROTO(struct shrinker *shr, int shrinker_retval,
59 long unused_scan_cnt, long new_scan_cnt),
60@@ -274,6 +312,7 @@ TRACE_EVENT(mm_shrink_slab_end,
61 __entry->total_scan,
62 __entry->retval)
63 )
64+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
65 #endif
66
67 DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
68--
691.8.1.2
70
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 @@
1Upstream-Status: Pending
2
3In 3.14, bi_sector and bi_size were moved into an iterator, thus
4breaking any tracepoints that still expect them in the bio. Fix up
5the lttng-module tracepoints to use the new scheme when the kernel
6version is >= 3.14.
7
8Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
9
10diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h
11index f3b8bff..0a61543 100644
12--- a/instrumentation/events/lttng-module/block.h
13+++ b/instrumentation/events/lttng-module/block.h
14@@ -341,9 +341,15 @@ TRACE_EVENT(block_bio_bounce,
15 TP_fast_assign(
16 tp_assign(dev, bio->bi_bdev ?
17 bio->bi_bdev->bd_dev : 0)
18+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
19+ tp_assign(sector, bio->bi_iter.bi_sector)
20+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
21+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
22+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
23 tp_assign(sector, bio->bi_sector)
24 tp_assign(nr_sector, bio->bi_size >> 9)
25 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
26+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
27 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
28 ),
29
30@@ -385,14 +391,24 @@ TRACE_EVENT(block_bio_complete,
31
32 TP_fast_assign(
33 tp_assign(dev, bio->bi_bdev->bd_dev)
34+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
35+ tp_assign(sector, bio->bi_iter.bi_sector)
36+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
37+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
38 tp_assign(sector, bio->bi_sector)
39 tp_assign(nr_sector, bio->bi_size >> 9)
40+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
41+
42 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
43 tp_assign(error, error)
44 #else
45 tp_assign(error, 0)
46 #endif
47+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
48+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
49+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
50 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
51+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
52 ),
53
54 TP_printk("%d,%d %s %llu + %u [%d]",
55@@ -419,9 +435,15 @@ DECLARE_EVENT_CLASS(block_bio_merge,
56
57 TP_fast_assign(
58 tp_assign(dev, bio->bi_bdev->bd_dev)
59+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
60+ tp_assign(sector, bio->bi_iter.bi_sector)
61+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
62+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
63+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
64 tp_assign(sector, bio->bi_sector)
65 tp_assign(nr_sector, bio->bi_size >> 9)
66 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
67+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
68 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
69 ),
70
71@@ -485,9 +507,15 @@ TRACE_EVENT(block_bio_queue,
72
73 TP_fast_assign(
74 tp_assign(dev, bio->bi_bdev->bd_dev)
75+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
76+ tp_assign(sector, bio->bi_iter.bi_sector)
77+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
78+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
79+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
80 tp_assign(sector, bio->bi_sector)
81 tp_assign(nr_sector, bio->bi_size >> 9)
82 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
83+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
84 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
85 ),
86
87@@ -513,9 +541,15 @@ DECLARE_EVENT_CLASS(block_bio,
88
89 TP_fast_assign(
90 tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0)
91+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
92+ tp_assign(sector, bio->bi_iter.bi_sector)
93+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
94+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
95+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
96 tp_assign(sector, bio->bi_sector)
97 tp_assign(nr_sector, bio->bi_size >> 9)
98 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
99+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
100 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
101 ),
102
103@@ -587,10 +621,17 @@ DECLARE_EVENT_CLASS(block_get_rq,
104
105 TP_fast_assign(
106 tp_assign(dev, bio ? bio->bi_bdev->bd_dev : 0)
107+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
108+ tp_assign(sector, bio ? bio->bi_iter.bi_sector : 0)
109+ tp_assign(nr_sector, bio ? bio->bi_iter.bi_size >> 9 : 0)
110+ blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0,
111+ bio ? bio->bi_iter.bi_size >> 9 : 0)
112+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
113 tp_assign(sector, bio ? bio->bi_sector : 0)
114 tp_assign(nr_sector, bio ? bio->bi_size >> 9 : 0)
115 blk_fill_rwbs(rwbs, bio ? bio->bi_rw : 0,
116 bio ? bio->bi_size >> 9 : 0)
117+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
118 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
119 ),
120
121@@ -759,9 +800,15 @@ TRACE_EVENT(block_split,
122
123 TP_fast_assign(
124 tp_assign(dev, bio->bi_bdev->bd_dev)
125+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
126+ tp_assign(sector, bio->bi_iter.bi_sector)
127+ tp_assign(new_sector, new_sector)
128+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
129+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
130 tp_assign(sector, bio->bi_sector)
131 tp_assign(new_sector, new_sector)
132 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
133+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
134 tp_memcpy(comm, current->comm, TASK_COMM_LEN)
135 ),
136
137@@ -805,11 +852,19 @@ TRACE_EVENT(block_remap,
138
139 TP_fast_assign(
140 tp_assign(dev, bio->bi_bdev->bd_dev)
141+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
142+ tp_assign(sector, bio->bi_iter.bi_sector)
143+ tp_assign(nr_sector, bio->bi_iter.bi_size >> 9)
144+ tp_assign(old_dev, dev)
145+ tp_assign(old_sector, from)
146+ blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
147+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
148 tp_assign(sector, bio->bi_sector)
149 tp_assign(nr_sector, bio->bi_size >> 9)
150 tp_assign(old_dev, dev)
151 tp_assign(old_sector, from)
152 blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
153+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
154 ),
155
156 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 @@
1From af48c7b08de4b811d3d974e65e362b86ce8c4a34 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Wed, 10 Dec 2014 03:19:28 -0500
4Subject: [PATCH] compaction: fix mm_compaction_isolate_template build
5
6linux-stable integrated the 3.16 commit f8c9301fa5a2a [mm/compaction: do
7not count migratepages when unnecessary] with the 3.14.25 update.
8
9So we have to update the lttng-module linux version codes to use the
10new definition in builds greater than 3.14.24 or 3.16.
11
12Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
13---
14 instrumentation/events/lttng-module/compaction.h | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h
18index 22024e9ee582..07afbe06f1a6 100644
19--- a/instrumentation/events/lttng-module/compaction.h
20+++ b/instrumentation/events/lttng-module/compaction.h
21@@ -46,7 +46,7 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
22 TP_ARGS(nr_scanned, nr_taken)
23 )
24
25-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
26+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25))
27 TRACE_EVENT(mm_compaction_migratepages,
28
29 TP_PROTO(unsigned long nr_all,
30@@ -87,7 +87,7 @@ TRACE_EVENT(mm_compaction_migratepages,
31 __entry->nr_migrated,
32 __entry->nr_failed)
33 )
34-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
35+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,25)) */
36 TRACE_EVENT(mm_compaction_migratepages,
37
38 TP_PROTO(unsigned long nr_migrated,
39--
402.1.0
41
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 @@
1
2Upstream-Status: Backport
3
4commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e
5Author: Nitin A Kamble <nitin.a.kamble@intel.com>
6Date: Thu Sep 25 18:19:43 2014 -0700
7
8 asoc.h: fix build with v3.17 kernel
9
10 The snd_soc_codec structure has changed in the v3.17 kernel. Some
11 of the redundant fields have been removed. To be specific this commit
12 from the v3.17 kernel causes the build failure for lttng-modules.
13
14 |commit f4333203ec933f9272c90c7add01774ec2cf94d3
15 |Author: Lars-Peter Clausen <lars@metafoo.de>
16 |Date: Mon Jun 16 18:13:02 2014 +0200
17 |
18 | ASoC: Move name and id from CODEC/platform to component
19 |
20 | The component struct already has a name and id field which are initialized to
21 | the same values as the same fields in the CODEC and platform structs. So remove
22 | them from the CODEC and platform structs and used the ones from the component
23 | struct instead.
24 |
25 | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
26 | Signed-off-by: Mark Brown <broonie@linaro.org>
27
28 The asoc.h is changed according to the change in the above kernel commit
29 to fix the lttng-modules build. The change in the lttng-modules code is
30 conditional on the kernel version, so that it does not break builds with
31 previous kernel versions.
32
33 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
34 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
35
36diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h
37index 672bea4..bf9cf86 100644
38--- a/instrumentation/events/lttng-module/asoc.h
39+++ b/instrumentation/events/lttng-module/asoc.h
40@@ -21,6 +21,14 @@ struct snd_soc_card;
41 struct snd_soc_dapm_widget;
42 #endif
43
44+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
45+#define CODEC_NAME_FIELD component.name
46+#define CODEC_ID_FIELD component.id
47+#else
48+#define CODEC_NAME_FIELD name
49+#define CODEC_ID_FIELD id
50+#endif
51+
52 /*
53 * Log register events
54 */
55@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
56 TP_ARGS(codec, reg, val),
57
58 TP_STRUCT__entry(
59- __string( name, codec->name )
60+ __string( name, codec->CODEC_NAME_FIELD )
61 __field( int, id )
62 __field( unsigned int, reg )
63 __field( unsigned int, val )
64 ),
65
66 TP_fast_assign(
67- tp_strcpy(name, codec->name)
68- tp_assign(id, codec->id)
69+ tp_strcpy(name, codec->CODEC_NAME_FIELD)
70+ tp_assign(id, codec->CODEC_ID_FIELD)
71 tp_assign(reg, reg)
72 tp_assign(val, val)
73 ),
74@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
75 TP_ARGS(platform, reg, val),
76
77 TP_STRUCT__entry(
78- __string( name, platform->name )
79+ __string( name, platform->CODEC_NAME_FIELD )
80 __field( int, id )
81 __field( unsigned int, reg )
82 __field( unsigned int, val )
83 ),
84
85 TP_fast_assign(
86- tp_strcpy(name, platform->name)
87- tp_assign(id, platform->id)
88+ tp_strcpy(name, platform->CODEC_NAME_FIELD)
89+ tp_assign(id, platform->CODEC_ID_FIELD)
90 tp_assign(reg, reg)
91 tp_assign(val, val)
92 ),
93@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
94 TP_ARGS(codec, type, status),
95
96 TP_STRUCT__entry(
97- __string( name, codec->name )
98+ __string( name, codec->CODEC_NAME_FIELD )
99 __string( status, status )
100 __string( type, type )
101 __field( int, id )
102 ),
103
104 TP_fast_assign(
105- tp_strcpy(name, codec->name)
106+ tp_strcpy(name, codec->CODEC_NAME_FIELD)
107 tp_strcpy(status, status)
108 tp_strcpy(type, type)
109- tp_assign(id, codec->id)
110+ tp_assign(id, codec->CODEC_ID_FIELD)
111 ),
112
113 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 @@
1This is required in order the make the build succeed for
2machine k2hk-evm, image enea-image-demo.
3
4The patch for commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f is already part of the build.
5It is located here:
6poky/meta-ti/recipes-kernel/linux/linux-keystone-3.10.10/Fix_HRTICK_related_deadlock_from_ntp_lock.patch
7and it is applied for kernel recipe poky/meta-ti/recipes-kernel/linux/linux-keystone_3.10.bb,
8that is the kernel used for k2hk-evm.
9
10In this regard, I removed the check until TI upgrade their
11kernels to a supported version.
12
13Upstream-Status: Not Applicable
14
15Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
16
17---
18--- a/wrapper/trace-clock.h 2014-07-25 15:54:00.677739746 +0200
19+++ b/wrapper/trace-clock.h 2014-07-25 15:55:49.807390266 +0200
20@@ -36,10 +36,6 @@
21 #include "../lttng-kernel-version.h"
22 #include "random.h"
23
24-#if LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3)
25-#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."
26-#endif
27-
28 static inline u64 trace_clock_monotonic_wrapper(void)
29 {
30 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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3lttng-modules: replace KERNELDIR with KERNEL_SRC
4
5Since lttng-modules uses the default way of module.bbclass to
6build and install lttng-modules, we do this replacement for
7it as-is.
8
9Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
10
11diff --git a/Makefile b/Makefile
12index a9d1cb1..c1b65b9 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -43,19 +43,19 @@ obj-m += lib/
16 endif # CONFIG_TRACEPOINTS
17
18 else # KERNELRELEASE
19- KERNELDIR ?= /lib/modules/$(shell uname -r)/build
20+ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
21 PWD := $(shell pwd)
22 CFLAGS = $(EXTCFLAGS)
23
24 default:
25- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
26+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
27
28 modules_install:
29- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
30+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install
31
32 clean:
33- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
34+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
35
36 %.i: %.c
37- $(MAKE) -C $(KERNELDIR) M=$(PWD) $@
38+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $@
39 endif # KERNELRELEASE
40diff --git a/README b/README
41index 8c5dd46..6bd3334 100644
42--- a/README
43+++ b/README
44@@ -27,8 +27,8 @@ access to your full kernel source tree), and use:
45 If you need to specify the target directory to the kernel you want to build
46 against, use:
47
48-% KERNELDIR=path_to_kernel_dir make
49-# KERNELDIR=path_to_kernel_dir make modules_install
50+% KERNEL_SRC=path_to_kernel_dir make
51+# KERNEL_SRC=path_to_kernel_dir make modules_install
52 # depmod -a kernel_version
53
54 Use lttng-tools to control the tracer. LTTng tools should automatically load
55diff --git a/probes/Makefile b/probes/Makefile
56index 225803c..3449866 100644
57--- a/probes/Makefile
58+++ b/probes/Makefile
59@@ -212,18 +212,18 @@ endif
60 endif
61
62 else
63- KERNELDIR ?= /lib/modules/$(shell uname -r)/build
64+ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
65 PWD := $(shell pwd)
66 CFLAGS = $(EXTCFLAGS)
67
68 default:
69- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
70+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
71
72 modules_install:
73- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
74+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install
75 /sbin/depmod -a
76
77 clean:
78- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
79+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
80
81 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 @@
1SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
3DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
4LICENSE = "LGPLv2.1 & GPLv2 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
6 file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
7 file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
8
9DEPENDS = "virtual/kernel"
10
11inherit module
12
13SRCREV = "789fd1d06d07aeb9a403bdce1b3318560cfc6eca"
14
15COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux'
16
17SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
18 file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
19 file://Update-compaction-instrumentation-to-3.16-kernel.patch \
20 file://Update-vmscan-instrumentation-to-3.16-kernel.patch \
21 file://lttng-modules-remove-kernel-version-check.patch \
22 file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
23 file://Update-statedump-to-3.17-nsproxy-locking.patch \
24 file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
25 file://fix_build_with_v3.17_kernel.patch \
26 file://compaction-fix-mm_compaction_isolate_template-build.patch \
27 "
28
29export INSTALL_MOD_DIR="kernel/lttng-modules"
30export KERNEL_SRC="${STAGING_KERNEL_DIR}"
31
32
33S = "${WORKDIR}/git"
34
35do_install_append() {
36 # Delete empty directories to avoid QA failures if no modules were built
37 find ${D}/lib -depth -type d -empty -exec rmdir {} \;
38}
39
40python do_package_prepend() {
41 if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')):
42 bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True))
43}
44
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 @@
1#!/bin/sh
2
3make -C tests installcheck
4
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 @@
1diff --git a/Makefile.am b/Makefile.am
2index 584f59b..c2bcabd 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \
6 dist_noinst_DATA = CodingStyle
7
8 EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt
9+
10+install-ptest:
11+ cp -r $(srcdir)/tests $(DESTDIR)
12+ for m in $$(find $(DESTDIR)/tests -name Makefile); do \
13+ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \
14+ done
15diff --git a/tests/run.sh b/tests/run.sh
16index c6c50fd..6455359 100755
17--- a/tests/run.sh
18+++ b/tests/run.sh
19@@ -19,4 +19,7 @@
20
21 [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
22
23-prove --merge --exec '' - < $1
24+prove --merge -v --exec '' - < $1 | sed \
25+ -e 's|^ok \(.*\)|PASS: \1|' \
26+ -e 's|^not ok \(.*\)|FAIL: \1|' \
27+ | 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 @@
1diff --git a/Makefile.am b/Makefile.am
2index 584f59b..c2bcabd 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \
6 dist_noinst_DATA = CodingStyle
7
8 EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt
9+
10+install-ptest:
11+ cp -r $(srcdir)/tests $(DESTDIR)
12+ for m in $$(find $(DESTDIR)/tests -name Makefile); do \
13+ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \
14+ done
15diff --git a/tests/Makefile.am b/tests/Makefile.am
16index 6d5b00d..3774f9d 100644
17--- a/tests/Makefile.am
18+++ b/tests/Makefile.am
19@@ -1,14 +1,17 @@
20 SUBDIRS = utils regression unit stress
21
22-if USE_PYTHON
23-check-am:
24+installcheck-am:
25 ./run.sh unit_tests
26 ./run.sh fast_regression
27+if USE_PYTHON
28 ./run.sh with_bindings_regression
29-else
30+endif
31+
32 check-am:
33 ./run.sh unit_tests
34 ./run.sh fast_regression
35+if USE_PYTHON
36+ ./run.sh with_bindings_regression
37 endif
38
39 dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression
40diff --git a/tests/run.sh b/tests/run.sh
41index c6c50fd..6455359 100755
42--- a/tests/run.sh
43+++ b/tests/run.sh
44@@ -19,4 +19,7 @@
45
46 [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
47
48-prove --merge --exec '' - < $1
49+prove --merge -v --exec '' - < $1 | sed \
50+ -e 's|^ok \(.*\)|PASS: \1|' \
51+ -e 's|^not ok \(.*\)|FAIL: \1|' \
52+ | 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 @@
1SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit Control"
3DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
4to extract program execution details from the Linux operating system \
5and interpret them."
6
7LICENSE = "GPLv2 & LGPLv2.1"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
9 file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
11
12DEPENDS = "liburcu popt lttng-ust libxml2"
13RDEPENDS_${PN}-ptest += "make perl bash"
14
15SRCREV = "8b27cacb277c2cdab791139b08da8eb87ab14a88"
16PV = "v2.5.0"
17
18PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
19 am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
20 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
21"
22PACKAGECONFIG ??= "lttng-ust"
23PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
24PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust"
25
26SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \
27 file://runtest-2.4.0.patch \
28 file://run-ptest \
29 "
30
31S = "${WORKDIR}/git"
32
33inherit autotools-brokensep ptest pkgconfig
34
35export KERNELDIR="${STAGING_KERNEL_DIR}"
36
37FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
38 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
39FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \
40 ${libdir}/python2.7/site-packages/.debug"
41FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
42FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
43
44# Since files are installed into ${libdir}/lttng/libexec we match
45# the libexec insane test so skip it.
46# Python module needs to keep _lttng.so
47INSANE_SKIP_${PN} = "libexec dev-so"
48INSANE_SKIP_${PN}-dbg = "libexec"
49
50do_configure_prepend () {
51 # Delete a shipped m4 file that overrides our patched one
52 rm -f ${S}/config/libxml.m4
53}
54
55do_install_ptest () {
56 chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
57 for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
58 sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
59 -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
60 -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
61 -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
62 -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
63 -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
64 -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
65 -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
66 -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
67 -i $i
68 done
69
70 sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
71 -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
72 -i ${D}${PTEST_PATH}/tests/regression/run-report.py
73 sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
74 -i ${D}${PTEST_PATH}/tests/utils/utils.sh
75 sed -e "s:ini_config:\.libs\/ini_config:" \
76 -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
77}
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 @@
1diff --git a/configure.ac b/configure.ac
2index f507883..40a57d8 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -194,6 +194,8 @@ changequote([,])dnl
6 s390) NO_UNALIGNED_ACCESS=1 ;;
7 s390x) NO_UNALIGNED_ACCESS=1 ;;
8 arm*) NO_UNALIGNED_ACCESS=1 ;;
9+ aarch64) NO_UNALIGNED_ACCESS=1 ;;
10+ aarch64_be) NO_UNALIGNED_ACCESS=1 ;;
11 mips*) NO_UNALIGNED_ACCESS=1 ;;
12 tile*) NO_UNALIGNED_ACCESS=1 ;;
13 *) 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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Don't build the doc examples - we don't need them and in fact they
4never successfully built in previous iterations of the lttng-ust
5recipe anyway.
6
7Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
8
9Index: doc/Makefile.am
10===================================================================
11--- a/doc/Makefile.am
12+++ b/doc/Makefile.am
13@@ -1,4 +1,4 @@
14-SUBDIRS = . examples
15+SUBDIRS = .
16
17 dist_man_MANS = man/lttng-gen-tp.1 \
18 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 @@
1SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x"
2DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes."
3HOMEPAGE = "http://lttng.org/ust"
4BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
5
6LICENSE = "LGPLv2.1+ & MIT & GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
8 file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
9 file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
10
11inherit autotools lib_package
12
13DEPENDS = "liburcu util-linux"
14RDEPENDS_${PN}-bin = "python-core"
15
16# For backwards compatibility after rename
17RPROVIDES_${PN} = "lttng2-ust"
18RREPLACES_${PN} = "lttng2-ust"
19RCONFLICTS_${PN} = "lttng2-ust"
20
21SRCREV = "ce59a997afdb7dc8af02b464430bb7e35549fa66"
22PV = "2.5.0"
23PE = "2"
24
25SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \
26 file://lttng-ust-doc-examples-disable.patch \
27 file://add-aarch64.patch \
28 "
29
30S = "${WORKDIR}/git"
31
32do_configure_prepend () {
33 ( cd ${S}; ${S}/bootstrap )
34}