]>
Commit | Line | Data |
---|---|---|
802e7a46 JR |
1 | From 8b83133133cfa305193f093ceba28a95d31381eb Mon Sep 17 00:00:00 2001 |
2 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
3 | Date: Thu, 19 Mar 2015 12:55:48 -0400 | |
4 | Subject: [PATCH] Fix: kmem instrumentation: mm_page_alloc extfrag | |
5 | change_ownership field | |
6 | ||
7 | Linux kernel 3.12.30 and onward changes the parameter received by this | |
8 | callback. It's the same type, but the meaning differs. This is why it | |
9 | did compile fine, but the data gathered did not really represent | |
10 | change_ownership. | |
11 | ||
12 | This change has been introduced in the Linux kernel by this commit: | |
13 | ||
14 | commit 52c8f6a5aeb0bdd396849ecaa72d96f8175528f5 | |
15 | Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | |
16 | Date: Tue Nov 12 15:08:19 2013 -0800 | |
17 | ||
18 | mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag() | |
19 | ||
20 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
21 | --- | |
22 | instrumentation/events/lttng-module/kmem.h | 44 +++++++++++++++++++++++++++++- | |
23 | 1 file changed, 43 insertions(+), 1 deletion(-) | |
24 | ||
25 | diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h | |
26 | index 203a19c..cde2a20 100644 | |
27 | --- a/instrumentation/events/lttng-module/kmem.h | |
28 | +++ b/instrumentation/events/lttng-module/kmem.h | |
29 | @@ -286,7 +286,49 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain, | |
30 | __entry->order, __entry->migratetype) | |
31 | ) | |
32 | ||
33 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
34 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30)) | |
35 | + | |
36 | +LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag, | |
37 | + | |
38 | + TP_PROTO(struct page *page, | |
39 | + int alloc_order, int fallback_order, | |
40 | + int alloc_migratetype, int fallback_migratetype, int new_migratetype), | |
41 | + | |
42 | + TP_ARGS(page, | |
43 | + alloc_order, fallback_order, | |
44 | + alloc_migratetype, fallback_migratetype, new_migratetype), | |
45 | + | |
46 | + TP_STRUCT__entry( | |
47 | + __field_hex( struct page *, page ) | |
48 | + __field( int, alloc_order ) | |
49 | + __field( int, fallback_order ) | |
50 | + __field( int, alloc_migratetype ) | |
51 | + __field( int, fallback_migratetype ) | |
52 | + __field( int, change_ownership ) | |
53 | + ), | |
54 | + | |
55 | + TP_fast_assign( | |
56 | + tp_assign(page, page) | |
57 | + tp_assign(alloc_order, alloc_order) | |
58 | + tp_assign(fallback_order, fallback_order) | |
59 | + tp_assign(alloc_migratetype, alloc_migratetype) | |
60 | + tp_assign(fallback_migratetype, fallback_migratetype) | |
61 | + tp_assign(change_ownership, (new_migratetype == alloc_migratetype)) | |
62 | + ), | |
63 | + | |
64 | + 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", | |
65 | + __entry->page, | |
66 | + page_to_pfn(__entry->page), | |
67 | + __entry->alloc_order, | |
68 | + __entry->fallback_order, | |
69 | + pageblock_order, | |
70 | + __entry->alloc_migratetype, | |
71 | + __entry->fallback_migratetype, | |
72 | + __entry->fallback_order < pageblock_order, | |
73 | + __entry->change_ownership) | |
74 | +) | |
75 | + | |
76 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) | |
77 | ||
78 | LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag, | |
79 | ||
80 | From 2cf0c2ca8759ed6103b5aab149efea34e6986818 Mon Sep 17 00:00:00 2001 | |
81 | From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
82 | Date: Thu, 19 Mar 2015 13:02:38 -0400 | |
83 | Subject: [PATCH] Fix: kmem instrumentation update for mm_page_alloc_extfrag | |
84 | kernel 3.19.2+ | |
85 | ||
86 | This commit introduces an API change for mm_page_alloc_extfrag | |
87 | instrumentation: | |
88 | ||
89 | commit cdf476685b5c9dcd20f0305791bd60212cace25d | |
90 | Author: Vlastimil Babka <vbabka@suse.cz> | |
91 | Date: Wed Feb 11 15:28:15 2015 -0800 | |
92 | ||
93 | mm: when stealing freepages, also take pages created by splitting buddy page | |
94 | ||
95 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
96 | --- | |
97 | instrumentation/events/lttng-module/kmem.h | 45 +++++++++++++++++++++++++++++- | |
98 | 1 file changed, 44 insertions(+), 1 deletion(-) | |
99 | ||
100 | diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h | |
101 | index cde2a20..3782ac6 100644 | |
102 | --- a/instrumentation/events/lttng-module/kmem.h | |
103 | +++ b/instrumentation/events/lttng-module/kmem.h | |
104 | @@ -286,7 +286,50 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain, | |
105 | __entry->order, __entry->migratetype) | |
106 | ) | |
107 | ||
108 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30)) | |
7b1cb810 | 109 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)) || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) |
802e7a46 JR |
110 | + |
111 | +LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag, | |
112 | + | |
113 | + TP_PROTO(struct page *page, | |
114 | + int alloc_order, int fallback_order, | |
115 | + int alloc_migratetype, int fallback_migratetype), | |
116 | + | |
117 | + TP_ARGS(page, | |
118 | + alloc_order, fallback_order, | |
119 | + alloc_migratetype, fallback_migratetype), | |
120 | + | |
121 | + TP_STRUCT__entry( | |
122 | + __field_hex( struct page *, page ) | |
123 | + __field( int, alloc_order ) | |
124 | + __field( int, fallback_order ) | |
125 | + __field( int, alloc_migratetype ) | |
126 | + __field( int, fallback_migratetype ) | |
127 | + __field( int, change_ownership ) | |
128 | + ), | |
129 | + | |
130 | + TP_fast_assign( | |
131 | + tp_assign(page, page) | |
132 | + tp_assign(alloc_order, alloc_order) | |
133 | + tp_assign(fallback_order, fallback_order) | |
134 | + tp_assign(alloc_migratetype, alloc_migratetype) | |
135 | + tp_assign(fallback_migratetype, fallback_migratetype) | |
136 | + tp_assign(change_ownership, | |
137 | + (alloc_migratetype == get_pageblock_migratetype(page))) | |
138 | + ), | |
139 | + | |
140 | + 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", | |
141 | + __entry->page, | |
142 | + page_to_pfn(__entry->page), | |
143 | + __entry->alloc_order, | |
144 | + __entry->fallback_order, | |
145 | + pageblock_order, | |
146 | + __entry->alloc_migratetype, | |
147 | + __entry->fallback_migratetype, | |
148 | + __entry->fallback_order < pageblock_order, | |
149 | + __entry->change_ownership) | |
150 | +) | |
151 | + | |
152 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30)) | |
153 | ||
154 | LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag, | |
155 |