Explorar el Código

lttng-modules: fix build on recent kernels

Signed-off-by: Nicolas Thill <nico@openwrt.org>
Nicolas Thill hace 9 años
padre
commit
b06712cdec

+ 1
- 1
devel/lttng-modules/Makefile Ver fichero

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=lttng-modules
11 11
 PKG_VERSION:=2.6.0
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 15
 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/

+ 98
- 0
devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch Ver fichero

@@ -0,0 +1,98 @@
1
+--- a/instrumentation/events/lttng-module/kmem.h
2
++++ b/instrumentation/events/lttng-module/kmem.h
3
+@@ -286,7 +286,94 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm
4
+ 		__entry->order, __entry->migratetype)
5
+ )
6
+ 
7
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
8
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)	\
9
++	|| LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \
10
++	|| LTTNG_KERNEL_RANGE(3,14,36, 3,15,0))
11
++
12
++LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
13
++
14
++	TP_PROTO(struct page *page,
15
++		int alloc_order, int fallback_order,
16
++		int alloc_migratetype, int fallback_migratetype),
17
++
18
++	TP_ARGS(page,
19
++		alloc_order, fallback_order,
20
++		alloc_migratetype, fallback_migratetype),
21
++
22
++	TP_STRUCT__entry(
23
++		__field_hex(	struct page *,	page			)
24
++		__field(	int,		alloc_order		)
25
++		__field(	int,		fallback_order		)
26
++		__field(	int,		alloc_migratetype	)
27
++		__field(	int,		fallback_migratetype	)
28
++		__field(	int,		change_ownership	)
29
++	),
30
++
31
++	TP_fast_assign(
32
++		tp_assign(page, page)
33
++		tp_assign(alloc_order, alloc_order)
34
++		tp_assign(fallback_order, fallback_order)
35
++		tp_assign(alloc_migratetype, alloc_migratetype)
36
++		tp_assign(fallback_migratetype, fallback_migratetype)
37
++		tp_assign(change_ownership,
38
++			(alloc_migratetype == get_pageblock_migratetype(page)))
39
++	),
40
++
41
++	TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
42
++		__entry->page,
43
++		page_to_pfn(__entry->page),
44
++		__entry->alloc_order,
45
++		__entry->fallback_order,
46
++		pageblock_order,
47
++		__entry->alloc_migratetype,
48
++		__entry->fallback_migratetype,
49
++		__entry->fallback_order < pageblock_order,
50
++		__entry->change_ownership)
51
++)
52
++
53
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
54
++
55
++LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
56
++
57
++	TP_PROTO(struct page *page,
58
++		int alloc_order, int fallback_order,
59
++		int alloc_migratetype, int fallback_migratetype, int new_migratetype),
60
++
61
++	TP_ARGS(page,
62
++		alloc_order, fallback_order,
63
++		alloc_migratetype, fallback_migratetype, new_migratetype),
64
++
65
++	TP_STRUCT__entry(
66
++		__field_hex(	struct page *,	page			)
67
++		__field(	int,		alloc_order		)
68
++		__field(	int,		fallback_order		)
69
++		__field(	int,		alloc_migratetype	)
70
++		__field(	int,		fallback_migratetype	)
71
++		__field(	int,		change_ownership	)
72
++	),
73
++
74
++	TP_fast_assign(
75
++		tp_assign(page, page)
76
++		tp_assign(alloc_order, alloc_order)
77
++		tp_assign(fallback_order, fallback_order)
78
++		tp_assign(alloc_migratetype, alloc_migratetype)
79
++		tp_assign(fallback_migratetype, fallback_migratetype)
80
++		tp_assign(change_ownership, (new_migratetype == alloc_migratetype))
81
++	),
82
++
83
++	TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
84
++		__entry->page,
85
++		page_to_pfn(__entry->page),
86
++		__entry->alloc_order,
87
++		__entry->fallback_order,
88
++		pageblock_order,
89
++		__entry->alloc_migratetype,
90
++		__entry->fallback_migratetype,
91
++		__entry->fallback_order < pageblock_order,
92
++		__entry->change_ownership)
93
++)
94
++
95
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
96
+ 
97
+ LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
98
+