diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-kernel/lttng/lttng-modules | |
download | poky-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/lttng-modules')
10 files changed, 820 insertions, 0 deletions
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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Fri, 25 Jul 2014 12:30:43 -0400 | ||
7 | Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event | ||
8 | length | ||
9 | |||
10 | A noargs probe could have event fields. noargs just means that the probe | ||
11 | does not receive any argument as parameter. However, it could very well | ||
12 | serialize data into fields (global variables, constants, etc). | ||
13 | |||
14 | It just happens that LTTng does not serialize any data in noargs events | ||
15 | at the moment, but this may very well change. | ||
16 | |||
17 | The if (0) with (void) variable access strategy to stop compiler from | ||
18 | complaining from unused variables does not seem to work as expected with | ||
19 | gcc 4.9.1. Use "unused" attribute instead. | ||
20 | |||
21 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
22 | --- | ||
23 | probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++-------------- | ||
24 | 1 file changed, 35 insertions(+), 14 deletions(-) | ||
25 | |||
26 | diff --git a/probes/lttng-events.h b/probes/lttng-events.h | ||
27 | index 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 | -- | ||
129 | 1.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 @@ | |||
1 | From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Sun, 13 Jul 2014 13:33:21 -0400 | ||
4 | Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel | ||
5 | |||
6 | Signed-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 | |||
11 | diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h | ||
12 | index 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 | -- | ||
82 | 1.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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Thu, 21 Aug 2014 11:15:50 -0400 | ||
7 | Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1 | ||
8 | |||
9 | Signed-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 | |||
14 | diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
15 | index 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 | -- | ||
45 | 1.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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | |||
4 | From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001 | ||
5 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
6 | Date: Thu, 21 Aug 2014 10:53:12 -0400 | ||
7 | Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking | ||
8 | |||
9 | This Linux upstream commit introduces locking strategy back and forth: | ||
10 | |||
11 | commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 | ||
12 | Author: Eric W. Biederman <ebiederm@xmission.com> | ||
13 | Date: Mon Feb 3 19:13:49 2014 -0800 | ||
14 | |||
15 | namespaces: Use task_lock and not rcu to protect nsproxy | ||
16 | |||
17 | Use the task lock starting from kernel 3.17 rather than RCU to access | ||
18 | the task nsproxy. | ||
19 | |||
20 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
21 | --- | ||
22 | lttng-statedump-impl.c | 15 +++++++++++++++ | ||
23 | 1 file changed, 15 insertions(+) | ||
24 | |||
25 | diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c | ||
26 | index 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 | -- | ||
69 | 1.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 @@ | |||
1 | From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
3 | Date: Sun, 13 Jul 2014 13:27:01 -0400 | ||
4 | Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel | ||
5 | |||
6 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
7 | --- | ||
8 | instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++ | ||
9 | 1 file changed, 39 insertions(+) | ||
10 | |||
11 | diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h | ||
12 | index 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 | -- | ||
69 | 1.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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | In 3.14, bi_sector and bi_size were moved into an iterator, thus | ||
4 | breaking any tracepoints that still expect them in the bio. Fix up | ||
5 | the lttng-module tracepoints to use the new scheme when the kernel | ||
6 | version is >= 3.14. | ||
7 | |||
8 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
9 | |||
10 | diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h | ||
11 | index 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 @@ | |||
1 | From af48c7b08de4b811d3d974e65e362b86ce8c4a34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Wed, 10 Dec 2014 03:19:28 -0500 | ||
4 | Subject: [PATCH] compaction: fix mm_compaction_isolate_template build | ||
5 | |||
6 | linux-stable integrated the 3.16 commit f8c9301fa5a2a [mm/compaction: do | ||
7 | not count migratepages when unnecessary] with the 3.14.25 update. | ||
8 | |||
9 | So we have to update the lttng-module linux version codes to use the | ||
10 | new definition in builds greater than 3.14.24 or 3.16. | ||
11 | |||
12 | Signed-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 | |||
17 | diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h | ||
18 | index 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 | -- | ||
40 | 2.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 | |||
2 | Upstream-Status: Backport | ||
3 | |||
4 | commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e | ||
5 | Author: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
6 | Date: 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 | |||
36 | diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h | ||
37 | index 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 @@ | |||
1 | This is required in order the make the build succeed for | ||
2 | machine k2hk-evm, image enea-image-demo. | ||
3 | |||
4 | The patch for commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f is already part of the build. | ||
5 | It is located here: | ||
6 | poky/meta-ti/recipes-kernel/linux/linux-keystone-3.10.10/Fix_HRTICK_related_deadlock_from_ntp_lock.patch | ||
7 | and it is applied for kernel recipe poky/meta-ti/recipes-kernel/linux/linux-keystone_3.10.bb, | ||
8 | that is the kernel used for k2hk-evm. | ||
9 | |||
10 | In this regard, I removed the check until TI upgrade their | ||
11 | kernels to a supported version. | ||
12 | |||
13 | Upstream-Status: Not Applicable | ||
14 | |||
15 | Signed-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 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | lttng-modules: replace KERNELDIR with KERNEL_SRC | ||
4 | |||
5 | Since lttng-modules uses the default way of module.bbclass to | ||
6 | build and install lttng-modules, we do this replacement for | ||
7 | it as-is. | ||
8 | |||
9 | Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com> | ||
10 | |||
11 | diff --git a/Makefile b/Makefile | ||
12 | index 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 | ||
40 | diff --git a/README b/README | ||
41 | index 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 | ||
55 | diff --git a/probes/Makefile b/probes/Makefile | ||
56 | index 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 | ||