]> git.pld-linux.org Git - packages/lttng-modules.git/blame - git.patch
- up to 2.2.13 + latest fixes
[packages/lttng-modules.git] / git.patch
CommitLineData
b704ebbb
JR
1diff --git a/.gitattributes b/.gitattributes
2new file mode 100644
3index 00000000..7839355a
4--- /dev/null
5+++ b/.gitattributes
6@@ -0,0 +1,3 @@
7+.gitattributes export-ignore
8+.gitignore export-ignore
9+.gitreview export-ignore
f9dfa750 10diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
b704ebbb 11index e5470400..cdf0609f 100644
f9dfa750
JR
12--- a/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
13+++ b/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
b704ebbb
JR
14@@ -163,7 +163,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
15 TP_ARGS(sp)
f9dfa750 16 )
f9dfa750 17
b704ebbb
JR
18-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
19+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
20+
21+LTTNG_TRACEPOINT_EVENT_MAP(
22+ mark_mmio_spte,
f9dfa750 23+
b704ebbb
JR
24+ kvm_mmu_mark_mmio_spte,
25+
26+ TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
27+ TP_ARGS(sptep, gfn, spte),
f9dfa750
JR
28+
29+ TP_FIELDS(
b704ebbb
JR
30+ ctf_integer_hex(void *, sptep, sptep)
31+ ctf_integer(gfn_t, gfn, gfn)
32+ ctf_integer(unsigned, access, spte & ACC_ALL)
33+ ctf_integer(unsigned int, gen, get_mmio_spte_generation(spte))
f9dfa750
JR
34+ )
35+)
b704ebbb
JR
36+
37+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
f9dfa750 38
b704ebbb
JR
39 LTTNG_TRACEPOINT_EVENT_MAP(
40 mark_mmio_spte,
41@@ -215,7 +233,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(
f9dfa750
JR
42 )
43 )
f9dfa750 44
b704ebbb
JR
45-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
46+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
47+LTTNG_TRACEPOINT_EVENT_MAP(
48+ fast_page_fault,
49+
50+ kvm_mmu_fast_page_fault,
f9dfa750 51+
b704ebbb
JR
52+ TP_PROTO(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u32 error_code,
53+ u64 *sptep, u64 old_spte, int ret),
54+ TP_ARGS(vcpu, cr2_or_gpa, error_code, sptep, old_spte, ret),
f9dfa750
JR
55+
56+ TP_FIELDS(
b704ebbb
JR
57+ ctf_integer(int, vcpu_id, vcpu->vcpu_id)
58+ ctf_integer(gpa_t, cr2_or_gpa, cr2_or_gpa)
59+ ctf_integer(u32, error_code, error_code)
60+ ctf_integer_hex(u64 *, sptep, sptep)
61+ ctf_integer(u64, old_spte, old_spte)
62+ ctf_integer(u64, new_spte, *sptep)
63+ ctf_integer(int, ret, ret)
f9dfa750
JR
64+ )
65+)
b704ebbb
JR
66+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
67 LTTNG_KERNEL_RANGE(4,19,103, 4,20,0) || \
68 LTTNG_KERNEL_RANGE(5,4,19, 5,5,0) || \
69 LTTNG_KERNEL_RANGE(5,5,3, 5,6,0) || \
70diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
71index 4416ae02..0917b51f 100644
72--- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
73+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
74@@ -115,6 +115,37 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic,
75 /*
76 * Tracepoint for kvm guest exit:
77 */
78+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
79+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
80+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
81+ TP_ARGS(exit_reason, vcpu, isa),
82+
83+ TP_locvar(
84+ u64 info1, info2;
85+ u32 intr_info, error_code;
86+ ),
87+
88+ TP_code_pre(
89+ kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
90+ &tp_locvar->info2,
91+ &tp_locvar->intr_info,
92+ &tp_locvar->error_code);
93+ ),
94+
95+ TP_FIELDS(
96+ ctf_integer(unsigned int, exit_reason, exit_reason)
97+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
98+ ctf_integer(u32, isa, isa)
99+ ctf_integer(u64, info1, tp_locvar->info1)
100+ ctf_integer(u64, info2, tp_locvar->info2)
101+ ctf_integer(u32, intr_info, tp_locvar->intr_info)
102+ ctf_integer(u32, error_code, tp_locvar->error_code)
103+ ctf_integer(unsigned int, vcpu_id, vcpu->vcpu_id)
104+ ),
105+
106+ TP_code_post()
107+)
108+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
109 LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
110 TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
111 TP_ARGS(exit_reason, vcpu, isa),
112@@ -124,13 +155,32 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
f9dfa750
JR
113 ),
114
f9dfa750 115 TP_code_pre(
b704ebbb
JR
116-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
117 kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1,
118 &tp_locvar->info2);
119+ ),
120+
121+ TP_FIELDS(
122+ ctf_integer(unsigned int, exit_reason, exit_reason)
123+ ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu))
124+ ctf_integer(u32, isa, isa)
125+ ctf_integer(u64, info1, tp_locvar->info1)
126+ ctf_integer(u64, info2, tp_locvar->info2)
127+ ),
128+
129+ TP_code_post()
130+)
131 #else
132+LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
133+ TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
134+ TP_ARGS(exit_reason, vcpu, isa),
135+
136+ TP_locvar(
137+ u64 info1, info2;
138+ ),
139+
140+ TP_code_pre(
141 kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1,
142 &tp_locvar->info2);
143-#endif
f9dfa750
JR
144 ),
145
146 TP_FIELDS(
b704ebbb 147@@ -143,6 +193,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
f9dfa750 148
b704ebbb
JR
149 TP_code_post()
150 )
151+#endif
f9dfa750 152
b704ebbb
JR
153 /*
154 * Tracepoint for kvm interrupt injection:
155diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h
156index 7b290085..efe7af96 100644
157--- a/instrumentation/events/lttng-module/btrfs.h
158+++ b/instrumentation/events/lttng-module/btrfs.h
159@@ -346,7 +346,29 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
160 )
f9dfa750
JR
161 #endif
162
b704ebbb
JR
163-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
164+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
165+LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
166+
167+ TP_PROTO(const struct btrfs_inode *inode,
168+ const struct btrfs_ordered_extent *ordered),
169+
170+ TP_ARGS(inode, ordered),
171+
172+ TP_FIELDS(
173+ ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
174+ ctf_integer(ino_t, ino, btrfs_ino(inode))
175+ ctf_integer(u64, file_offset, ordered->file_offset)
176+ ctf_integer(u64, start, ordered->disk_bytenr)
177+ ctf_integer(u64, len, ordered->num_bytes)
178+ ctf_integer(u64, disk_len, ordered->disk_num_bytes)
179+ ctf_integer(u64, bytes_left, ordered->bytes_left)
180+ ctf_integer(unsigned long, flags, ordered->flags)
181+ ctf_integer(int, compress_type, ordered->compress_type)
182+ ctf_integer(int, refs, refcount_read(&ordered->refs))
183+ ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
f9dfa750 184+ )
b704ebbb
JR
185+)
186+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
187 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
188
189 TP_PROTO(const struct inode *inode,
190@@ -458,7 +480,39 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
191 )
f9dfa750 192 #endif
f9dfa750 193
b704ebbb
JR
194-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
195+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
196+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
197+
198+ TP_PROTO(const struct btrfs_inode *inode,
199+ const struct btrfs_ordered_extent *ordered),
200+
201+ TP_ARGS(inode, ordered)
202+)
203+
204+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
205+
206+ TP_PROTO(const struct btrfs_inode *inode,
207+ const struct btrfs_ordered_extent *ordered),
208+
209+ TP_ARGS(inode, ordered)
210+)
211+
212+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
213+
214+ TP_PROTO(const struct btrfs_inode *inode,
215+ const struct btrfs_ordered_extent *ordered),
216+
217+ TP_ARGS(inode, ordered)
218+)
219+
220+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
221+
222+ TP_PROTO(const struct btrfs_inode *inode,
223+ const struct btrfs_ordered_extent *ordered),
224+
225+ TP_ARGS(inode, ordered)
226+)
227+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
228 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
229 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
230 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
231@@ -494,7 +548,41 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
232
233 TP_ARGS(inode, ordered)
234 )
235+#else
236+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
237+
238+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
239+
240+ TP_ARGS(inode, ordered)
241+)
242+
243+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
244+
245+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
246
247+ TP_ARGS(inode, ordered)
248+)
249+
250+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
251+
252+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
253+
254+ TP_ARGS(inode, ordered)
255+)
256+
257+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
258+
259+ TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
260+
261+ TP_ARGS(inode, ordered)
262+)
263+#endif
264+
265+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
266+ LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
267+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
268+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
269+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
270 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
271
272 TP_PROTO(const struct page *page, const struct inode *inode,
273@@ -563,34 +651,6 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
274 )
275 )
276 #else
277-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
278-
279- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
280-
281- TP_ARGS(inode, ordered)
282-)
283-
284-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
285-
286- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
287-
288- TP_ARGS(inode, ordered)
289-)
290-
291-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
292-
293- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
294-
295- TP_ARGS(inode, ordered)
296-)
297-
298-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
299-
300- TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
301-
302- TP_ARGS(inode, ordered)
303-)
304-
305 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
306
307 TP_PROTO(struct page *page, struct inode *inode,
308@@ -1856,7 +1916,48 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_f
309
310 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
311
312-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
313+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
314+ LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
315+ LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
316+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
317+
318+ btrfs_find_free_extent,
319+
320+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
321+ u64 data),
322+
323+ TP_ARGS(root, num_bytes, empty_size, data),
324+
f9dfa750 325+ TP_FIELDS(
b704ebbb
JR
326+ ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
327+ ctf_integer(u64, root_objectid, root->root_key.objectid)
328+ ctf_integer(u64, num_bytes, num_bytes)
329+ ctf_integer(u64, empty_size, empty_size)
330+ ctf_integer(u64, data, data)
f9dfa750
JR
331+ )
332+)
b704ebbb
JR
333+
334+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
335+
336+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
337+
338+ btrfs_find_free_extent,
339+
340+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
341+ u64 data),
342+
343+ TP_ARGS(fs_info, num_bytes, empty_size, data),
344+
f9dfa750 345+ TP_FIELDS(
b704ebbb
JR
346+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
347+ ctf_integer(u64, num_bytes, num_bytes)
348+ ctf_integer(u64, empty_size, empty_size)
349+ ctf_integer(u64, data, data)
f9dfa750
JR
350+ )
351+)
b704ebbb
JR
352+
353+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
354+
355 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
356
357 btrfs_find_free_extent,
358@@ -1874,6 +1975,86 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
f9dfa750
JR
359 )
360 )
b704ebbb
JR
361
362+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
363+
364+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
365+
366+ btrfs_find_free_extent,
367+
368+ TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
369+ u64 data),
370+
371+ TP_ARGS(fs_info, num_bytes, empty_size, data),
372+
373+ TP_FIELDS(
374+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
375+ ctf_integer(u64, num_bytes, num_bytes)
376+ ctf_integer(u64, empty_size, empty_size)
377+ ctf_integer(u64, data, data)
378+ )
379+)
380+
381+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
382+
383+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
384+
385+ btrfs_find_free_extent,
386+
387+ TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
388+ u64 data),
389+
390+ TP_ARGS(fs_info, num_bytes, empty_size, data),
391+
392+ TP_FIELDS(
393+ ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
394+ ctf_integer(u64, num_bytes, num_bytes)
395+ ctf_integer(u64, empty_size, empty_size)
396+ ctf_integer(u64, data, data)
397+ )
398+)
399+
400+#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
401+ LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
402+ LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
403+ LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
404+
405+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
406+
407+ btrfs_find_free_extent,
408+
409+ TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
410+ u64 data),
411+
412+ TP_ARGS(root, num_bytes, empty_size, data),
413+
414+ TP_FIELDS(
415+ ctf_integer(u64, root_objectid, root->root_key.objectid)
416+ ctf_integer(u64, num_bytes, num_bytes)
417+ ctf_integer(u64, empty_size, empty_size)
418+ ctf_integer(u64, data, data)
419+ )
420+)
421+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
422+
423+LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
424+
425+ btrfs_find_free_extent,
426+
427+ TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
428+ u64 data),
429+
430+ TP_ARGS(root, num_bytes, empty_size, data),
431+
432+ TP_FIELDS(
433+ ctf_integer(u64, root_objectid, root->root_key.objectid)
434+ ctf_integer(u64, num_bytes, num_bytes)
435+ ctf_integer(u64, empty_size, empty_size)
436+ ctf_integer(u64, data, data)
437+ )
438+)
f9dfa750 439+#endif
b704ebbb
JR
440+
441+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
442 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
f9dfa750 443
b704ebbb
JR
444 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
445@@ -1907,22 +2088,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
f9dfa750 446 )
f9dfa750 447
b704ebbb
JR
448 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
449-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
450-
451- btrfs_find_free_extent,
452-
453- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
454- u64 data),
455-
456- TP_ARGS(fs_info, num_bytes, empty_size, data),
457-
458- TP_FIELDS(
459- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
460- ctf_integer(u64, num_bytes, num_bytes)
461- ctf_integer(u64, empty_size, empty_size)
462- ctf_integer(u64, data, data)
463- )
464-)
465
466 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
467
468@@ -1957,22 +2122,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
f9dfa750 469 )
f9dfa750 470
b704ebbb
JR
471 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
472-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
473-
474- btrfs_find_free_extent,
475-
476- TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
477- u64 data),
478-
479- TP_ARGS(fs_info, num_bytes, empty_size, data),
480-
481- TP_FIELDS(
482- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
483- ctf_integer(u64, num_bytes, num_bytes)
484- ctf_integer(u64, empty_size, empty_size)
485- ctf_integer(u64, data, data)
486- )
487-)
f9dfa750 488
b704ebbb 489 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
f9dfa750 490
b704ebbb 491@@ -2011,23 +2160,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
f9dfa750 492
b704ebbb 493 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
f9dfa750 494
b704ebbb
JR
495-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
496-
497- btrfs_find_free_extent,
498-
499- TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
500- u64 data),
501-
502- TP_ARGS(fs_info, num_bytes, empty_size, data),
503-
504- TP_FIELDS(
505- ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
506- ctf_integer(u64, num_bytes, num_bytes)
507- ctf_integer(u64, empty_size, empty_size)
508- ctf_integer(u64, data, data)
509- )
510-)
511-
512 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
f9dfa750 513
b704ebbb
JR
514 TP_PROTO(struct btrfs_fs_info *fs_info,
515@@ -2066,23 +2198,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
516 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
517 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
f9dfa750 518
b704ebbb
JR
519-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
520-
521- btrfs_find_free_extent,
522-
523- TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
524- u64 data),
525-
526- TP_ARGS(root, num_bytes, empty_size, data),
527-
528- TP_FIELDS(
529- ctf_integer(u64, root_objectid, root->root_key.objectid)
530- ctf_integer(u64, num_bytes, num_bytes)
531- ctf_integer(u64, empty_size, empty_size)
532- ctf_integer(u64, data, data)
533- )
534-)
535-
536 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
f9dfa750 537
b704ebbb
JR
538 TP_PROTO(const struct btrfs_root *root,
539@@ -2120,23 +2235,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
f9dfa750 540
b704ebbb 541 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
f9dfa750 542
b704ebbb
JR
543-LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
544-
545- btrfs_find_free_extent,
546-
547- TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
548- u64 data),
549-
550- TP_ARGS(root, num_bytes, empty_size, data),
551-
552- TP_FIELDS(
553- ctf_integer(u64, root_objectid, root->root_key.objectid)
554- ctf_integer(u64, num_bytes, num_bytes)
555- ctf_integer(u64, empty_size, empty_size)
556- ctf_integer(u64, data, data)
557- )
558-)
559-
560 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
f9dfa750 561
b704ebbb
JR
562 TP_PROTO(struct btrfs_root *root,
563diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h
564index b172c8d9..6e74abad 100644
565--- a/instrumentation/events/lttng-module/ext4.h
566+++ b/instrumentation/events/lttng-module/ext4.h
567@@ -1274,6 +1274,18 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
568 )
569 )
f9dfa750 570
b704ebbb
JR
571+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
572+LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
573+ TP_PROTO(struct super_block *sb, unsigned long ino),
574+
575+ TP_ARGS(sb, ino),
576+
577+ TP_FIELDS(
578+ ctf_integer(dev_t, dev, sb->s_dev)
579+ ctf_integer(ino_t, ino, ino)
580+ )
581+)
582+#else
583 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
584 TP_PROTO(struct inode *inode),
f9dfa750 585
b704ebbb
JR
586@@ -1284,6 +1296,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
587 ctf_integer(ino_t, ino, inode->i_ino)
588 )
589 )
590+#endif
f9dfa750 591
b704ebbb 592 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
f9dfa750 593
b704ebbb 594@@ -1895,6 +1908,34 @@ LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
f9dfa750 595
b704ebbb 596 #endif
f9dfa750 597
b704ebbb
JR
598+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
599+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan,
600+ TP_PROTO(struct super_block *sb, int error, int off),
601+
602+ TP_ARGS(sb, error, off),
603+
604+ TP_FIELDS(
605+ ctf_integer(dev_t, dev, sb->s_dev)
606+ ctf_integer(int, error, error)
607+ ctf_integer(int, off, off)
608+ )
609+)
610+
611+LTTNG_TRACEPOINT_EVENT(ext4_fc_replay,
612+ TP_PROTO(struct super_block *sb, int tag, int ino, int priv1, int priv2),
613+
614+ TP_ARGS(sb, tag, ino, priv1, priv2),
615+
616+ TP_FIELDS(
617+ ctf_integer(dev_t, dev, sb->s_dev)
618+ ctf_integer(int, tag, tag)
619+ ctf_integer(int, ino, ino)
620+ ctf_integer(int, priv1, priv1)
621+ ctf_integer(int, priv2, priv2)
622+ )
623+)
624+#endif
625+
626 #endif /* LTTNG_TRACE_EXT4_H */
627
628 /* This part must be outside protection */
f9dfa750 629diff --git a/lttng-events.h b/lttng-events.h
b704ebbb 630index d4d99766..e47c1478 100644
f9dfa750
JR
631--- a/lttng-events.h
632+++ b/lttng-events.h
b704ebbb
JR
633@@ -16,6 +16,7 @@
634 #include <linux/kref.h>
635 #include <lttng-cpuhotplug.h>
636 #include <linux/uuid.h>
637+#include <linux/irq_work.h>
638 #include <wrapper/uprobes.h>
639 #include <lttng-tracer.h>
640 #include <lttng-abi.h>
641diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c
642index 21169f01..5d572437 100644
643--- a/lttng-filter-interpreter.c
644+++ b/lttng-filter-interpreter.c
645@@ -8,7 +8,7 @@
646 */
f9dfa750 647
b704ebbb
JR
648 #include <wrapper/uaccess.h>
649-#include <wrapper/frame.h>
650+#include <wrapper/objtool.h>
651 #include <wrapper/types.h>
652 #include <linux/swab.h>
653
654diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
655index a6fa71a5..cf803a73 100644
656--- a/lttng-statedump-impl.c
657+++ b/lttng-statedump-impl.c
658@@ -55,26 +55,94 @@
659 #define LTTNG_INSTRUMENTATION
660 #include <instrumentation/events/lttng-module/lttng-statedump.h>
661
662-DEFINE_TRACE(lttng_statedump_block_device);
663-DEFINE_TRACE(lttng_statedump_end);
664-DEFINE_TRACE(lttng_statedump_interrupt);
665-DEFINE_TRACE(lttng_statedump_file_descriptor);
666-DEFINE_TRACE(lttng_statedump_start);
667-DEFINE_TRACE(lttng_statedump_process_state);
668-DEFINE_TRACE(lttng_statedump_process_pid_ns);
669+LTTNG_DEFINE_TRACE(lttng_statedump_block_device,
670+ TP_PROTO(struct lttng_session *session,
671+ dev_t dev, const char *diskname),
672+ TP_ARGS(session, dev, diskname));
f9dfa750 673+
b704ebbb
JR
674+LTTNG_DEFINE_TRACE(lttng_statedump_end,
675+ TP_PROTO(struct lttng_session *session),
676+ TP_ARGS(session));
f9dfa750 677+
b704ebbb
JR
678+LTTNG_DEFINE_TRACE(lttng_statedump_interrupt,
679+ TP_PROTO(struct lttng_session *session,
680+ unsigned int irq, const char *chip_name,
681+ struct irqaction *action),
682+ TP_ARGS(session, irq, chip_name, action));
f9dfa750 683+
b704ebbb
JR
684+LTTNG_DEFINE_TRACE(lttng_statedump_file_descriptor,
685+ TP_PROTO(struct lttng_session *session,
686+ struct files_struct *files,
687+ int fd, const char *filename,
688+ unsigned int flags, fmode_t fmode),
689+ TP_ARGS(session, files, fd, filename, flags, fmode));
690+
691+LTTNG_DEFINE_TRACE(lttng_statedump_start,
692+ TP_PROTO(struct lttng_session *session),
693+ TP_ARGS(session));
694+
695+LTTNG_DEFINE_TRACE(lttng_statedump_process_state,
696+ TP_PROTO(struct lttng_session *session,
697+ struct task_struct *p,
698+ int type, int mode, int submode, int status,
699+ struct files_struct *files),
700+ TP_ARGS(session, p, type, mode, submode, status, files));
701+
702+LTTNG_DEFINE_TRACE(lttng_statedump_process_pid_ns,
703+ TP_PROTO(struct lttng_session *session,
704+ struct task_struct *p,
705+ struct pid_namespace *pid_ns),
706+ TP_ARGS(session, p, pid_ns));
707+
708 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
709-DEFINE_TRACE(lttng_statedump_process_cgroup_ns);
710+LTTNG_DEFINE_TRACE(lttng_statedump_process_cgroup_ns,
711+ TP_PROTO(struct lttng_session *session,
712+ struct task_struct *p,
713+ struct cgroup_namespace *cgroup_ns),
714+ TP_ARGS(session, p, cgroup_ns));
715 #endif
716-DEFINE_TRACE(lttng_statedump_process_ipc_ns);
717+
718+LTTNG_DEFINE_TRACE(lttng_statedump_process_ipc_ns,
719+ TP_PROTO(struct lttng_session *session,
720+ struct task_struct *p,
721+ struct ipc_namespace *ipc_ns),
722+ TP_ARGS(session, p, ipc_ns));
723+
724 #ifndef LTTNG_MNT_NS_MISSING_HEADER
725-DEFINE_TRACE(lttng_statedump_process_mnt_ns);
726+LTTNG_DEFINE_TRACE(lttng_statedump_process_mnt_ns,
727+ TP_PROTO(struct lttng_session *session,
728+ struct task_struct *p,
729+ struct mnt_namespace *mnt_ns),
730+ TP_ARGS(session, p, mnt_ns));
731 #endif
732-DEFINE_TRACE(lttng_statedump_process_net_ns);
733-DEFINE_TRACE(lttng_statedump_process_user_ns);
734-DEFINE_TRACE(lttng_statedump_process_uts_ns);
735-DEFINE_TRACE(lttng_statedump_network_interface);
736+
737+LTTNG_DEFINE_TRACE(lttng_statedump_process_net_ns,
738+ TP_PROTO(struct lttng_session *session,
739+ struct task_struct *p,
740+ struct net *net_ns),
741+ TP_ARGS(session, p, net_ns));
742+
743+LTTNG_DEFINE_TRACE(lttng_statedump_process_user_ns,
744+ TP_PROTO(struct lttng_session *session,
745+ struct task_struct *p,
746+ struct user_namespace *user_ns),
747+ TP_ARGS(session, p, user_ns));
748+
749+LTTNG_DEFINE_TRACE(lttng_statedump_process_uts_ns,
750+ TP_PROTO(struct lttng_session *session,
751+ struct task_struct *p,
752+ struct uts_namespace *uts_ns),
753+ TP_ARGS(session, p, uts_ns));
754+
755+LTTNG_DEFINE_TRACE(lttng_statedump_network_interface,
756+ TP_PROTO(struct lttng_session *session,
757+ struct net_device *dev, struct in_ifaddr *ifa),
758+ TP_ARGS(session, dev, ifa));
759+
760 #ifdef LTTNG_HAVE_STATEDUMP_CPU_TOPOLOGY
761-DEFINE_TRACE(lttng_statedump_cpu_topology);
762+LTTNG_DEFINE_TRACE(lttng_statedump_cpu_topology,
763+ TP_PROTO(struct lttng_session *session, struct cpuinfo_x86 *c),
764+ TP_ARGS(session, c));
765 #endif
f9dfa750 766
b704ebbb 767 struct lttng_fd_ctx {
f9dfa750 768diff --git a/lttng-syscalls.c b/lttng-syscalls.c
b704ebbb 769index 49c0d81b..b43dd570 100644
f9dfa750
JR
770--- a/lttng-syscalls.c
771+++ b/lttng-syscalls.c
b704ebbb
JR
772@@ -719,7 +719,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len,
773 ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
f9dfa750
JR
774 break;
775 }
b704ebbb
JR
776- strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
777+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - 1);
f9dfa750
JR
778 ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
779 ev.instrumentation = LTTNG_KERNEL_SYSCALL;
780 chan_table[i] = _lttng_event_create(chan, &ev, filter,
b704ebbb
JR
781diff --git a/lttng-tracker-id.c b/lttng-tracker-id.c
782index 9a4b98b2..327ae346 100644
783--- a/lttng-tracker-id.c
784+++ b/lttng-tracker-id.c
785@@ -75,6 +75,7 @@ int lttng_id_tracker_add(struct lttng_id_tracker *lf, int id)
786 struct lttng_id_tracker_rcu *p = lf->p;
787 uint32_t hash = hash_32(id, 32);
788 bool allocated = false;
789+ int ret;
790
791 if (!p) {
792 p = lttng_id_tracker_rcu_create();
793@@ -84,18 +85,28 @@ int lttng_id_tracker_add(struct lttng_id_tracker *lf, int id)
f9dfa750 794 }
b704ebbb
JR
795 head = &p->id_hash[hash & (LTTNG_ID_TABLE_SIZE - 1)];
796 lttng_hlist_for_each_entry(e, head, hlist) {
797- if (id == e->id)
f9dfa750 798- return -EEXIST;
b704ebbb
JR
799+ if (id == e->id) {
800+ ret = -EEXIST;
801+ goto error;
802+ }
f9dfa750 803 }
b704ebbb
JR
804 e = kmalloc(sizeof(struct lttng_id_hash_node), GFP_KERNEL);
805- if (!e)
806- return -ENOMEM;
807+ if (!e) {
808+ ret = -ENOMEM;
809+ goto error;
810+ }
811 e->id = id;
812 hlist_add_head_rcu(&e->hlist, head);
813 if (allocated) {
814 rcu_assign_pointer(lf->p, p);
f9dfa750 815 }
f9dfa750 816 return 0;
b704ebbb
JR
817+
818+error:
819+ if (allocated) {
820+ kfree(p);
821+ }
822+ return ret;
f9dfa750
JR
823 }
824
825 static
f9dfa750 826diff --git a/probes/lttng-probe-kvm-x86-mmu.c b/probes/lttng-probe-kvm-x86-mmu.c
b704ebbb 827index 8f981865..5043c776 100644
f9dfa750
JR
828--- a/probes/lttng-probe-kvm-x86-mmu.c
829+++ b/probes/lttng-probe-kvm-x86-mmu.c
b704ebbb 830@@ -31,6 +31,11 @@
f9dfa750 831 #include <../../arch/x86/kvm/mmutrace.h>
b704ebbb 832 #endif
f9dfa750 833
b704ebbb
JR
834+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
835+#include <../arch/x86/kvm/mmu.h>
836+#include <../arch/x86/kvm/mmu/spte.h>
837+#endif
838+
f9dfa750
JR
839 #undef TRACE_INCLUDE_PATH
840 #undef TRACE_INCLUDE_FILE
f9dfa750 841
b704ebbb
JR
842diff --git a/probes/lttng.c b/probes/lttng.c
843index 05bc1388..7ddaa69f 100644
844--- a/probes/lttng.c
845+++ b/probes/lttng.c
846@@ -8,7 +8,7 @@
847 */
f9dfa750 848
b704ebbb
JR
849 #include <linux/module.h>
850-#include <linux/tracepoint.h>
851+#include <wrapper/tracepoint.h>
852 #include <linux/uaccess.h>
853 #include <linux/gfp.h>
854 #include <linux/fs.h>
855@@ -32,7 +32,10 @@
856 #define LTTNG_LOGGER_COUNT_MAX 1024
857 #define LTTNG_LOGGER_FILE "lttng-logger"
858
859-DEFINE_TRACE(lttng_logger);
860+LTTNG_DEFINE_TRACE(lttng_logger,
861+ PARAMS(const char __user *text, size_t len),
862+ PARAMS(text, len)
863+);
864
865 static struct proc_dir_entry *lttng_logger_dentry;
866
867diff --git a/scripts/maintainer/do-release.sh b/scripts/maintainer/do-release.sh
868new file mode 100755
869index 00000000..5e94e136
870--- /dev/null
871+++ b/scripts/maintainer/do-release.sh
872@@ -0,0 +1,110 @@
873+#!/bin/bash
874+
875+set -eu
876+set -o pipefail
877+
878+# invoke with do-release 2.N.M, or 2.N.M-rcXX
879+
880+# Default maintainer values
881+SRCDIR="${HOME}/git/lttng-modules"
882+# The output files are created in ${HOME}/stable/
883+OUTPUTDIR="${HOME}/stable"
884+SIGN="yes"
885+VERBOSE=""
886+
887+usage() {
888+ echo "Usage: do-release.sh [OPTION]... RELEASE"
889+ echo
890+ echo "Mandatory arguments to long options are mandatory for short options too."
891+ echo " -s, --srcdir DIR source directory"
892+ echo " -o, --outputdir DIR output directory, must exist"
893+ echo " -n, --no-sign don't GPG sign the output archive"
894+ echo " -v, --verbose verbose command output"
895+}
896+
897+POS_ARGS=()
898+while [[ $# -gt 0 ]]
899+do
900+ arg="$1"
901+
902+ case $arg in
903+ -n|--no-sign)
904+ SIGN="no"
905+ shift 1
906+ ;;
907+
908+ -s|--srcdir)
909+ SRCDIR="$2"
910+ shift 2
911+ ;;
912+
913+ -o|--outputdir)
914+ OUTPUTDIR="$2"
915+ shift 2
916+ ;;
917+
918+ -v|--verbose)
919+ VERBOSE="-v"
920+ shift 1
921+ ;;
922+
923+ # Catch unknown arguments
924+ -*)
925+ usage
926+ exit 1
927+ ;;
928+
929+ *)
930+ POS_ARGS+=("$1")
931+ shift
932+ ;;
933+ esac
934+done
935+set -- "${POS_ARGS[@]}"
936+
937+REL=${1:-}
938+
939+if [ x"${REL}" = x"" ]; then
940+ usage
941+ exit 1;
942+fi
943+
944+echo "Doing LTTng modules release ${REL}"
945+echo " Source dir: ${SRCDIR}"
946+echo " Output dir: ${OUTPUTDIR}"
947+echo " GPG sign: ${SIGN}"
948+
949+# Make sure the output directory exists
950+if [ ! -d "${OUTPUTDIR}" ]; then
951+ echo "Output directory '${OUTPUTDIR}' doesn't exist."
952+ exit 1
953+fi
954+
955+# Make sure the source directory is a git repository
956+if [ ! -r "${SRCDIR}/.git/config" ]; then
957+ echo "Source directory '${SRCDIR}' isn't a git repository."
958+ exit 1
959+fi
960+
961+# Set the git repo directory for all further git commands
962+export GIT_DIR="${SRCDIR}/.git/"
963+
964+# Check if the release tag exists
965+if ! git rev-parse "refs/tags/v${REL}" >/dev/null 2>&1; then
966+ echo "Release tag 'v${REL}' doesn't exist."
967+ exit 1
968+fi
969+
970+# Generate the compressed tar archive, the git attributes from the tag will be used.
971+git archive $VERBOSE --format=tar --prefix="lttng-modules-${REL}/" "v${REL}" | bzip2 > "${OUTPUTDIR}/lttng-modules-${REL}.tar.bz2"
972+
973+pushd "${OUTPUTDIR}" >/dev/null
974+# Generate the hashes
975+md5sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.md5"
976+sha256sum "lttng-modules-${REL}.tar.bz2" > "lttng-modules-${REL}.tar.bz2.sha256"
977+
978+if [ "x${SIGN}" = "xyes" ]; then
979+ # Sign with the default key
980+ gpg --armor -b "lttng-modules-${REL}.tar.bz2"
981+fi
982+popd >/dev/null
983diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
984index b450e7d7..a4fa0645 100644
985--- a/tests/probes/lttng-test.c
986+++ b/tests/probes/lttng-test.c
987@@ -25,7 +25,12 @@
988 #define LTTNG_INSTRUMENTATION
989 #include <instrumentation/events/lttng-module/lttng-test.h>
990
991-DEFINE_TRACE(lttng_test_filter_event);
992+LTTNG_DEFINE_TRACE(lttng_test_filter_event,
993+ PARAMS(int anint, int netint, long *values,
994+ char *text, size_t textlen,
995+ char *etext, uint32_t * net_values),
996+ PARAMS(anint, netint, values, text, textlen, etext, net_values)
997+);
998
999 #define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event"
1000
1001diff --git a/wrapper/frame.h b/wrapper/objtool.h
1002similarity index 50%
1003rename from wrapper/frame.h
1004rename to wrapper/objtool.h
1005index 6e6dc811..3b997cae 100644
1006--- a/wrapper/frame.h
1007+++ b/wrapper/objtool.h
1008@@ -1,18 +1,23 @@
1009-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
1010+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
1011 *
1012- * wrapper/frame.h
1013+ * wrapper/objtool.h
1014 *
1015 * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
1016 */
f9dfa750 1017
b704ebbb
JR
1018-#ifndef _LTTNG_WRAPPER_FRAME_H
1019-#define _LTTNG_WRAPPER_FRAME_H
1020+#ifndef _LTTNG_WRAPPER_OBJTOOL_H
1021+#define _LTTNG_WRAPPER_OBJTOOL_H
f9dfa750 1022
b704ebbb 1023 #include <linux/version.h>
f9dfa750 1024
b704ebbb
JR
1025-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
1026-
1027+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
1028+#include <linux/objtool.h>
1029+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
1030 #include <linux/frame.h>
f9dfa750
JR
1031+#endif
1032+
b704ebbb
JR
1033+
1034+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
f9dfa750 1035
b704ebbb
JR
1036 #define LTTNG_STACK_FRAME_NON_STANDARD(func) \
1037 STACK_FRAME_NON_STANDARD(func)
1038@@ -23,4 +28,4 @@
f9dfa750 1039
b704ebbb 1040 #endif
f9dfa750 1041
b704ebbb
JR
1042-#endif /* _LTTNG_WRAPPER_FRAME_H */
1043+#endif /* _LTTNG_WRAPPER_OBJTOOL_H */
1044diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h
1045index c4ba0123..bc19d8c1 100644
1046--- a/wrapper/tracepoint.h
1047+++ b/wrapper/tracepoint.h
1048@@ -14,6 +14,14 @@
1049 #include <linux/tracepoint.h>
1050 #include <linux/module.h>
1051
1052+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
1053+#define LTTNG_DEFINE_TRACE(name, proto, args) \
1054+ DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
1055+#else
1056+#define LTTNG_DEFINE_TRACE(name, proto, args) \
1057+ DEFINE_TRACE(name)
1058+#endif
1059+
1060 #ifndef HAVE_KABI_2635_TRACEPOINT
f9dfa750 1061
b704ebbb 1062 #define kabi_2635_tracepoint_probe_register tracepoint_probe_register
This page took 0.243081 seconds and 4 git commands to generate.