1 diff -ur lttng-modules-2.12.3/instrumentation/events/lttng-module/btrfs.h lttng-modules-2.12.3-256/instrumentation/events/lttng-module/btrfs.h
2 --- lttng-modules-2.12.3/instrumentation/events/lttng-module/btrfs.h 2021-02-06 21:03:51.283444240 +0100
3 +++ lttng-modules-2.12.3-256/instrumentation/events/lttng-module/btrfs.h 2021-02-06 21:03:58.556816159 +0100
8 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
9 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
11 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
17 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
18 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
20 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
26 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
27 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
29 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
30 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
32 TP_ARGS(fs_info, map, offset, size)
35 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
36 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
38 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
41 TP_ARGS(root, map, offset, size)
44 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
45 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
47 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
50 TP_ARGS(root, map, offset, size)
53 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
54 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
56 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
57 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
59 TP_ARGS(fs_info, start, len)
62 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
63 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
65 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
68 TP_ARGS(root, start, len)
71 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
72 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
74 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
77 TP_ARGS(root, start, len)
80 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
81 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
83 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
84 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
89 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
90 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
92 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
95 TP_ARGS(fs_info, block_group, start, len)
98 -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
99 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
101 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
103 @@ -2270,7 +2270,7 @@
104 TP_ARGS(root, block_group, start, len)
107 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
108 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
110 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
111 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
112 diff -ur lttng-modules-2.12.3/instrumentation/events/lttng-module/kvm.h lttng-modules-2.12.3-256/instrumentation/events/lttng-module/kvm.h
113 --- lttng-modules-2.12.3/instrumentation/events/lttng-module/kvm.h 2020-10-05 22:04:55.000000000 +0200
114 +++ lttng-modules-2.12.3-256/instrumentation/events/lttng-module/kvm.h 2021-02-06 21:03:58.556816159 +0100
115 @@ -101,14 +101,14 @@
116 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \
117 || LTTNG_KERNEL_RANGE(4,14,14, 4,15,0) \
118 || LTTNG_DEBIAN_KERNEL_RANGE(4,14,13,0,1,0, 4,15,0,0,0,0) \
119 - || LTTNG_KERNEL_RANGE(4,9,77, 4,10,0) \
120 + || LTTNG_KERNEL_RANGE(4,9,77, 4,11,0) \
121 || LTTNG_KERNEL_RANGE(4,4,112, 4,5,0) \
122 || LTTNG_KERNEL_RANGE(4,1,50, 4,2,0) \
123 || LTTNG_KERNEL_RANGE(3,16,52, 3,17,0) \
124 || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,144, 3,14,0,0) \
125 || LTTNG_KERNEL_RANGE(3,2,97, 3,3,0) \
126 || LTTNG_UBUNTU_KERNEL_RANGE(4,13,16,38, 4,14,0,0) \
127 - || LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0) \
128 + || LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,11,0,0,0,0) \
129 || LTTNG_FEDORA_KERNEL_RANGE(4,14,13,300, 4,15,0,0))
131 LTTNG_TRACEPOINT_EVENT(kvm_mmio,
132 diff -ur lttng-modules-2.12.3/instrumentation/events/lttng-module/sched.h lttng-modules-2.12.3-256/instrumentation/events/lttng-module/sched.h
133 --- lttng-modules-2.12.3/instrumentation/events/lttng-module/sched.h 2020-10-05 22:04:55.000000000 +0200
134 +++ lttng-modules-2.12.3-256/instrumentation/events/lttng-module/sched.h 2021-02-06 21:03:58.556816159 +0100
138 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) || \
139 - LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
140 + LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,11,0,0) || \
141 LTTNG_RT_KERNEL_RANGE(4,11,5,1, 4,12,0,0))
143 * Tracepoint for showing priority inheritance modifying a tasks
144 diff -ur lttng-modules-2.12.3/instrumentation/events/lttng-module/timer.h lttng-modules-2.12.3-256/instrumentation/events/lttng-module/timer.h
145 --- lttng-modules-2.12.3/instrumentation/events/lttng-module/timer.h 2020-10-05 22:03:52.000000000 +0200
146 +++ lttng-modules-2.12.3-256/instrumentation/events/lttng-module/timer.h 2021-02-06 21:03:58.556816159 +0100
149 #endif /* _TRACE_TIMER_DEF_ */
151 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
152 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
153 #define lttng_ktime_get_tv64(kt) (kt)
154 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
155 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
156 #define lttng_ktime_get_tv64(kt) ((kt).tv64)
157 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
158 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
160 LTTNG_TRACEPOINT_EVENT_CLASS(timer_class,
162 diff -ur lttng-modules-2.12.3/instrumentation/events/lttng-module/writeback.h lttng-modules-2.12.3-256/instrumentation/events/lttng-module/writeback.h
163 --- lttng-modules-2.12.3/instrumentation/events/lttng-module/writeback.h 2020-10-05 22:04:55.000000000 +0200
164 +++ lttng-modules-2.12.3-256/instrumentation/events/lttng-module/writeback.h 2021-02-06 21:03:58.556816159 +0100
166 LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \
167 LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \
168 LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \
169 - LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \
170 + LTTNG_KERNEL_RANGE(4,9,235, 4,11,0) || \
171 LTTNG_KERNEL_RANGE(4,4,235, 4,5,0) || \
172 LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0))
173 LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
174 diff -ur lttng-modules-2.12.3/lib/ringbuffer/backend_types.h lttng-modules-2.12.3-256/lib/ringbuffer/backend_types.h
175 --- lttng-modules-2.12.3/lib/ringbuffer/backend_types.h 2020-10-05 22:03:52.000000000 +0200
176 +++ lttng-modules-2.12.3-256/lib/ringbuffer/backend_types.h 2021-02-06 21:03:58.556816159 +0100
178 void *priv; /* Client-specific information */
179 void *priv_ops; /* Client-specific ops pointer */
180 void (*release_priv_ops)(void *priv_ops);
181 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
182 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
183 struct lttng_cpuhp_node cpuhp_prepare; /* CPU hotplug prepare */
185 struct notifier_block cpu_hp_notifier; /* CPU hotplug notifier */
186 diff -ur lttng-modules-2.12.3/lib/ringbuffer/frontend_types.h lttng-modules-2.12.3-256/lib/ringbuffer/frontend_types.h
187 --- lttng-modules-2.12.3/lib/ringbuffer/frontend_types.h 2020-10-05 22:04:55.000000000 +0200
188 +++ lttng-modules-2.12.3-256/lib/ringbuffer/frontend_types.h 2021-02-06 21:03:58.556816159 +0100
191 unsigned long switch_timer_interval; /* Buffer flush (jiffies) */
192 unsigned long read_timer_interval; /* Reader wakeup (jiffies) */
193 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
194 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
195 struct lttng_cpuhp_node cpuhp_prepare;
196 struct lttng_cpuhp_node cpuhp_online;
197 struct lttng_cpuhp_node cpuhp_iter_online;
198 diff -ur lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_backend.c lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_backend.c
199 --- lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_backend.c 2020-10-05 22:03:52.000000000 +0200
200 +++ lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_backend.c 2021-02-06 21:03:58.556816159 +0100
202 chanb->start_tsc = config->cb.ring_buffer_clock_read(chan);
205 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
206 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
209 * No need to implement a "dead" callback to do a buffer switch here,
212 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_backend_prepare);
214 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
215 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
217 #ifdef CONFIG_HOTPLUG_CPU
223 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
224 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
227 * channel_backend_init - initialize a channel backend
228 @@ -419,13 +419,13 @@
232 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
233 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
234 chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
235 ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
236 &chanb->cpuhp_prepare.node);
239 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
240 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
248 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
249 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
251 chanb->buf = kzalloc(sizeof(struct lib_ring_buffer), GFP_KERNEL);
253 @@ -477,18 +477,18 @@
256 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
257 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
258 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
260 * Teardown of lttng_rb_hp_prepare instance
261 * on "add" error is handled within cpu hotplug,
262 * no teardown to do from the caller.
264 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
265 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
266 #ifdef CONFIG_HOTPLUG_CPU
268 unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
270 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
271 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
272 for_each_possible_cpu(i) {
273 struct lib_ring_buffer *buf =
274 per_cpu_ptr(chanb->buf, i);
275 @@ -517,15 +517,15 @@
276 const struct lib_ring_buffer_config *config = &chanb->config;
278 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
279 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
280 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
283 ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
284 &chanb->cpuhp_prepare.node);
286 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
287 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
288 unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
289 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
290 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
294 diff -ur lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_frontend.c lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_frontend.c
295 --- lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_frontend.c 2020-10-05 22:04:55.000000000 +0200
296 +++ lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_frontend.c 2021-02-06 21:03:58.556816159 +0100
298 buf->read_timer_enabled = 0;
301 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
302 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
304 enum cpuhp_state lttng_rb_hp_prepare;
305 enum cpuhp_state lttng_rb_hp_online;
308 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_frontend_offline);
310 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
311 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
313 #ifdef CONFIG_HOTPLUG_CPU
319 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
320 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
322 #if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
327 #endif /* CONFIG_NO_HZ */
328 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
329 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
334 &chan->cpuhp_prepare.node);
337 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
338 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
346 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
347 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
349 struct lib_ring_buffer *buf = chan->backend.buf;
352 init_waitqueue_head(&chan->hp_wait);
354 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
355 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
356 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
357 chan->cpuhp_prepare.component = LTTNG_RING_BUFFER_FRONTEND;
358 ret = cpuhp_state_add_instance_nocalls(lttng_rb_hp_prepare,
359 &chan->cpuhp_prepare.node);
361 &chan->cpuhp_online.node);
363 goto cpuhp_online_error;
364 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
365 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
373 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
374 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
376 #if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
377 /* Only benefit from NO_HZ idle with per-cpu buffers for now. */
378 @@ -924,13 +924,13 @@
382 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
383 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
385 ret = cpuhp_state_remove_instance_nocalls(lttng_rb_hp_prepare,
386 &chan->cpuhp_prepare.node);
389 -#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
390 +#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
392 channel_backend_free(&chan->backend);
394 diff -ur lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_iterator.c lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_iterator.c
395 --- lttng-modules-2.12.3/lib/ringbuffer/ring_buffer_iterator.c 2020-10-05 22:03:52.000000000 +0200
396 +++ lttng-modules-2.12.3-256/lib/ringbuffer/ring_buffer_iterator.c 2021-02-06 21:03:58.556816159 +0100
398 list_add(&buf->iter.empty_node, &chan->iter.empty_head);
401 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
402 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
404 int lttng_cpuhp_rb_iter_online(unsigned int cpu,
405 struct lttng_cpuhp_node *node)
408 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_iter_online);
410 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
411 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
413 #ifdef CONFIG_HOTPLUG_CPU
419 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
420 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
422 int channel_iterator_init(struct channel *chan)
424 @@ -401,13 +401,13 @@
428 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
429 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
430 chan->cpuhp_iter_online.component = LTTNG_RING_BUFFER_ITER;
431 ret = cpuhp_state_add_instance(lttng_rb_hp_online,
432 &chan->cpuhp_iter_online.node);
435 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
436 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
444 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
445 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
447 buf = channel_get_ring_buffer(config, chan, 0);
448 lib_ring_buffer_iterator_init(chan, buf);
450 const struct lib_ring_buffer_config *config = &chan->backend.config;
452 if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
453 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
454 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
458 @@ -457,10 +457,10 @@
459 &chan->cpuhp_iter_online.node);
462 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
463 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
464 chan->hp_iter_enable = 0;
465 unregister_cpu_notifier(&chan->hp_iter_notifier);
466 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
467 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
471 diff -ur lttng-modules-2.12.3/lttng-context-perf-counters.c lttng-modules-2.12.3-256/lttng-context-perf-counters.c
472 --- lttng-modules-2.12.3/lttng-context-perf-counters.c 2020-10-05 22:03:52.000000000 +0200
473 +++ lttng-modules-2.12.3-256/lttng-context-perf-counters.c 2021-02-06 21:03:58.556816159 +0100
476 struct perf_event **events = field->u.perf_counter->e;
478 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
479 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
484 &field->u.perf_counter->cpuhp_prepare.node);
487 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
488 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
492 @@ -103,14 +103,14 @@
493 unregister_cpu_notifier(&field->u.perf_counter->nb);
496 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
497 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
498 kfree(field->event_field.name);
499 kfree(field->u.perf_counter->attr);
500 lttng_kvfree(events);
501 kfree(field->u.perf_counter);
504 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
505 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
507 int lttng_cpuhp_perf_counter_online(unsigned int cpu,
508 struct lttng_cpuhp_node *node)
513 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
514 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
516 #ifdef CONFIG_HOTPLUG_CPU
522 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
523 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
525 int lttng_add_perf_counter_to_ctx(uint32_t type,
531 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
532 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
534 perf_field->cpuhp_prepare.component = LTTNG_CONTEXT_PERF_COUNTERS;
535 ret = cpuhp_state_add_instance(lttng_hp_prepare,
538 goto cpuhp_online_error;
540 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
541 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
547 perf_field->hp_enable = 1;
549 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
550 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
552 field->destroy = lttng_destroy_perf_counter_field;
555 wrapper_vmalloc_sync_mappings();
558 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
559 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
567 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
568 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
573 unregister_cpu_notifier(&perf_field->nb);
576 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
577 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
579 lttng_remove_context_field(ctx, field);
580 append_context_error:
581 diff -ur lttng-modules-2.12.3/lttng-cpuhotplug.h lttng-modules-2.12.3-256/lttng-cpuhotplug.h
582 --- lttng-modules-2.12.3/lttng-cpuhotplug.h 2020-10-05 22:03:52.000000000 +0200
583 +++ lttng-modules-2.12.3-256/lttng-cpuhotplug.h 2021-02-06 21:03:58.556816159 +0100
586 struct lttng_cpuhp_node;
588 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
589 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
591 #include <linux/cpuhotplug.h>
593 diff -ur lttng-modules-2.12.3/lttng-events.c lttng-modules-2.12.3-256/lttng-events.c
594 --- lttng-modules-2.12.3/lttng-events.c 2020-10-05 22:04:55.000000000 +0200
595 +++ lttng-modules-2.12.3-256/lttng-events.c 2021-02-06 21:03:58.556816159 +0100
596 @@ -2908,7 +2908,7 @@
598 EXPORT_SYMBOL_GPL(lttng_transport_unregister);
600 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
601 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
603 enum cpuhp_state lttng_hp_prepare;
604 enum cpuhp_state lttng_hp_online;
605 @@ -3024,7 +3024,7 @@
606 cpuhp_remove_multi_state(lttng_hp_prepare);
609 -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
610 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
611 static int lttng_init_cpu_hotplug(void)
614 @@ -3032,7 +3032,7 @@
615 static void lttng_exit_cpu_hotplug(void)
618 -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
619 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
622 static int __init lttng_events_init(void)
623 diff -ur lttng-modules-2.12.3/lttng-events.h lttng-modules-2.12.3-256/lttng-events.h
624 --- lttng-modules-2.12.3/lttng-events.h 2021-02-06 21:03:51.283444240 +0100
625 +++ lttng-modules-2.12.3-256/lttng-events.h 2021-02-06 21:03:58.560149510 +0100
627 * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
629 struct lttng_perf_counter_field {
630 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
631 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
632 struct lttng_cpuhp_node cpuhp_prepare;
633 struct lttng_cpuhp_node cpuhp_online;
635 diff -ur lttng-modules-2.12.3/wrapper/vmalloc.h lttng-modules-2.12.3-256/wrapper/vmalloc.h
636 --- lttng-modules-2.12.3/wrapper/vmalloc.h 2020-10-05 22:04:55.000000000 +0200
637 +++ lttng-modules-2.12.3-256/wrapper/vmalloc.h 2021-02-06 21:03:58.556816159 +0100
639 || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
640 || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
641 || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
642 - || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
643 + || LTTNG_KERNEL_RANGE(4,9,218, 4,11,0) \
644 || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0)) \
645 || LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,97, 4,16,0,0) \
646 || LTTNG_UBUNTU_KERNEL_RANGE(5,0,21,48, 5,1,0,0) \
648 || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
649 || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
650 || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
651 - || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
652 + || LTTNG_KERNEL_RANGE(4,9,218, 4,11,0) \
653 || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0)) \
654 || LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,97, 4,18,0,0) \
655 || LTTNG_UBUNTU_KERNEL_RANGE(5,0,21,48, 5,1,0,0) \