fix: net: udp: add IP/port data to the tracepoint udp/udp_fail_queue_rcv_skb (v6.10)
[lttng-modules.git] / include / instrumentation / events / btrfs.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
b87700e3
AG
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM btrfs
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_BTRFS_H
b87700e3 7
3b4aafcb 8#include <lttng/tracepoint-event.h>
b87700e3 9#include <linux/writeback.h>
5f4c791e 10#include <lttng/kernel-version.h>
b87700e3 11
4e4fb933
MJ
12#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
13#include <../fs/btrfs/accessors.h>
14#endif
15
f39b4a3c
MJ
16#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
17#include <../fs/btrfs/extent-tree.h>
18#endif
19
b87700e3
AG
20#ifndef _TRACE_BTRFS_DEF_
21#define _TRACE_BTRFS_DEF_
22struct btrfs_root;
23struct btrfs_fs_info;
24struct btrfs_inode;
25struct extent_map;
26struct btrfs_ordered_extent;
27struct btrfs_delayed_ref_node;
28struct btrfs_delayed_tree_ref;
29struct btrfs_delayed_data_ref;
30struct btrfs_delayed_ref_head;
5f4c791e 31#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816 32struct btrfs_block_group;
3b67cf3e 33#else
b87700e3 34struct btrfs_block_group_cache;
5809d816 35#endif
b87700e3 36struct btrfs_free_cluster;
b87700e3
AG
37struct map_lookup;
38struct extent_buffer;
b87700e3
AG
39struct extent_state;
40#endif
b87700e3 41
b87700e3
AG
42#define BTRFS_UUID_SIZE 16
43
5f4c791e 44#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
9d2f1147
MJ
45#define lttng_fs_info_fsid fs_info->fs_devices->fsid
46#else
47#define lttng_fs_info_fsid fs_info->fsid
48#endif
49
0fe69821
MJ
50#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
51LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
52
53 TP_PROTO(const struct btrfs_fs_info *fs_info),
54
55 TP_ARGS(fs_info),
56
57 TP_FIELDS(
58 ctf_integer(u64, generation, fs_info->generation)
59 ctf_integer(u64, root_objectid, BTRFS_ROOT_TREE_OBJECTID)
60 )
61)
62#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
63 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
64 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
65 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 66 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
67LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
68
69 TP_PROTO(const struct btrfs_root *root),
70
71 TP_ARGS(root),
72
73 TP_FIELDS(
74 ctf_integer(u64, generation, root->fs_info->generation)
75 ctf_integer(u64, root_objectid, root->root_key.objectid)
76 )
77)
0fe69821
MJ
78#else
79LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
80
81 TP_PROTO(struct btrfs_root *root),
82
83 TP_ARGS(root),
84
85 TP_FIELDS(
86 ctf_integer(u64, generation, root->fs_info->generation)
87 ctf_integer(u64, root_objectid, root->root_key.objectid)
88 )
89)
90#endif
1f1ec4ed 91
0fe69821
MJ
92#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
93 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
94 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
95 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
96 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
97LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
98
99 TP_PROTO(const struct inode *inode),
100
101 TP_ARGS(inode),
102
103 TP_FIELDS(
104 ctf_integer(ino_t, ino, inode->i_ino)
105 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
106 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
107 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
108 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
109 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
110 ctf_integer(u64, root_objectid,
111 BTRFS_I(inode)->root->root_key.objectid)
112 )
113)
114
115LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
116
117 TP_PROTO(const struct inode *inode),
118
119 TP_ARGS(inode)
120)
121
122LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
123
124 TP_PROTO(const struct inode *inode),
125
126 TP_ARGS(inode)
127)
128
129LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
130
131 TP_PROTO(const struct inode *inode),
132
133 TP_ARGS(inode)
134)
135#else
3bc29f0a 136LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
b87700e3
AG
137
138 TP_PROTO(struct inode *inode),
139
140 TP_ARGS(inode),
141
f127e61e
MD
142 TP_FIELDS(
143 ctf_integer(ino_t, ino, inode->i_ino)
144 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
145 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
146 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
147 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
148 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
149 ctf_integer(u64, root_objectid,
b87700e3 150 BTRFS_I(inode)->root->root_key.objectid)
f127e61e 151 )
b87700e3
AG
152)
153
3bc29f0a 154LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
b87700e3
AG
155
156 TP_PROTO(struct inode *inode),
157
158 TP_ARGS(inode)
159)
160
3bc29f0a 161LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
b87700e3
AG
162
163 TP_PROTO(struct inode *inode),
164
165 TP_ARGS(inode)
166)
167
3bc29f0a 168LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
b87700e3
AG
169
170 TP_PROTO(struct inode *inode),
171
172 TP_ARGS(inode)
173)
1f1ec4ed
MJ
174#endif
175
0c9bc964
KS
176#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
177
178LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
179
180 TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
181 const struct extent_map *map),
182
183 TP_ARGS(root, inode, map),
184
185 TP_FIELDS(
186 ctf_integer(u64, root_objectid, root->root_key.objectid)
187 ctf_integer(u64, ino, btrfs_ino(inode))
188 ctf_integer(u64, start, map->start)
189 ctf_integer(u64, len, map->len)
190 ctf_integer(u64, orig_start, map->orig_start)
191 ctf_integer(u64, block_start, map->block_start)
192 ctf_integer(u64, block_len, map->block_len)
193 ctf_integer(unsigned int, flags, map->flags)
194 ctf_integer(int, refs, refcount_read(&map->refs))
195 ctf_integer(unsigned int, compress_type, extent_map_compression(map))
196 )
197)
198
199#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
200
201LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
202
203 TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
204 const struct extent_map *map),
205
206 TP_ARGS(root, inode, map),
207
208 TP_FIELDS(
209 ctf_integer(u64, root_objectid, root->root_key.objectid)
210 ctf_integer(u64, ino, btrfs_ino(inode))
211 ctf_integer(u64, start, map->start)
212 ctf_integer(u64, len, map->len)
213 ctf_integer(u64, orig_start, map->orig_start)
214 ctf_integer(u64, block_start, map->block_start)
215 ctf_integer(u64, block_len, map->block_len)
216 ctf_integer(unsigned long, flags, map->flags)
217 ctf_integer(int, refs, refcount_read(&map->refs))
218 ctf_integer(unsigned int, compress_type, map->compress_type)
219 )
220)
b87700e3 221
5f4c791e 222#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
5807b1af
MJ
223
224LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
225
226 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
227 struct extent_map *map),
228
229 TP_ARGS(root, inode, map),
230
231 TP_FIELDS(
232 ctf_integer(u64, root_objectid, root->root_key.objectid)
233 ctf_integer(u64, ino, btrfs_ino(inode))
234 ctf_integer(u64, start, map->start)
235 ctf_integer(u64, len, map->len)
236 ctf_integer(u64, orig_start, map->orig_start)
237 ctf_integer(u64, block_start, map->block_start)
238 ctf_integer(u64, block_len, map->block_len)
239 ctf_integer(unsigned long, flags, map->flags)
240 ctf_integer(int, refs, refcount_read(&map->refs))
241 ctf_integer(unsigned int, compress_type, map->compress_type)
242 )
243)
244
5f4c791e 245#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
e52717ea
FD
246
247LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
248
249 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
250 struct extent_map *map),
251
252 TP_ARGS(root, inode, map),
253
254 TP_FIELDS(
255 ctf_integer(u64, root_objectid, root->root_key.objectid)
256 ctf_integer(u64, ino, btrfs_ino(inode))
257 ctf_integer(u64, start, map->start)
258 ctf_integer(u64, len, map->len)
259 ctf_integer(u64, orig_start, map->orig_start)
260 ctf_integer(u64, block_start, map->block_start)
261 ctf_integer(u64, block_len, map->block_len)
262 ctf_integer(unsigned long, flags, map->flags)
263 ctf_integer(int, refs, atomic_read(&map->refs))
264 ctf_integer(unsigned int, compress_type, map->compress_type)
265 )
266)
267
5f4c791e 268#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
f1a87e24 269
3bc29f0a 270LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
b87700e3 271
f3166f27
MD
272 TP_PROTO(struct btrfs_root *root, struct inode *inode,
273 struct extent_map *map),
b87700e3 274
f3166f27 275 TP_ARGS(root, inode, map),
b87700e3 276
f127e61e
MD
277 TP_FIELDS(
278 ctf_integer(u64, root_objectid, root->root_key.objectid)
f3166f27 279 ctf_integer(u64, ino, btrfs_ino(inode))
f127e61e
MD
280 ctf_integer(u64, start, map->start)
281 ctf_integer(u64, len, map->len)
282 ctf_integer(u64, orig_start, map->orig_start)
283 ctf_integer(u64, block_start, map->block_start)
284 ctf_integer(u64, block_len, map->block_len)
285 ctf_integer(unsigned long, flags, map->flags)
286 ctf_integer(int, refs, atomic_read(&map->refs))
287 ctf_integer(unsigned int, compress_type, map->compress_type)
288 )
b87700e3
AG
289)
290
0badc02f
MJ
291#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
292 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
293 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
294 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
295
296LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
297
298 TP_PROTO(const struct btrfs_root *root, const struct extent_map *map),
299
300 TP_ARGS(root, map),
301
302 TP_FIELDS(
303 ctf_integer(u64, root_objectid, root->root_key.objectid)
304 ctf_integer(u64, start, map->start)
305 ctf_integer(u64, len, map->len)
306 ctf_integer(u64, orig_start, map->orig_start)
307 ctf_integer(u64, block_start, map->block_start)
308 ctf_integer(u64, block_len, map->block_len)
309 ctf_integer(unsigned long, flags, map->flags)
310 ctf_integer(int, refs, atomic_read(&map->refs))
311 ctf_integer(unsigned int, compress_type, map->compress_type)
312 )
313)
314
5f4c791e 315#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
f1a87e24
MD
316
317LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
318
319 TP_PROTO(struct btrfs_root *root, struct extent_map *map),
320
321 TP_ARGS(root, map),
322
323 TP_FIELDS(
324 ctf_integer(u64, root_objectid, root->root_key.objectid)
325 ctf_integer(u64, start, map->start)
326 ctf_integer(u64, len, map->len)
327 ctf_integer(u64, orig_start, map->orig_start)
328 ctf_integer(u64, block_start, map->block_start)
329 ctf_integer(u64, block_len, map->block_len)
330 ctf_integer(unsigned long, flags, map->flags)
331 ctf_integer(int, refs, atomic_read(&map->refs))
332 ctf_integer(unsigned int, compress_type, map->compress_type)
333 )
334)
335
5f4c791e 336#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
f1a87e24 337
5f4c791e 338#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ae5af8ea
MJ
339LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
340
341 TP_PROTO(const struct btrfs_fs_info *fs_info,
342 const struct extent_map *existing, const struct extent_map *map,
343 u64 start, u64 len),
344
345 TP_ARGS(fs_info, existing, map, start, len),
346
347 TP_FIELDS(
348 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
349 ctf_integer(u64, e_start, existing->start)
350 ctf_integer(u64, e_len, existing->len)
351 ctf_integer(u64, map_start, map->start)
352 ctf_integer(u64, map_len, map->len)
353 ctf_integer(u64, start, start)
354 ctf_integer(u64, len, len)
355 )
356)
5f4c791e 357#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
354b9790
MJ
358LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
359
360 TP_PROTO(struct btrfs_fs_info *fs_info,
361 const struct extent_map *existing, const struct extent_map *map,
362 u64 start, u64 len),
363
364 TP_ARGS(fs_info, existing, map, start, len),
365
366 TP_FIELDS(
9d2f1147 367 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
354b9790
MJ
368 ctf_integer(u64, e_start, existing->start)
369 ctf_integer(u64, e_len, existing->len)
370 ctf_integer(u64, map_start, map->start)
371 ctf_integer(u64, map_len, map->len)
372 ctf_integer(u64, start, start)
373 ctf_integer(u64, len, len)
374 )
375)
5f4c791e 376#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
22df20ca
MJ
377LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
378
379 TP_PROTO(const struct extent_map *existing, const struct extent_map *map, u64 start, u64 len),
380
381 TP_ARGS(existing, map, start, len),
382
383 TP_FIELDS(
384 ctf_integer(u64, e_start, existing->start)
385 ctf_integer(u64, e_len, existing->len)
386 ctf_integer(u64, map_start, map->start)
387 ctf_integer(u64, map_len, map->len)
388 ctf_integer(u64, start, start)
389 ctf_integer(u64, len, len)
390 )
391)
392#endif
393
5f4c791e 394#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
7dc44138
MJ
395LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
396
397 TP_PROTO(const struct btrfs_inode *inode,
398 const struct btrfs_ordered_extent *ordered),
399
400 TP_ARGS(inode, ordered),
401
402 TP_FIELDS(
403 ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
404 ctf_integer(ino_t, ino, btrfs_ino(inode))
405 ctf_integer(u64, file_offset, ordered->file_offset)
406 ctf_integer(u64, start, ordered->disk_bytenr)
407 ctf_integer(u64, len, ordered->num_bytes)
408 ctf_integer(u64, disk_len, ordered->disk_num_bytes)
409 ctf_integer(u64, bytes_left, ordered->bytes_left)
410 ctf_integer(unsigned long, flags, ordered->flags)
411 ctf_integer(int, compress_type, ordered->compress_type)
412 ctf_integer(int, refs, refcount_read(&ordered->refs))
413 ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
414 )
415)
5f4c791e 416#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
f7afb954
MJ
417LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
418
419 TP_PROTO(const struct inode *inode,
420 const struct btrfs_ordered_extent *ordered),
421
422 TP_ARGS(inode, ordered),
423
424 TP_FIELDS(
425 ctf_integer(ino_t, ino, inode->i_ino)
426 ctf_integer(u64, file_offset, ordered->file_offset)
427 ctf_integer(u64, start, ordered->disk_bytenr)
428 ctf_integer(u64, len, ordered->num_bytes)
429 ctf_integer(u64, disk_len, ordered->disk_num_bytes)
430 ctf_integer(u64, bytes_left, ordered->bytes_left)
431 ctf_integer(unsigned long, flags, ordered->flags)
432 ctf_integer(int, compress_type, ordered->compress_type)
433 ctf_integer(int, refs, refcount_read(&ordered->refs))
434 ctf_integer(u64, root_objectid,
435 BTRFS_I(inode)->root->root_key.objectid)
436 )
437)
5f4c791e 438#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
439LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
440
441 TP_PROTO(const struct inode *inode,
442 const struct btrfs_ordered_extent *ordered),
443
444 TP_ARGS(inode, ordered),
445
446 TP_FIELDS(
447 ctf_integer(ino_t, ino, inode->i_ino)
448 ctf_integer(u64, file_offset, ordered->file_offset)
449 ctf_integer(u64, start, ordered->start)
450 ctf_integer(u64, len, ordered->len)
451 ctf_integer(u64, disk_len, ordered->disk_len)
452 ctf_integer(u64, bytes_left, ordered->bytes_left)
453 ctf_integer(unsigned long, flags, ordered->flags)
454 ctf_integer(int, compress_type, ordered->compress_type)
455 ctf_integer(int, refs, refcount_read(&ordered->refs))
456 ctf_integer(u64, root_objectid,
457 BTRFS_I(inode)->root->root_key.objectid)
458 )
459)
5f4c791e 460#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
5807b1af
MJ
461LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
462
463 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
464
465 TP_ARGS(inode, ordered),
466
467 TP_FIELDS(
468 ctf_integer(ino_t, ino, inode->i_ino)
469 ctf_integer(u64, file_offset, ordered->file_offset)
470 ctf_integer(u64, start, ordered->start)
471 ctf_integer(u64, len, ordered->len)
472 ctf_integer(u64, disk_len, ordered->disk_len)
473 ctf_integer(u64, bytes_left, ordered->bytes_left)
474 ctf_integer(unsigned long, flags, ordered->flags)
475 ctf_integer(int, compress_type, ordered->compress_type)
476 ctf_integer(int, refs, refcount_read(&ordered->refs))
477 ctf_integer(u64, root_objectid,
478 BTRFS_I(inode)->root->root_key.objectid)
479 )
480)
0badc02f
MJ
481#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
482 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
483 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
484 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
485LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
486
487 TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
488
489 TP_ARGS(inode, ordered),
490
491 TP_FIELDS(
492 ctf_integer(ino_t, ino, inode->i_ino)
493 ctf_integer(u64, file_offset, ordered->file_offset)
494 ctf_integer(u64, start, ordered->start)
495 ctf_integer(u64, len, ordered->len)
496 ctf_integer(u64, disk_len, ordered->disk_len)
497 ctf_integer(u64, bytes_left, ordered->bytes_left)
498 ctf_integer(unsigned long, flags, ordered->flags)
499 ctf_integer(int, compress_type, ordered->compress_type)
500 ctf_integer(int, refs, atomic_read(&ordered->refs))
501 ctf_integer(u64, root_objectid,
502 BTRFS_I(inode)->root->root_key.objectid)
503 )
504)
5807b1af 505#else
3bc29f0a 506LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
b87700e3
AG
507
508 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
509
510 TP_ARGS(inode, ordered),
511
f127e61e
MD
512 TP_FIELDS(
513 ctf_integer(ino_t, ino, inode->i_ino)
514 ctf_integer(u64, file_offset, ordered->file_offset)
515 ctf_integer(u64, start, ordered->start)
516 ctf_integer(u64, len, ordered->len)
517 ctf_integer(u64, disk_len, ordered->disk_len)
518 ctf_integer(u64, bytes_left, ordered->bytes_left)
519 ctf_integer(unsigned long, flags, ordered->flags)
520 ctf_integer(int, compress_type, ordered->compress_type)
521 ctf_integer(int, refs, atomic_read(&ordered->refs))
522 ctf_integer(u64, root_objectid,
b87700e3 523 BTRFS_I(inode)->root->root_key.objectid)
f127e61e 524 )
b87700e3 525)
5807b1af 526#endif
b87700e3 527
5f4c791e 528#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
7dc44138
MJ
529LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
530
531 TP_PROTO(const struct btrfs_inode *inode,
532 const struct btrfs_ordered_extent *ordered),
533
534 TP_ARGS(inode, ordered)
535)
536
537LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
538
539 TP_PROTO(const struct btrfs_inode *inode,
540 const struct btrfs_ordered_extent *ordered),
541
542 TP_ARGS(inode, ordered)
543)
544
545LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
546
547 TP_PROTO(const struct btrfs_inode *inode,
548 const struct btrfs_ordered_extent *ordered),
549
550 TP_ARGS(inode, ordered)
551)
552
553LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
554
555 TP_PROTO(const struct btrfs_inode *inode,
556 const struct btrfs_ordered_extent *ordered),
557
558 TP_ARGS(inode, ordered)
559)
5f4c791e 560#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
561 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
562 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
563 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 564 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
565LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
566
567 TP_PROTO(const struct inode *inode,
568 const struct btrfs_ordered_extent *ordered),
569
570 TP_ARGS(inode, ordered)
571)
572
573LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
574
575 TP_PROTO(const struct inode *inode,
576 const struct btrfs_ordered_extent *ordered),
577
578 TP_ARGS(inode, ordered)
579)
580
581LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
582
583 TP_PROTO(const struct inode *inode,
584 const struct btrfs_ordered_extent *ordered),
585
586 TP_ARGS(inode, ordered)
587)
588
589LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
590
591 TP_PROTO(const struct inode *inode,
592 const struct btrfs_ordered_extent *ordered),
593
594 TP_ARGS(inode, ordered)
595)
7dc44138
MJ
596#else
597LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
598
599 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
600
601 TP_ARGS(inode, ordered)
602)
603
604LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
1f1ec4ed 605
7dc44138
MJ
606 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
607
608 TP_ARGS(inode, ordered)
609)
610
611LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
612
613 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
614
615 TP_ARGS(inode, ordered)
616)
617
618LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
619
620 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
621
622 TP_ARGS(inode, ordered)
623)
624#endif
625
18a23dc8
MJ
626#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
627LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup,
628
629 TP_PROTO(const struct btrfs_inode *inode,
630 const struct btrfs_ordered_extent *ordered),
631
632 TP_ARGS(inode, ordered)
633)
634
635LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_range,
636
637 TP_PROTO(const struct btrfs_inode *inode,
638 const struct btrfs_ordered_extent *ordered),
639
640 TP_ARGS(inode, ordered)
641)
642
643LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first_range,
644
645 TP_PROTO(const struct btrfs_inode *inode,
646 const struct btrfs_ordered_extent *ordered),
647
648 TP_ARGS(inode, ordered)
649)
650
651LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_for_logging,
652
653 TP_PROTO(const struct btrfs_inode *inode,
654 const struct btrfs_ordered_extent *ordered),
655
656 TP_ARGS(inode, ordered)
657)
658
659LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first,
660
661 TP_PROTO(const struct btrfs_inode *inode,
662 const struct btrfs_ordered_extent *ordered),
663
664 TP_ARGS(inode, ordered)
665)
666
667LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_split,
668
669 TP_PROTO(const struct btrfs_inode *inode,
670 const struct btrfs_ordered_extent *ordered),
671
672 TP_ARGS(inode, ordered)
673)
674
675LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_dec_test_pending,
676
677 TP_PROTO(const struct btrfs_inode *inode,
678 const struct btrfs_ordered_extent *ordered),
679
680 TP_ARGS(inode, ordered)
681)
682
683LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_mark_finished,
684
685 TP_PROTO(const struct btrfs_inode *inode,
686 const struct btrfs_ordered_extent *ordered),
687
688 TP_ARGS(inode, ordered)
689)
690#endif
691
e9a88656
MJ
692#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
693LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
694
695 TP_PROTO(const struct btrfs_inode *inode, u64 start, u64 end, int uptodate),
696
697 TP_ARGS(inode, start, end, uptodate),
698
699 TP_FIELDS(
700 ctf_integer(u64, ino, btrfs_ino(inode))
701 ctf_integer(u64, start, start)
702 ctf_integer(u64, end, end)
703 ctf_integer(int, uptodate, uptodate)
704 ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
705 )
706)
707
708#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
709 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
710 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
711 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
712 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
713
714LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
715
716 TP_PROTO(const struct page *page, u64 start, u64 end, int uptodate),
717
718 TP_ARGS(page, start, end, uptodate),
719
720 TP_FIELDS(
721 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
722 ctf_integer(pgoff_t, index, page->index)
723 ctf_integer(u64, start, start)
724 ctf_integer(u64, end, end)
725 ctf_integer(int, uptodate, uptodate)
726 ctf_integer(u64, root_objectid,
727 BTRFS_I(page->mapping->host)->root->root_key.objectid)
728 )
729)
730
731#else
732
733LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
734
735 TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
736
737 TP_ARGS(page, start, end, uptodate),
738
739 TP_FIELDS(
740 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
741 ctf_integer(pgoff_t, index, page->index)
742 ctf_integer(u64, start, start)
743 ctf_integer(u64, end, end)
744 ctf_integer(int, uptodate, uptodate)
745 ctf_integer(u64, root_objectid,
746 BTRFS_I(page->mapping->host)->root->root_key.objectid)
747 )
748)
749#endif
750
5f4c791e 751#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
7dc44138
MJ
752 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
753 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
754 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
755 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
756LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
757
758 TP_PROTO(const struct page *page, const struct inode *inode,
759 const struct writeback_control *wbc),
760
761 TP_ARGS(page, inode, wbc),
762
763 TP_FIELDS(
764 ctf_integer(ino_t, ino, inode->i_ino)
765 ctf_integer(pgoff_t, index, page->index)
766 ctf_integer(long, nr_to_write, wbc->nr_to_write)
767 ctf_integer(long, pages_skipped, wbc->pages_skipped)
768 ctf_integer(loff_t, range_start, wbc->range_start)
769 ctf_integer(loff_t, range_end, wbc->range_end)
770 ctf_integer(char, for_kupdate, wbc->for_kupdate)
771 ctf_integer(char, for_reclaim, wbc->for_reclaim)
772 ctf_integer(char, range_cyclic, wbc->range_cyclic)
773 ctf_integer(pgoff_t, writeback_index,
774 inode->i_mapping->writeback_index)
775 ctf_integer(u64, root_objectid,
776 BTRFS_I(inode)->root->root_key.objectid)
777 )
778)
779
780LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
781
782 __extent_writepage,
783
784 btrfs__extent_writepage,
785
786 TP_PROTO(const struct page *page, const struct inode *inode,
787 const struct writeback_control *wbc),
788
789 TP_ARGS(page, inode, wbc)
790)
791
1f1ec4ed
MJ
792LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
793
794 TP_PROTO(const struct file *file, int datasync),
795
796 TP_ARGS(file, datasync),
797
798 TP_FIELDS(
799 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
800 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
801 ctf_integer(int, datasync, datasync)
802 ctf_integer(u64, root_objectid,
803 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
804 )
805)
806#else
3bc29f0a 807LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
b87700e3
AG
808
809 TP_PROTO(struct page *page, struct inode *inode,
810 struct writeback_control *wbc),
811
812 TP_ARGS(page, inode, wbc),
813
f127e61e
MD
814 TP_FIELDS(
815 ctf_integer(ino_t, ino, inode->i_ino)
816 ctf_integer(pgoff_t, index, page->index)
817 ctf_integer(long, nr_to_write, wbc->nr_to_write)
818 ctf_integer(long, pages_skipped, wbc->pages_skipped)
819 ctf_integer(loff_t, range_start, wbc->range_start)
820 ctf_integer(loff_t, range_end, wbc->range_end)
f127e61e
MD
821 ctf_integer(char, for_kupdate, wbc->for_kupdate)
822 ctf_integer(char, for_reclaim, wbc->for_reclaim)
823 ctf_integer(char, range_cyclic, wbc->range_cyclic)
824 ctf_integer(pgoff_t, writeback_index,
825 inode->i_mapping->writeback_index)
826 ctf_integer(u64, root_objectid,
827 BTRFS_I(inode)->root->root_key.objectid)
828 )
b87700e3
AG
829)
830
9bbf98da
MD
831LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
832
833 __extent_writepage,
834
835 btrfs__extent_writepage,
b87700e3
AG
836
837 TP_PROTO(struct page *page, struct inode *inode,
838 struct writeback_control *wbc),
839
840 TP_ARGS(page, inode, wbc)
841)
842
3bc29f0a 843LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
b87700e3
AG
844
845 TP_PROTO(struct file *file, int datasync),
846
847 TP_ARGS(file, datasync),
848
f127e61e
MD
849 TP_FIELDS(
850 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
851 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
852 ctf_integer(int, datasync, datasync)
853 ctf_integer(u64, root_objectid,
b87700e3 854 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
f127e61e 855 )
b87700e3 856)
1f1ec4ed 857#endif
b87700e3 858
5f4c791e 859#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
860 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
861 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
862 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
863 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
864 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
865 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
866 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
867LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
868
869 TP_PROTO(const struct btrfs_fs_info *fs_info, int wait),
870
871 TP_ARGS(fs_info, wait),
872
873 TP_FIELDS(
874 ctf_integer(int, wait, wait)
875 )
876)
5f4c791e 877#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fcd0a11c
MD
878LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
879
880 TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
881
882 TP_ARGS(fs_info, wait),
883
884 TP_FIELDS(
885 ctf_integer(int, wait, wait)
886 )
887)
888#else
3bc29f0a 889LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
b87700e3
AG
890
891 TP_PROTO(int wait),
892
893 TP_ARGS(wait),
894
f127e61e
MD
895 TP_FIELDS(
896 ctf_integer(int, wait, wait)
897 )
b87700e3 898)
fcd0a11c
MD
899#endif
900
5f4c791e 901#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
902LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
903
904 TP_PROTO(const struct btrfs_fs_info *fs_info,
905 const struct btrfs_block_group *block_group, int create),
906
907 TP_ARGS(fs_info, block_group, create),
908
909 TP_FIELDS(
910 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
911 ctf_integer(u64, offset, block_group->start)
912 ctf_integer(u64, size, block_group->length)
913 ctf_integer(u64, flags, block_group->flags)
914 ctf_integer(u64, bytes_used, block_group->used)
915 ctf_integer(u64, bytes_super, block_group->bytes_super)
916 ctf_integer(int, create, create)
917 )
918)
5f4c791e 919#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
920 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
921 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
922 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 923 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
924LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
925
926 TP_PROTO(const struct btrfs_fs_info *fs_info,
927 const struct btrfs_block_group_cache *block_group, int create),
928
929 TP_ARGS(fs_info, block_group, create),
930
931 TP_FIELDS(
9d2f1147 932 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
933 ctf_integer(u64, offset, block_group->key.objectid)
934 ctf_integer(u64, size, block_group->key.offset)
935 ctf_integer(u64, flags, block_group->flags)
936 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
937 ctf_integer(u64, bytes_super, block_group->bytes_super)
938 ctf_integer(int, create, create)
939 )
940)
941#else
fcd0a11c 942LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
b87700e3 943
fcd0a11c
MD
944 TP_PROTO(struct btrfs_fs_info *fs_info,
945 struct btrfs_block_group_cache *block_group, int create),
946
947 TP_ARGS(fs_info, block_group, create),
948
949 TP_FIELDS(
9d2f1147 950 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fcd0a11c
MD
951 ctf_integer(u64, offset, block_group->key.objectid)
952 ctf_integer(u64, size, block_group->key.offset)
953 ctf_integer(u64, flags, block_group->flags)
954 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
955 ctf_integer(u64, bytes_super, block_group->bytes_super)
956 ctf_integer(int, create, create)
957 )
958)
1f1ec4ed 959#endif
fcd0a11c 960
a66ce381
MJ
961#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
962LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
963
964 TP_PROTO(const struct btrfs_fs_info *fs_info,
965 const struct btrfs_delayed_ref_node *ref),
966
967 TP_ARGS(fs_info, ref),
968
969 TP_FIELDS(
970 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
971 ctf_integer(u64, bytenr, ref->bytenr)
972 ctf_integer(u64, num_bytes, ref->num_bytes)
973 ctf_integer(int, action, ref->action)
d63cafab
MJ
974 ctf_integer(u64, parent, ref->parent)
975 ctf_integer(u64, ref_root, ref->ref_root)
a66ce381
MJ
976 ctf_integer(int, level, ref->tree_ref.level)
977 ctf_integer(int, type, ref->type)
978 ctf_integer(u64, seq, ref->seq)
979 )
980)
981
982LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
983
984 add_delayed_tree_ref,
985
986 btrfs_add_delayed_tree_ref,
987
988 TP_PROTO(const struct btrfs_fs_info *fs_info,
989 const struct btrfs_delayed_ref_node *ref),
990
991 TP_ARGS(fs_info, ref)
992)
993
994LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
995
996 run_delayed_tree_ref,
997
998 btrfs_run_delayed_tree_ref,
999
1000 TP_PROTO(const struct btrfs_fs_info *fs_info,
1001 const struct btrfs_delayed_ref_node *ref),
1002
1003 TP_ARGS(fs_info, ref)
1004)
1005#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1006 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1007 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1008 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1009 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1010 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1011 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1012 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
fde8b34a 1013LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1f1ec4ed
MJ
1014
1015 TP_PROTO(const struct btrfs_fs_info *fs_info,
1016 const struct btrfs_delayed_ref_node *ref,
1017 const struct btrfs_delayed_tree_ref *full_ref,
1018 int action),
1019
1020 TP_ARGS(fs_info, ref, full_ref, action),
1021
1022 TP_FIELDS(
9d2f1147 1023 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
1024 ctf_integer(u64, bytenr, ref->bytenr)
1025 ctf_integer(u64, num_bytes, ref->num_bytes)
1026 ctf_integer(int, action, action)
1027 ctf_integer(u64, parent, full_ref->parent)
1028 ctf_integer(u64, ref_root, full_ref->root)
1029 ctf_integer(int, level, full_ref->level)
1030 ctf_integer(int, type, ref->type)
1031 ctf_integer(u64, seq, ref->seq)
1032 )
1033)
fde8b34a 1034
426eff93
MD
1035LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1036
1037 add_delayed_tree_ref,
1038
1039 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
1040
1041 TP_PROTO(const struct btrfs_fs_info *fs_info,
1042 const struct btrfs_delayed_ref_node *ref,
1043 const struct btrfs_delayed_tree_ref *full_ref,
1044 int action),
1045
1046 TP_ARGS(fs_info, ref, full_ref, action)
1047)
1048
426eff93
MD
1049LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1050
1051 run_delayed_tree_ref,
1052
1053 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
1054
1055 TP_PROTO(const struct btrfs_fs_info *fs_info,
1056 const struct btrfs_delayed_ref_node *ref,
1057 const struct btrfs_delayed_tree_ref *full_ref,
1058 int action),
1059
1060 TP_ARGS(fs_info, ref, full_ref, action)
1061)
5f4c791e 1062#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fde8b34a 1063LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
fcd0a11c
MD
1064
1065 TP_PROTO(struct btrfs_fs_info *fs_info,
1066 struct btrfs_delayed_ref_node *ref,
1067 struct btrfs_delayed_tree_ref *full_ref,
1068 int action),
1069
1070 TP_ARGS(fs_info, ref, full_ref, action),
1071
1072 TP_FIELDS(
9d2f1147 1073 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fcd0a11c
MD
1074 ctf_integer(u64, bytenr, ref->bytenr)
1075 ctf_integer(u64, num_bytes, ref->num_bytes)
1076 ctf_integer(int, action, action)
1077 ctf_integer(u64, parent, full_ref->parent)
1078 ctf_integer(u64, ref_root, full_ref->root)
1079 ctf_integer(int, level, full_ref->level)
1080 ctf_integer(int, type, ref->type)
1081 ctf_integer(u64, seq, ref->seq)
1082 )
1083)
fde8b34a 1084
426eff93
MD
1085LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1086
1087 add_delayed_tree_ref,
1088
1089 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
1090
1091 TP_PROTO(struct btrfs_fs_info *fs_info,
1092 struct btrfs_delayed_ref_node *ref,
1093 struct btrfs_delayed_tree_ref *full_ref,
1094 int action),
1095
1096 TP_ARGS(fs_info, ref, full_ref, action)
1097)
1098
426eff93
MD
1099LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1100
1101 run_delayed_tree_ref,
1102
1103 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
1104
1105 TP_PROTO(struct btrfs_fs_info *fs_info,
1106 struct btrfs_delayed_ref_node *ref,
1107 struct btrfs_delayed_tree_ref *full_ref,
1108 int action),
1109
1110 TP_ARGS(fs_info, ref, full_ref, action)
1111)
0badc02f
MJ
1112#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1113LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1114
1115 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1116 const struct btrfs_delayed_tree_ref *full_ref,
1117 int action),
1118
1119 TP_ARGS(ref, full_ref, action),
1120
1121 TP_FIELDS(
1122 ctf_integer(u64, bytenr, ref->bytenr)
1123 ctf_integer(u64, num_bytes, ref->num_bytes)
1124 ctf_integer(int, action, action)
1125 ctf_integer(u64, parent, full_ref->parent)
1126 ctf_integer(u64, ref_root, full_ref->root)
1127 ctf_integer(int, level, full_ref->level)
1128 ctf_integer(int, type, ref->type)
1129 ctf_integer(u64, seq, ref->seq)
1130 )
1131)
1132
426eff93
MD
1133LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1134
1135 add_delayed_tree_ref,
1136
1137 btrfs_add_delayed_tree_ref,
0badc02f
MJ
1138
1139 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1140 const struct btrfs_delayed_tree_ref *full_ref,
1141 int action),
1142
1143 TP_ARGS(ref, full_ref, action)
1144)
1145
426eff93
MD
1146LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1147
1148 run_delayed_tree_ref,
1149
1150 btrfs_run_delayed_tree_ref,
0badc02f
MJ
1151
1152 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1153 const struct btrfs_delayed_tree_ref *full_ref,
1154 int action),
1155
1156 TP_ARGS(ref, full_ref, action)
1157)
3b67cf3e 1158#else
fde8b34a
MJ
1159LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1160
1161 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1162 struct btrfs_delayed_tree_ref *full_ref,
1163 int action),
1164
1165 TP_ARGS(ref, full_ref, action),
1166
1167 TP_FIELDS(
1168 ctf_integer(u64, bytenr, ref->bytenr)
1169 ctf_integer(u64, num_bytes, ref->num_bytes)
1170 ctf_integer(int, action, action)
1171 ctf_integer(u64, parent, full_ref->parent)
1172 ctf_integer(u64, ref_root, full_ref->root)
1173 ctf_integer(int, level, full_ref->level)
1174 ctf_integer(int, type, ref->type)
1175 ctf_integer(u64, seq, ref->seq)
1176 )
1177)
1178
426eff93
MD
1179LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1180
1181 add_delayed_tree_ref,
1182
1183 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
1184
1185 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1186 struct btrfs_delayed_tree_ref *full_ref,
1187 int action),
1188
1189 TP_ARGS(ref, full_ref, action)
1190)
1191
426eff93
MD
1192LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1193
1194 run_delayed_tree_ref,
1195
1196 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
1197
1198 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1199 struct btrfs_delayed_tree_ref *full_ref,
1200 int action),
1201
1202 TP_ARGS(ref, full_ref, action)
1203)
fcd0a11c 1204#endif
b87700e3 1205
a66ce381
MJ
1206#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,10,0))
1207LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1208
1209 TP_PROTO(const struct btrfs_fs_info *fs_info,
1210 const struct btrfs_delayed_ref_node *ref),
1211
1212 TP_ARGS(fs_info, ref),
1213
1214 TP_FIELDS(
1215 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1216 ctf_integer(u64, bytenr, ref->bytenr)
1217 ctf_integer(u64, num_bytes, ref->num_bytes)
1218 ctf_integer(int, action, ref->action)
d63cafab
MJ
1219 ctf_integer(u64, parent, ref->parent)
1220 ctf_integer(u64, ref_root, ref->ref_root)
a66ce381
MJ
1221 ctf_integer(u64, owner, ref->data_ref.objectid)
1222 ctf_integer(u64, offset, ref->data_ref.offset)
1223 ctf_integer(int, type, ref->type)
1224 ctf_integer(u64, seq, ref->seq)
1225 )
1226)
1227
1228LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1229
1230 add_delayed_data_ref,
1231
1232 btrfs_add_delayed_data_ref,
1233
1234 TP_PROTO(const struct btrfs_fs_info *fs_info,
1235 const struct btrfs_delayed_ref_node *ref),
1236
1237 TP_ARGS(fs_info, ref)
1238)
1239
1240LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1241
1242 run_delayed_data_ref,
1243
1244 btrfs_run_delayed_data_ref,
1245
1246 TP_PROTO(const struct btrfs_fs_info *fs_info,
1247 const struct btrfs_delayed_ref_node *ref),
1248
1249 TP_ARGS(fs_info, ref)
1250)
1251
1252#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1253 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1254 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1255 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1256 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1257 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1258 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1259 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
fde8b34a
MJ
1260LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1261
1262 TP_PROTO(const struct btrfs_fs_info *fs_info,
1263 const struct btrfs_delayed_ref_node *ref,
1264 const struct btrfs_delayed_data_ref *full_ref,
1265 int action),
1266
1267 TP_ARGS(fs_info, ref, full_ref, action),
1268
1269 TP_FIELDS(
9d2f1147 1270 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fde8b34a
MJ
1271 ctf_integer(u64, bytenr, ref->bytenr)
1272 ctf_integer(u64, num_bytes, ref->num_bytes)
1273 ctf_integer(int, action, action)
1274 ctf_integer(u64, parent, full_ref->parent)
1275 ctf_integer(u64, ref_root, full_ref->root)
1276 ctf_integer(u64, owner, full_ref->objectid)
1277 ctf_integer(u64, offset, full_ref->offset)
1278 ctf_integer(int, type, ref->type)
1279 ctf_integer(u64, seq, ref->seq)
1280 )
1281)
1282
426eff93
MD
1283LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1284
1285 add_delayed_data_ref,
1286
1287 btrfs_add_delayed_data_ref,
fde8b34a
MJ
1288
1289 TP_PROTO(const struct btrfs_fs_info *fs_info,
1290 const struct btrfs_delayed_ref_node *ref,
1291 const struct btrfs_delayed_data_ref *full_ref,
1292 int action),
1293
1294 TP_ARGS(fs_info, ref, full_ref, action)
1295)
1296
426eff93
MD
1297LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1298
1299 run_delayed_data_ref,
1300
1301 btrfs_run_delayed_data_ref,
fde8b34a
MJ
1302
1303 TP_PROTO(const struct btrfs_fs_info *fs_info,
1304 const struct btrfs_delayed_ref_node *ref,
1305 const struct btrfs_delayed_data_ref *full_ref,
1306 int action),
1307
1308 TP_ARGS(fs_info, ref, full_ref, action)
1309)
5f4c791e 1310#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fde8b34a
MJ
1311LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1312
1313 TP_PROTO(struct btrfs_fs_info *fs_info,
1314 struct btrfs_delayed_ref_node *ref,
1315 struct btrfs_delayed_data_ref *full_ref,
1316 int action),
1317
1318 TP_ARGS(fs_info, ref, full_ref, action),
1319
1320 TP_FIELDS(
9d2f1147 1321 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fde8b34a
MJ
1322 ctf_integer(u64, bytenr, ref->bytenr)
1323 ctf_integer(u64, num_bytes, ref->num_bytes)
1324 ctf_integer(int, action, action)
1325 ctf_integer(u64, parent, full_ref->parent)
1326 ctf_integer(u64, ref_root, full_ref->root)
1327 ctf_integer(u64, owner, full_ref->objectid)
1328 ctf_integer(u64, offset, full_ref->offset)
1329 ctf_integer(int, type, ref->type)
1330 ctf_integer(u64, seq, ref->seq)
1331 )
1332)
1333
426eff93
MD
1334LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1335
1336 add_delayed_data_ref,
1337
1338 btrfs_add_delayed_data_ref,
fde8b34a
MJ
1339
1340 TP_PROTO(struct btrfs_fs_info *fs_info,
1341 struct btrfs_delayed_ref_node *ref,
1342 struct btrfs_delayed_data_ref *full_ref,
1343 int action),
1344
1345 TP_ARGS(fs_info, ref, full_ref, action)
1346)
1347
426eff93
MD
1348LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1349
1350 run_delayed_data_ref,
1351
1352 btrfs_run_delayed_data_ref,
fde8b34a
MJ
1353
1354 TP_PROTO(struct btrfs_fs_info *fs_info,
1355 struct btrfs_delayed_ref_node *ref,
1356 struct btrfs_delayed_data_ref *full_ref,
1357 int action),
1358
1359 TP_ARGS(fs_info, ref, full_ref, action)
1360)
0badc02f
MJ
1361#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1362LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1363
1364 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1365 const struct btrfs_delayed_data_ref *full_ref,
1366 int action),
1367
1368 TP_ARGS(ref, full_ref, action),
1369
1370 TP_FIELDS(
1371 ctf_integer(u64, bytenr, ref->bytenr)
1372 ctf_integer(u64, num_bytes, ref->num_bytes)
1373 ctf_integer(int, action, action)
1374 ctf_integer(u64, parent, full_ref->parent)
1375 ctf_integer(u64, ref_root, full_ref->root)
1376 ctf_integer(u64, owner, full_ref->objectid)
1377 ctf_integer(u64, offset, full_ref->offset)
1378 ctf_integer(int, type, ref->type)
1379 ctf_integer(u64, seq, ref->seq)
1380 )
1381)
1382
426eff93
MD
1383LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1384
1385 add_delayed_data_ref,
1386
1387 btrfs_add_delayed_data_ref,
0badc02f
MJ
1388
1389 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1390 const struct btrfs_delayed_data_ref *full_ref,
1391 int action),
1392
1393 TP_ARGS(fs_info, ref, full_ref, action)
1394)
1395
426eff93
MD
1396LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1397
1398 run_delayed_data_ref,
1399
1400 btrfs_run_delayed_data_ref,
0badc02f
MJ
1401
1402 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1403 const struct btrfs_delayed_data_ref *full_ref,
1404 int action),
1405
1406 TP_ARGS(fs_info, ref, full_ref, action)
1407)
3b67cf3e 1408#else
fde8b34a
MJ
1409LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1410
1411 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1412 struct btrfs_delayed_data_ref *full_ref,
1413 int action),
1414
1415 TP_ARGS(ref, full_ref, action),
1416
1417 TP_FIELDS(
1418 ctf_integer(u64, bytenr, ref->bytenr)
1419 ctf_integer(u64, num_bytes, ref->num_bytes)
1420 ctf_integer(int, action, action)
1421 ctf_integer(u64, parent, full_ref->parent)
1422 ctf_integer(u64, ref_root, full_ref->root)
1423 ctf_integer(u64, owner, full_ref->objectid)
1424 ctf_integer(u64, offset, full_ref->offset)
1425 ctf_integer(int, type, ref->type)
1426 ctf_integer(u64, seq, ref->seq)
1427 )
1428)
1429
426eff93
MD
1430LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1431
1432 add_delayed_data_ref,
1433
1434 btrfs_add_delayed_data_ref,
fde8b34a
MJ
1435
1436 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1437 struct btrfs_delayed_data_ref *full_ref,
1438 int action),
1439
1440 TP_ARGS(fs_info, ref, full_ref, action)
1441)
1442
426eff93
MD
1443LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1444
1445 run_delayed_data_ref,
1446
1447 btrfs_run_delayed_data_ref,
fde8b34a
MJ
1448
1449 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1450 struct btrfs_delayed_data_ref *full_ref,
1451 int action),
1452
1453 TP_ARGS(fs_info, ref, full_ref, action)
1454)
fde8b34a 1455#endif
b87700e3 1456
5f4c791e 1457#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
ab9ebe67
MJ
1458LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1459
1460 TP_PROTO(const struct btrfs_fs_info *fs_info,
1461 const struct btrfs_delayed_ref_head *head_ref,
1462 int action),
1463
1464 TP_ARGS(fs_info, head_ref, action),
1465
1466 TP_FIELDS(
1467 ctf_integer(u64, bytenr, head_ref->bytenr)
1468 ctf_integer(u64, num_bytes, head_ref->num_bytes)
1469 ctf_integer(int, action, action)
1470 ctf_integer(int, is_data, head_ref->is_data)
1471 )
1472)
1473
d7921a5f
MD
1474LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1475
1476 add_delayed_ref_head,
1477
1478 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
1479
1480 TP_PROTO(const struct btrfs_fs_info *fs_info,
1481 const struct btrfs_delayed_ref_head *head_ref,
1482 int action),
1483
1484 TP_ARGS(fs_info, head_ref, action)
1485)
1486
d7921a5f
MD
1487LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1488
1489 run_delayed_ref_head,
1490
1491 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
1492
1493 TP_PROTO(const struct btrfs_fs_info *fs_info,
1494 const struct btrfs_delayed_ref_head *head_ref,
1495 int action),
1496
1497 TP_ARGS(fs_info, head_ref, action)
1498)
1499
5f4c791e 1500#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1501 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1502 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1503 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1504 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1505 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1506 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1507 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1508
ab9ebe67
MJ
1509LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1510
1511 TP_PROTO(const struct btrfs_fs_info *fs_info,
1512 const struct btrfs_delayed_ref_node *ref,
1513 const struct btrfs_delayed_ref_head *head_ref,
1514 int action),
1515
1516 TP_ARGS(fs_info, ref, head_ref, action),
1517
1518 TP_FIELDS(
1519 ctf_integer(u64, bytenr, ref->bytenr)
1520 ctf_integer(u64, num_bytes, ref->num_bytes)
1521 ctf_integer(int, action, action)
1522 ctf_integer(int, is_data, head_ref->is_data)
1523 )
1524)
1525
d7921a5f
MD
1526LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1527
1528 add_delayed_ref_head,
1529
1530 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
1531
1532 TP_PROTO(const struct btrfs_fs_info *fs_info,
1533 const struct btrfs_delayed_ref_node *ref,
1534 const struct btrfs_delayed_ref_head *head_ref,
1535 int action),
1536
1537 TP_ARGS(fs_info, ref, head_ref, action)
1538)
1539
d7921a5f
MD
1540LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1541
1542 run_delayed_ref_head,
1543
1544 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
1545
1546 TP_PROTO(const struct btrfs_fs_info *fs_info,
1547 const struct btrfs_delayed_ref_node *ref,
1548 const struct btrfs_delayed_ref_head *head_ref,
1549 int action),
1550
1551 TP_ARGS(fs_info, ref, head_ref, action)
1552)
1553
5f4c791e 1554#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
ab9ebe67 1555LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
fcd0a11c
MD
1556
1557 TP_PROTO(struct btrfs_fs_info *fs_info,
1558 struct btrfs_delayed_ref_node *ref,
1559 struct btrfs_delayed_ref_head *head_ref,
1560 int action),
1561
1562 TP_ARGS(fs_info, ref, head_ref, action),
1563
1564 TP_FIELDS(
1565 ctf_integer(u64, bytenr, ref->bytenr)
1566 ctf_integer(u64, num_bytes, ref->num_bytes)
1567 ctf_integer(int, action, action)
1568 ctf_integer(int, is_data, head_ref->is_data)
1569 )
1570)
1571
d7921a5f
MD
1572LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1573
1574 add_delayed_ref_head,
1575
1576 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
1577
1578 TP_PROTO(struct btrfs_fs_info *fs_info,
1579 struct btrfs_delayed_ref_node *ref,
1580 struct btrfs_delayed_ref_head *head_ref,
1581 int action),
1582
1583 TP_ARGS(fs_info, ref, head_ref, action)
1584)
1585
d7921a5f
MD
1586LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1587
1588 run_delayed_ref_head,
1589
1590 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
1591
1592 TP_PROTO(struct btrfs_fs_info *fs_info,
1593 struct btrfs_delayed_ref_node *ref,
1594 struct btrfs_delayed_ref_head *head_ref,
1595 int action),
1596
1597 TP_ARGS(fs_info, ref, head_ref, action)
1598)
1599
0badc02f 1600#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
0b3f6dcb
MJ
1601LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1602
1603 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1604 const struct btrfs_delayed_ref_head *head_ref,
1605 int action),
1606
1607 TP_ARGS(ref, head_ref, action),
1608
1609 TP_FIELDS(
1610 ctf_integer(u64, bytenr, ref->bytenr)
1611 ctf_integer(u64, num_bytes, ref->num_bytes)
1612 ctf_integer(int, action, action)
1613 ctf_integer(int, is_data, head_ref->is_data)
1614 )
1615)
1616
d7921a5f
MD
1617LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1618
1619 add_delayed_ref_head,
1620
1621 btrfs_add_delayed_ref_head,
0b3f6dcb
MJ
1622
1623 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1624 const struct btrfs_delayed_ref_head *head_ref,
1625 int action),
1626
1627 TP_ARGS(ref, head_ref, action)
1628)
1629
d7921a5f
MD
1630LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1631
1632 run_delayed_ref_head,
1633
1634 btrfs_run_delayed_ref_head,
0b3f6dcb
MJ
1635
1636 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1637 const struct btrfs_delayed_ref_head *head_ref,
1638 int action),
1639
1640 TP_ARGS(ref, head_ref, action)
1641)
1642
3b67cf3e 1643#else
ab9ebe67
MJ
1644LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1645
1646 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1647 struct btrfs_delayed_ref_head *head_ref,
1648 int action),
1649
1650 TP_ARGS(ref, head_ref, action),
1651
1652 TP_FIELDS(
1653 ctf_integer(u64, bytenr, ref->bytenr)
1654 ctf_integer(u64, num_bytes, ref->num_bytes)
1655 ctf_integer(int, action, action)
1656 ctf_integer(int, is_data, head_ref->is_data)
1657 )
1658)
1659
d7921a5f
MD
1660LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1661
1662 add_delayed_ref_head,
1663
1664 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
1665
1666 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1667 struct btrfs_delayed_ref_head *head_ref,
1668 int action),
1669
1670 TP_ARGS(ref, head_ref, action)
1671)
1672
d7921a5f
MD
1673LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1674
1675 run_delayed_ref_head,
1676
1677 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
1678
1679 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1680 struct btrfs_delayed_ref_head *head_ref,
1681 int action),
1682
1683 TP_ARGS(ref, head_ref, action)
1684)
fcd0a11c 1685#endif
b87700e3 1686
a24df612
KS
1687#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
1688
1689LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1690
1691 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
1692 u64 offset, u64 size),
1693
1694 TP_ARGS(fs_info, map, offset, size),
1695
1696 TP_FIELDS(
1697 ctf_integer(int, num_stripes, map->num_stripes)
1698 ctf_integer(u64, type, map->type)
1699 ctf_integer(int, sub_stripes, map->sub_stripes)
1700 ctf_integer(u64, offset, offset)
1701 ctf_integer(u64, size, size)
1702 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1703 )
1704)
1705
1706LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1707
1708 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
1709 u64 offset, u64 size),
1710
1711 TP_ARGS(fs_info, map, offset, size)
1712)
1713
1714LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1715
1716 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *map,
1717 u64 offset, u64 size),
1718
1719 TP_ARGS(fs_info, map, offset, size)
1720)
1721
1722#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
1723
1724LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1725
1726 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1727 u64 offset, u64 size),
1728
1729 TP_ARGS(fs_info, map, offset, size),
1730
1731 TP_FIELDS(
1732 ctf_integer(int, num_stripes, map->num_stripes)
1733 ctf_integer(u64, type, map->type)
1734 ctf_integer(int, sub_stripes, map->sub_stripes)
1735 ctf_integer(u64, offset, offset)
1736 ctf_integer(u64, size, size)
1737 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1738 )
1739)
1740
1741LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1742
9d2f1147 1743 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1f1ec4ed
MJ
1744 u64 offset, u64 size),
1745
9d2f1147 1746 TP_ARGS(fs_info, map, offset, size)
1f1ec4ed
MJ
1747)
1748
1749LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1750
9d2f1147 1751 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1f1ec4ed
MJ
1752 u64 offset, u64 size),
1753
9d2f1147 1754 TP_ARGS(fs_info, map, offset, size)
1f1ec4ed
MJ
1755)
1756
5f4c791e 1757#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ff8bdcc2
MD
1758
1759LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1760
1761 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1762 u64 offset, u64 size),
1763
1764 TP_ARGS(fs_info, map, offset, size),
1765
1766 TP_FIELDS(
1767 ctf_integer(int, num_stripes, map->num_stripes)
1768 ctf_integer(u64, type, map->type)
1769 ctf_integer(int, sub_stripes, map->sub_stripes)
1770 ctf_integer(u64, offset, offset)
1771 ctf_integer(u64, size, size)
1772 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1773 )
1774)
1775
1776LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1777
9d2f1147 1778 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
ff8bdcc2
MD
1779 u64 offset, u64 size),
1780
9d2f1147 1781 TP_ARGS(fs_info, map, offset, size)
ff8bdcc2
MD
1782)
1783
1784LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1785
9d2f1147 1786 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
ff8bdcc2
MD
1787 u64 offset, u64 size),
1788
9d2f1147 1789 TP_ARGS(fs_info, map, offset, size)
ff8bdcc2
MD
1790)
1791
0badc02f
MJ
1792#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1793 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1794 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1795 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
1796
1797LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1798
1799 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1800 u64 offset, u64 size),
1801
1802 TP_ARGS(root, map, offset, size),
1803
1804 TP_FIELDS(
1805 ctf_integer(int, num_stripes, map->num_stripes)
1806 ctf_integer(u64, type, map->type)
1807 ctf_integer(int, sub_stripes, map->sub_stripes)
1808 ctf_integer(u64, offset, offset)
1809 ctf_integer(u64, size, size)
1810 ctf_integer(u64, root_objectid, root->root_key.objectid)
1811 )
1812)
1813
1814LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1815
1816 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1817 u64 offset, u64 size),
1818
1819 TP_ARGS(root, map, offset, size)
1820)
1821
1822LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1823
1824 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1825 u64 offset, u64 size),
1826
1827 TP_ARGS(root, map, offset, size)
1828)
1829
5f4c791e 1830#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1831
3bc29f0a 1832LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
b87700e3
AG
1833
1834 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1835 u64 offset, u64 size),
1836
1837 TP_ARGS(root, map, offset, size),
1838
f127e61e
MD
1839 TP_FIELDS(
1840 ctf_integer(int, num_stripes, map->num_stripes)
1841 ctf_integer(u64, type, map->type)
1842 ctf_integer(int, sub_stripes, map->sub_stripes)
1843 ctf_integer(u64, offset, offset)
1844 ctf_integer(u64, size, size)
1845 ctf_integer(u64, root_objectid, root->root_key.objectid)
1846 )
b87700e3
AG
1847)
1848
3bc29f0a 1849LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
b87700e3
AG
1850
1851 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1852 u64 offset, u64 size),
1853
1854 TP_ARGS(root, map, offset, size)
1855)
1856
3bc29f0a 1857LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
b87700e3
AG
1858
1859 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1860 u64 offset, u64 size),
1861
1862 TP_ARGS(root, map, offset, size)
1863)
1864
5f4c791e 1865#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1866
5f4c791e 1867#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1868 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1869 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1870 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 1871 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
1872LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1873
1874 TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
1875 const struct extent_buffer *cow),
1876
1877 TP_ARGS(root, buf, cow),
1878
1879 TP_FIELDS(
1880 ctf_integer(u64, root_objectid, root->root_key.objectid)
1881 ctf_integer(u64, buf_start, buf->start)
1882 ctf_integer(int, refs, atomic_read(&buf->refs))
1883 ctf_integer(u64, cow_start, cow->start)
1884 ctf_integer(int, buf_level, btrfs_header_level(buf))
1885 ctf_integer(int, cow_level, btrfs_header_level(cow))
1886 )
1887)
1888#else
3bc29f0a 1889LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
b87700e3
AG
1890
1891 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
1892 struct extent_buffer *cow),
1893
1894 TP_ARGS(root, buf, cow),
1895
f127e61e
MD
1896 TP_FIELDS(
1897 ctf_integer(u64, root_objectid, root->root_key.objectid)
1898 ctf_integer(u64, buf_start, buf->start)
1899 ctf_integer(int, refs, atomic_read(&buf->refs))
1900 ctf_integer(u64, cow_start, cow->start)
1901 ctf_integer(int, buf_level, btrfs_header_level(buf))
1902 ctf_integer(int, cow_level, btrfs_header_level(cow))
1903 )
b87700e3 1904)
1f1ec4ed 1905#endif
b87700e3 1906
5f4c791e 1907#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ae5af8ea
MJ
1908LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1909
1910 TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val,
1911 u64 bytes, int reserve),
1912
1913 TP_ARGS(fs_info, type, val, bytes, reserve),
1914
1915 TP_FIELDS(
1916 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1917 ctf_string(type, type)
1918 ctf_integer(u64, val, val)
1919 ctf_integer(u64, bytes, bytes)
1920 ctf_integer(int, reserve, reserve)
1921 )
1922)
5f4c791e 1923#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1924 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1925 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1926 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 1927 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
1928LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1929
1930 TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
1931 u64 bytes, int reserve),
1932
1933 TP_ARGS(fs_info, type, val, bytes, reserve),
1934
1935 TP_FIELDS(
9d2f1147 1936 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
1937 ctf_string(type, type)
1938 ctf_integer(u64, val, val)
1939 ctf_integer(u64, bytes, bytes)
1940 ctf_integer(int, reserve, reserve)
1941 )
1942)
3b67cf3e 1943#else
3bc29f0a 1944LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
b87700e3
AG
1945
1946 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
1947 u64 bytes, int reserve),
1948
1949 TP_ARGS(fs_info, type, val, bytes, reserve),
1950
f127e61e 1951 TP_FIELDS(
9d2f1147 1952 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
f127e61e
MD
1953 ctf_string(type, type)
1954 ctf_integer(u64, val, val)
1955 ctf_integer(u64, bytes, bytes)
1956 ctf_integer(int, reserve, reserve)
1957 )
b87700e3
AG
1958)
1959#endif
1960
5f4c791e 1961#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
1962
1963LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1964
9d2f1147 1965 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1966
9d2f1147 1967 TP_ARGS(fs_info, start, len),
1f1ec4ed
MJ
1968
1969 TP_FIELDS(
1970 ctf_integer(u64, start, start)
1971 ctf_integer(u64, len, len)
1972 )
1973)
1974
1975LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1976
9d2f1147 1977 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1978
9d2f1147 1979 TP_ARGS(fs_info, start, len)
1f1ec4ed
MJ
1980)
1981
1982LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1983
9d2f1147 1984 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1985
9d2f1147 1986 TP_ARGS(fs_info, start, len)
1f1ec4ed
MJ
1987)
1988
5f4c791e 1989#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ff8bdcc2
MD
1990
1991LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1992
9d2f1147 1993 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 1994
9d2f1147 1995 TP_ARGS(fs_info, start, len),
ff8bdcc2
MD
1996
1997 TP_FIELDS(
1998 ctf_integer(u64, start, start)
1999 ctf_integer(u64, len, len)
2000 )
2001)
2002
2003LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
2004
9d2f1147 2005 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 2006
9d2f1147 2007 TP_ARGS(fs_info, start, len)
ff8bdcc2
MD
2008)
2009
2010LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
2011
9d2f1147 2012 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 2013
9d2f1147 2014 TP_ARGS(fs_info, start, len)
ff8bdcc2
MD
2015)
2016
0badc02f
MJ
2017#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2018 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2019 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2020 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
2021
2022LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
2023
2024 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
2025
2026 TP_ARGS(root, start, len),
2027
2028 TP_FIELDS(
2029 ctf_integer(u64, root_objectid, root->root_key.objectid)
2030 ctf_integer(u64, start, start)
2031 ctf_integer(u64, len, len)
2032 )
2033)
2034
2035LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
2036
2037 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
2038
2039 TP_ARGS(root, start, len)
2040)
2041
2042LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
2043
2044 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
2045
2046 TP_ARGS(root, start, len)
2047)
2048
5f4c791e 2049#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 2050
3bc29f0a 2051LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
b87700e3
AG
2052
2053 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
2054
2055 TP_ARGS(root, start, len),
2056
f127e61e
MD
2057 TP_FIELDS(
2058 ctf_integer(u64, root_objectid, root->root_key.objectid)
2059 ctf_integer(u64, start, start)
2060 ctf_integer(u64, len, len)
2061 )
b87700e3
AG
2062)
2063
3bc29f0a 2064LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
b87700e3
AG
2065
2066 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
2067
2068 TP_ARGS(root, start, len)
2069)
2070
3bc29f0a 2071LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
b87700e3
AG
2072
2073 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
2074
2075 TP_ARGS(root, start, len)
2076)
2077
5f4c791e 2078#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 2079
f39b4a3c
MJ
2080#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2081LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2082
2083 btrfs_find_free_extent,
2084
2085 TP_PROTO(const struct btrfs_root *root,
2086 const struct find_free_extent_ctl *ffe_ctl),
2087
2088 TP_ARGS(root, ffe_ctl),
2089
2090 TP_FIELDS(
2091 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2092 ctf_integer(u64, root_objectid, root->root_key.objectid)
2093 ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
2094 ctf_integer(u64, empty_size, ffe_ctl->empty_size)
2095 ctf_integer(u64, flags, ffe_ctl->flags)
2096 )
2097)
2098
2099#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
eb270dc0 2100 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
859ad5c7
MJ
2101 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
2102 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
ab1ddefc
MJ
2103LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2104
2105 btrfs_find_free_extent,
2106
2107 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2108 u64 data),
2109
2110 TP_ARGS(root, num_bytes, empty_size, data),
2111
2112 TP_FIELDS(
2113 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2114 ctf_integer(u64, root_objectid, root->root_key.objectid)
2115 ctf_integer(u64, num_bytes, num_bytes)
2116 ctf_integer(u64, empty_size, empty_size)
2117 ctf_integer(u64, data, data)
2118 )
2119)
2120
5f4c791e 2121#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ab1ddefc 2122
5809d816
MJ
2123LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2124
2125 btrfs_find_free_extent,
2126
2127 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2128 u64 data),
2129
2130 TP_ARGS(fs_info, num_bytes, empty_size, data),
2131
2132 TP_FIELDS(
2133 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2134 ctf_integer(u64, num_bytes, num_bytes)
2135 ctf_integer(u64, empty_size, empty_size)
2136 ctf_integer(u64, data, data)
2137 )
2138)
2139
5f4c791e 2140#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
ab1ddefc
MJ
2141
2142LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2143
2144 btrfs_find_free_extent,
2145
2146 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2147 u64 data),
2148
2149 TP_ARGS(fs_info, num_bytes, empty_size, data),
2150
2151 TP_FIELDS(
2152 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2153 ctf_integer(u64, num_bytes, num_bytes)
2154 ctf_integer(u64, empty_size, empty_size)
2155 ctf_integer(u64, data, data)
2156 )
2157)
2158
5f4c791e 2159#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
ab1ddefc
MJ
2160
2161LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2162
2163 btrfs_find_free_extent,
2164
2165 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2166 u64 data),
2167
2168 TP_ARGS(fs_info, num_bytes, empty_size, data),
2169
2170 TP_FIELDS(
2171 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2172 ctf_integer(u64, num_bytes, num_bytes)
2173 ctf_integer(u64, empty_size, empty_size)
2174 ctf_integer(u64, data, data)
2175 )
2176)
2177
5f4c791e 2178#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ab1ddefc
MJ
2179
2180LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2181
2182 btrfs_find_free_extent,
2183
2184 TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2185 u64 data),
2186
2187 TP_ARGS(fs_info, num_bytes, empty_size, data),
2188
2189 TP_FIELDS(
2190 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2191 ctf_integer(u64, num_bytes, num_bytes)
2192 ctf_integer(u64, empty_size, empty_size)
2193 ctf_integer(u64, data, data)
2194 )
2195)
2196
2197#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2198 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2199 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2200 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2201
2202LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2203
2204 btrfs_find_free_extent,
2205
2206 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2207 u64 data),
2208
2209 TP_ARGS(root, num_bytes, empty_size, data),
2210
2211 TP_FIELDS(
2212 ctf_integer(u64, root_objectid, root->root_key.objectid)
2213 ctf_integer(u64, num_bytes, num_bytes)
2214 ctf_integer(u64, empty_size, empty_size)
2215 ctf_integer(u64, data, data)
2216 )
2217)
3b67cf3e 2218#else
ab1ddefc
MJ
2219
2220LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2221
2222 btrfs_find_free_extent,
2223
2224 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2225 u64 data),
2226
2227 TP_ARGS(root, num_bytes, empty_size, data),
2228
2229 TP_FIELDS(
2230 ctf_integer(u64, root_objectid, root->root_key.objectid)
2231 ctf_integer(u64, num_bytes, num_bytes)
2232 ctf_integer(u64, empty_size, empty_size)
2233 ctf_integer(u64, data, data)
2234 )
2235)
2236#endif
2237
f39b4a3c
MJ
2238#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2239LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2240
2241 TP_PROTO(const struct btrfs_block_group *block_group,
2242 const struct find_free_extent_ctl *ffe_ctl),
2243
2244 TP_ARGS(block_group, ffe_ctl),
2245
2246 TP_FIELDS(
2247 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2248 ctf_integer(u64, bg_objectid, block_group->start)
2249 ctf_integer(u64, flags, block_group->flags)
2250 ctf_integer(u64, start, ffe_ctl->search_start)
2251 ctf_integer(u64, len, ffe_ctl->num_bytes)
2252 )
2253)
2254
2255LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2256
2257 TP_PROTO(const struct btrfs_block_group *block_group,
2258 const struct find_free_extent_ctl *ffe_ctl),
2259
2260 TP_ARGS(block_group, ffe_ctl)
2261)
2262
2263LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2264
2265 TP_PROTO(const struct btrfs_block_group *block_group,
2266 const struct find_free_extent_ctl *ffe_ctl),
2267
2268 TP_ARGS(block_group, ffe_ctl)
2269)
2270
2271#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
2272LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2273
2274 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2275 u64 len),
2276
2277 TP_ARGS(block_group, start, len),
2278
2279 TP_FIELDS(
2280 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2281 ctf_integer(u64, bg_objectid, block_group->start)
2282 ctf_integer(u64, flags, block_group->flags)
2283 ctf_integer(u64, start, start)
2284 ctf_integer(u64, len, len)
2285 )
2286)
2287
2288LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2289
2290 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2291 u64 len),
2292
2293 TP_ARGS(block_group, start, len)
2294)
2295
2296LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2297
2298 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2299 u64 len),
2300
2301 TP_ARGS(block_group, start, len)
2302)
2303
5f4c791e 2304#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
51ab0b1d
MJ
2305
2306LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2307
2308 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2309 u64 len),
2310
2311 TP_ARGS(block_group, start, len),
2312
2313 TP_FIELDS(
9d2f1147 2314 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
51ab0b1d
MJ
2315 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2316 ctf_integer(u64, flags, block_group->flags)
2317 ctf_integer(u64, start, start)
2318 ctf_integer(u64, len, len)
2319 )
2320)
2321
2322LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2323
2324 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2325 u64 len),
2326
2327 TP_ARGS(block_group, start, len)
2328)
2329
2330LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2331
2332 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2333 u64 len),
2334
2335 TP_ARGS(block_group, start, len)
2336)
ff8bdcc2 2337
5f4c791e 2338#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
2339
2340LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2341
9d2f1147 2342 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2343 const struct btrfs_block_group_cache *block_group, u64 start,
2344 u64 len),
2345
9d2f1147 2346 TP_ARGS(fs_info, block_group, start, len),
1f1ec4ed
MJ
2347
2348 TP_FIELDS(
9d2f1147 2349 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
2350 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2351 ctf_integer(u64, flags, block_group->flags)
2352 ctf_integer(u64, start, start)
2353 ctf_integer(u64, len, len)
2354 )
2355)
2356
2357LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2358
9d2f1147 2359 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2360 const struct btrfs_block_group_cache *block_group, u64 start,
2361 u64 len),
2362
9d2f1147 2363 TP_ARGS(fs_info, block_group, start, len)
1f1ec4ed
MJ
2364)
2365
2366LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2367
9d2f1147 2368 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2369 const struct btrfs_block_group_cache *block_group, u64 start,
2370 u64 len),
2371
9d2f1147 2372 TP_ARGS(fs_info, block_group, start, len)
1f1ec4ed
MJ
2373)
2374
5f4c791e 2375#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1f1ec4ed 2376
ff8bdcc2
MD
2377LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2378
9d2f1147 2379 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2380 struct btrfs_block_group_cache *block_group, u64 start,
2381 u64 len),
2382
9d2f1147 2383 TP_ARGS(fs_info, block_group, start, len),
ff8bdcc2
MD
2384
2385 TP_FIELDS(
2386 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2387 ctf_integer(u64, flags, block_group->flags)
2388 ctf_integer(u64, start, start)
2389 ctf_integer(u64, len, len)
2390 )
2391)
2392
2393LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2394
9d2f1147 2395 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2396 struct btrfs_block_group_cache *block_group, u64 start,
2397 u64 len),
2398
9d2f1147 2399 TP_ARGS(fs_info, block_group, start, len)
ff8bdcc2
MD
2400)
2401
2402LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2403
9d2f1147 2404 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2405 struct btrfs_block_group_cache *block_group, u64 start,
2406 u64 len),
2407
9d2f1147 2408 TP_ARGS(fs_info, block_group, start, len)
ff8bdcc2 2409)
0badc02f
MJ
2410#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2411 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2412 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2413 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e 2414
7ca7cd6e
MJ
2415LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2416
2417 TP_PROTO(const struct btrfs_root *root,
2418 const struct btrfs_block_group_cache *block_group, u64 start,
2419 u64 len),
2420
2421 TP_ARGS(root, block_group, start, len),
2422
2423 TP_FIELDS(
2424 ctf_integer(u64, root_objectid, root->root_key.objectid)
2425 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2426 ctf_integer(u64, flags, block_group->flags)
2427 ctf_integer(u64, start, start)
2428 ctf_integer(u64, len, len)
2429 )
2430)
2431
2432LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2433
2434 TP_PROTO(const struct btrfs_root *root,
2435 const struct btrfs_block_group_cache *block_group, u64 start,
2436 u64 len),
2437
2438 TP_ARGS(root, block_group, start, len)
2439)
2440
2441LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2442
2443 TP_PROTO(const struct btrfs_root *root,
2444 const struct btrfs_block_group_cache *block_group, u64 start,
2445 u64 len),
2446
2447 TP_ARGS(root, block_group, start, len)
2448)
ff8bdcc2 2449
3b67cf3e 2450#else
ff8bdcc2 2451
3bc29f0a 2452LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
b87700e3
AG
2453
2454 TP_PROTO(struct btrfs_root *root,
2455 struct btrfs_block_group_cache *block_group, u64 start,
2456 u64 len),
2457
2458 TP_ARGS(root, block_group, start, len),
2459
f127e61e
MD
2460 TP_FIELDS(
2461 ctf_integer(u64, root_objectid, root->root_key.objectid)
2462 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2463 ctf_integer(u64, flags, block_group->flags)
2464 ctf_integer(u64, start, start)
2465 ctf_integer(u64, len, len)
2466 )
b87700e3
AG
2467)
2468
3bc29f0a 2469LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
b87700e3
AG
2470
2471 TP_PROTO(struct btrfs_root *root,
2472 struct btrfs_block_group_cache *block_group, u64 start,
2473 u64 len),
2474
2475 TP_ARGS(root, block_group, start, len)
2476)
2477
3bc29f0a 2478LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
b87700e3
AG
2479
2480 TP_PROTO(struct btrfs_root *root,
2481 struct btrfs_block_group_cache *block_group, u64 start,
2482 u64 len),
2483
2484 TP_ARGS(root, block_group, start, len)
2485)
2486
5f4c791e 2487#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 2488
5f4c791e 2489#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
2490LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2491
2492 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2493 u64 bytes, u64 empty_size, u64 min_bytes),
2494
2495 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2496
2497 TP_FIELDS(
2498 ctf_integer(u64, bg_objectid, block_group->start)
2499 ctf_integer(u64, flags, block_group->flags)
2500 ctf_integer(u64, start, start)
2501 ctf_integer(u64, bytes, bytes)
2502 ctf_integer(u64, empty_size, empty_size)
2503 ctf_integer(u64, min_bytes, min_bytes)
2504 )
2505)
2506
2507LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2508
2509 TP_PROTO(const struct btrfs_block_group *block_group),
2510
2511 TP_ARGS(block_group),
2512
2513 TP_FIELDS(
2514 ctf_integer(u64, bg_objectid, block_group->start)
2515 )
2516)
2517
2518LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2519
2520 TP_PROTO(const struct btrfs_block_group *block_group,
2521 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2522
2523 TP_ARGS(block_group, cluster, size, bitmap),
2524
2525 TP_FIELDS(
2526 ctf_integer(u64, bg_objectid, block_group->start)
2527 ctf_integer(u64, flags, block_group->flags)
2528 ctf_integer(u64, start, cluster->window_start)
2529 ctf_integer(u64, max_size, cluster->max_size)
2530 ctf_integer(u64, size, size)
2531 ctf_integer(int, bitmap, bitmap)
2532 )
2533)
5f4c791e 2534#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
2535 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2536 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2537 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 2538 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
2539LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2540
2541 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2542 u64 bytes, u64 empty_size, u64 min_bytes),
2543
2544 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2545
2546 TP_FIELDS(
2547 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2548 ctf_integer(u64, flags, block_group->flags)
2549 ctf_integer(u64, start, start)
2550 ctf_integer(u64, bytes, bytes)
2551 ctf_integer(u64, empty_size, empty_size)
2552 ctf_integer(u64, min_bytes, min_bytes)
2553 )
2554)
2555
2556LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2557
2558 TP_PROTO(const struct btrfs_block_group_cache *block_group),
2559
2560 TP_ARGS(block_group),
2561
2562 TP_FIELDS(
2563 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2564 )
2565)
2566
2567LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2568
2569 TP_PROTO(const struct btrfs_block_group_cache *block_group,
2570 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2571
2572 TP_ARGS(block_group, cluster, size, bitmap),
2573
2574 TP_FIELDS(
2575 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2576 ctf_integer(u64, flags, block_group->flags)
2577 ctf_integer(u64, start, cluster->window_start)
2578 ctf_integer(u64, max_size, cluster->max_size)
2579 ctf_integer(u64, size, size)
2580 ctf_integer(int, bitmap, bitmap)
2581 )
2582)
3b67cf3e 2583#else
3bc29f0a 2584LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
b87700e3
AG
2585
2586 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
2587 u64 bytes, u64 empty_size, u64 min_bytes),
2588
2589 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2590
f127e61e
MD
2591 TP_FIELDS(
2592 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2593 ctf_integer(u64, flags, block_group->flags)
2594 ctf_integer(u64, start, start)
2595 ctf_integer(u64, bytes, bytes)
2596 ctf_integer(u64, empty_size, empty_size)
2597 ctf_integer(u64, min_bytes, min_bytes)
2598 )
b87700e3
AG
2599)
2600
3bc29f0a 2601LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
b87700e3
AG
2602
2603 TP_PROTO(struct btrfs_block_group_cache *block_group),
2604
2605 TP_ARGS(block_group),
2606
f127e61e
MD
2607 TP_FIELDS(
2608 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2609 )
b87700e3
AG
2610)
2611
3bc29f0a 2612LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
b87700e3
AG
2613
2614 TP_PROTO(struct btrfs_block_group_cache *block_group,
2615 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2616
2617 TP_ARGS(block_group, cluster, size, bitmap),
2618
f127e61e
MD
2619 TP_FIELDS(
2620 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2621 ctf_integer(u64, flags, block_group->flags)
2622 ctf_integer(u64, start, cluster->window_start)
2623 ctf_integer(u64, max_size, cluster->max_size)
2624 ctf_integer(u64, size, size)
2625 ctf_integer(int, bitmap, bitmap)
2626 )
b87700e3
AG
2627)
2628#endif
2629
5f4c791e 2630#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
2631 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2632 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2633 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 2634 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
2635LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2636
2637 btrfs_alloc_extent_state,
2638
2639 TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
2640
2641 TP_ARGS(state, mask, IP),
2642
2643 TP_FIELDS(
2644 ctf_integer_hex(const struct extent_state *, state, state)
2645 ctf_integer(gfp_t, mask, mask)
2c054599 2646 ctf_integer_hex(unsigned long, ip, IP)
1f1ec4ed
MJ
2647 )
2648)
2649
2650LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2651
2652 btrfs_free_extent_state,
2653
2654 TP_PROTO(const struct extent_state *state, unsigned long IP),
2655
2656 TP_ARGS(state, IP),
2657
2658 TP_FIELDS(
2659 ctf_integer_hex(const struct extent_state *, state, state)
2c054599 2660 ctf_integer_hex(unsigned long, ip, IP)
1f1ec4ed
MJ
2661 )
2662)
3b67cf3e 2663#else
3bc29f0a 2664LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
9cf29d3e
MD
2665
2666 btrfs_alloc_extent_state,
b87700e3
AG
2667
2668 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
2669
2670 TP_ARGS(state, mask, IP),
2671
f127e61e 2672 TP_FIELDS(
fa91fcac 2673 ctf_integer_hex(struct extent_state *, state, state)
f127e61e 2674 ctf_integer(gfp_t, mask, mask)
2c054599 2675 ctf_integer_hex(unsigned long, ip, IP)
f127e61e 2676 )
b87700e3
AG
2677)
2678
3bc29f0a 2679LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
9cf29d3e
MD
2680
2681 btrfs_free_extent_state,
b87700e3
AG
2682
2683 TP_PROTO(struct extent_state *state, unsigned long IP),
2684
2685 TP_ARGS(state, IP),
2686
f127e61e 2687 TP_FIELDS(
fa91fcac 2688 ctf_integer_hex(struct extent_state *, state, state)
2c054599 2689 ctf_integer_hex(unsigned long, ip, IP)
f127e61e 2690 )
b87700e3
AG
2691)
2692#endif
2693
3bc29f0a 2694#endif /* LTTNG_TRACE_BTRFS_H */
b87700e3
AG
2695
2696/* This part must be outside protection */
3b4aafcb 2697#include <lttng/define_trace.h>
This page took 0.259345 seconds and 4 git commands to generate.