1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define TRACE_SYSTEM btrfs
5 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_BTRFS_H
8 #include <lttng/tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <lttng/kernel-version.h>
12 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
13 #include <../fs/btrfs/accessors.h>
16 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
17 #include <../fs/btrfs/extent-tree.h>
20 #ifndef _TRACE_BTRFS_DEF_
21 #define _TRACE_BTRFS_DEF_
26 struct btrfs_ordered_extent
;
27 struct btrfs_delayed_ref_node
;
28 struct btrfs_delayed_tree_ref
;
29 struct btrfs_delayed_data_ref
;
30 struct btrfs_delayed_ref_head
;
31 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
32 struct btrfs_block_group
;
33 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
34 struct btrfs_block_group_cache
;
36 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
37 struct btrfs_free_cluster
;
41 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
46 #define BTRFS_UUID_SIZE 16
48 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
49 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
51 #define lttng_fs_info_fsid fs_info->fsid
54 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
55 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
57 TP_PROTO(const struct btrfs_fs_info
*fs_info
),
62 ctf_integer(u64
, generation
, fs_info
->generation
)
63 ctf_integer(u64
, root_objectid
, BTRFS_ROOT_TREE_OBJECTID
)
66 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
67 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
68 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
69 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
70 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
71 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
73 TP_PROTO(const struct btrfs_root
*root
),
78 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
79 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
83 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
85 TP_PROTO(struct btrfs_root
*root
),
90 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
91 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
96 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
97 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
98 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
99 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
100 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
101 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
103 TP_PROTO(const struct inode
*inode
),
108 ctf_integer(ino_t
, ino
, inode
->i_ino
)
109 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
110 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
111 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
112 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
113 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
114 ctf_integer(u64
, root_objectid
,
115 BTRFS_I(inode
)->root
->root_key
.objectid
)
119 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
121 TP_PROTO(const struct inode
*inode
),
126 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
128 TP_PROTO(const struct inode
*inode
),
133 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
135 TP_PROTO(const struct inode
*inode
),
140 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
142 TP_PROTO(struct inode
*inode
),
147 ctf_integer(ino_t
, ino
, inode
->i_ino
)
148 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
149 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
150 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
151 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
152 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
153 ctf_integer(u64
, root_objectid
,
154 BTRFS_I(inode
)->root
->root_key
.objectid
)
158 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
160 TP_PROTO(struct inode
*inode
),
165 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
167 TP_PROTO(struct inode
*inode
),
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
174 TP_PROTO(struct inode
*inode
),
180 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
182 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
184 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
185 const struct extent_map
*map
),
187 TP_ARGS(root
, inode
, map
),
190 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
191 ctf_integer(u64
, ino
, btrfs_ino(inode
))
192 ctf_integer(u64
, start
, map
->start
)
193 ctf_integer(u64
, len
, map
->len
)
194 ctf_integer(u64
, orig_start
, map
->orig_start
)
195 ctf_integer(u64
, block_start
, map
->block_start
)
196 ctf_integer(u64
, block_len
, map
->block_len
)
197 ctf_integer(unsigned long, flags
, map
->flags
)
198 ctf_integer(int, refs
, refcount_read(&map
->refs
))
199 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
203 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
205 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
207 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
208 struct extent_map
*map
),
210 TP_ARGS(root
, inode
, map
),
213 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
214 ctf_integer(u64
, ino
, btrfs_ino(inode
))
215 ctf_integer(u64
, start
, map
->start
)
216 ctf_integer(u64
, len
, map
->len
)
217 ctf_integer(u64
, orig_start
, map
->orig_start
)
218 ctf_integer(u64
, block_start
, map
->block_start
)
219 ctf_integer(u64
, block_len
, map
->block_len
)
220 ctf_integer(unsigned long, flags
, map
->flags
)
221 ctf_integer(int, refs
, refcount_read(&map
->refs
))
222 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
226 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
228 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
230 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
231 struct extent_map
*map
),
233 TP_ARGS(root
, inode
, map
),
236 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
237 ctf_integer(u64
, ino
, btrfs_ino(inode
))
238 ctf_integer(u64
, start
, map
->start
)
239 ctf_integer(u64
, len
, map
->len
)
240 ctf_integer(u64
, orig_start
, map
->orig_start
)
241 ctf_integer(u64
, block_start
, map
->block_start
)
242 ctf_integer(u64
, block_len
, map
->block_len
)
243 ctf_integer(unsigned long, flags
, map
->flags
)
244 ctf_integer(int, refs
, atomic_read(&map
->refs
))
245 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
249 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
251 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
253 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
254 struct extent_map
*map
),
256 TP_ARGS(root
, inode
, map
),
259 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
260 ctf_integer(u64
, ino
, btrfs_ino(inode
))
261 ctf_integer(u64
, start
, map
->start
)
262 ctf_integer(u64
, len
, map
->len
)
263 ctf_integer(u64
, orig_start
, map
->orig_start
)
264 ctf_integer(u64
, block_start
, map
->block_start
)
265 ctf_integer(u64
, block_len
, map
->block_len
)
266 ctf_integer(unsigned long, flags
, map
->flags
)
267 ctf_integer(int, refs
, atomic_read(&map
->refs
))
268 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
272 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
273 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
274 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
275 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
277 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
279 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
284 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
285 ctf_integer(u64
, start
, map
->start
)
286 ctf_integer(u64
, len
, map
->len
)
287 ctf_integer(u64
, orig_start
, map
->orig_start
)
288 ctf_integer(u64
, block_start
, map
->block_start
)
289 ctf_integer(u64
, block_len
, map
->block_len
)
290 ctf_integer(unsigned long, flags
, map
->flags
)
291 ctf_integer(int, refs
, atomic_read(&map
->refs
))
292 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
296 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
298 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
300 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
305 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
306 ctf_integer(u64
, start
, map
->start
)
307 ctf_integer(u64
, len
, map
->len
)
308 ctf_integer(u64
, orig_start
, map
->orig_start
)
309 ctf_integer(u64
, block_start
, map
->block_start
)
310 ctf_integer(u64
, block_len
, map
->block_len
)
311 ctf_integer(unsigned long, flags
, map
->flags
)
312 ctf_integer(int, refs
, atomic_read(&map
->refs
))
313 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
317 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
319 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
320 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
322 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
323 const struct extent_map
*existing
, const struct extent_map
*map
,
326 TP_ARGS(fs_info
, existing
, map
, start
, len
),
329 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
330 ctf_integer(u64
, e_start
, existing
->start
)
331 ctf_integer(u64
, e_len
, existing
->len
)
332 ctf_integer(u64
, map_start
, map
->start
)
333 ctf_integer(u64
, map_len
, map
->len
)
334 ctf_integer(u64
, start
, start
)
335 ctf_integer(u64
, len
, len
)
338 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
339 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
341 TP_PROTO(struct btrfs_fs_info
*fs_info
,
342 const struct extent_map
*existing
, const struct extent_map
*map
,
345 TP_ARGS(fs_info
, existing
, map
, start
, len
),
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
)
357 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
358 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
360 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
362 TP_ARGS(existing
, map
, start
, len
),
365 ctf_integer(u64
, e_start
, existing
->start
)
366 ctf_integer(u64
, e_len
, existing
->len
)
367 ctf_integer(u64
, map_start
, map
->start
)
368 ctf_integer(u64
, map_len
, map
->len
)
369 ctf_integer(u64
, start
, start
)
370 ctf_integer(u64
, len
, len
)
375 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
376 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
378 TP_PROTO(const struct btrfs_inode
*inode
,
379 const struct btrfs_ordered_extent
*ordered
),
381 TP_ARGS(inode
, ordered
),
384 ctf_array(u8
, fsid
, inode
->root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
385 ctf_integer(ino_t
, ino
, btrfs_ino(inode
))
386 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
387 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
388 ctf_integer(u64
, len
, ordered
->num_bytes
)
389 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
390 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
391 ctf_integer(unsigned long, flags
, ordered
->flags
)
392 ctf_integer(int, compress_type
, ordered
->compress_type
)
393 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
394 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
397 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
398 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
400 TP_PROTO(const struct inode
*inode
,
401 const struct btrfs_ordered_extent
*ordered
),
403 TP_ARGS(inode
, ordered
),
406 ctf_integer(ino_t
, ino
, inode
->i_ino
)
407 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
408 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
409 ctf_integer(u64
, len
, ordered
->num_bytes
)
410 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
411 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
412 ctf_integer(unsigned long, flags
, ordered
->flags
)
413 ctf_integer(int, compress_type
, ordered
->compress_type
)
414 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
415 ctf_integer(u64
, root_objectid
,
416 BTRFS_I(inode
)->root
->root_key
.objectid
)
419 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
420 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
422 TP_PROTO(const struct inode
*inode
,
423 const struct btrfs_ordered_extent
*ordered
),
425 TP_ARGS(inode
, ordered
),
428 ctf_integer(ino_t
, ino
, inode
->i_ino
)
429 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
430 ctf_integer(u64
, start
, ordered
->start
)
431 ctf_integer(u64
, len
, ordered
->len
)
432 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
433 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
434 ctf_integer(unsigned long, flags
, ordered
->flags
)
435 ctf_integer(int, compress_type
, ordered
->compress_type
)
436 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
437 ctf_integer(u64
, root_objectid
,
438 BTRFS_I(inode
)->root
->root_key
.objectid
)
441 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
442 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
444 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
446 TP_ARGS(inode
, ordered
),
449 ctf_integer(ino_t
, ino
, inode
->i_ino
)
450 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
451 ctf_integer(u64
, start
, ordered
->start
)
452 ctf_integer(u64
, len
, ordered
->len
)
453 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
454 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
455 ctf_integer(unsigned long, flags
, ordered
->flags
)
456 ctf_integer(int, compress_type
, ordered
->compress_type
)
457 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
458 ctf_integer(u64
, root_objectid
,
459 BTRFS_I(inode
)->root
->root_key
.objectid
)
462 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
463 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
464 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
465 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
466 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
468 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
470 TP_ARGS(inode
, ordered
),
473 ctf_integer(ino_t
, ino
, inode
->i_ino
)
474 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
475 ctf_integer(u64
, start
, ordered
->start
)
476 ctf_integer(u64
, len
, ordered
->len
)
477 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
478 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
479 ctf_integer(unsigned long, flags
, ordered
->flags
)
480 ctf_integer(int, compress_type
, ordered
->compress_type
)
481 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
482 ctf_integer(u64
, root_objectid
,
483 BTRFS_I(inode
)->root
->root_key
.objectid
)
487 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
489 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
491 TP_ARGS(inode
, ordered
),
494 ctf_integer(ino_t
, ino
, inode
->i_ino
)
495 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
496 ctf_integer(u64
, start
, ordered
->start
)
497 ctf_integer(u64
, len
, ordered
->len
)
498 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
499 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
500 ctf_integer(unsigned long, flags
, ordered
->flags
)
501 ctf_integer(int, compress_type
, ordered
->compress_type
)
502 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
503 ctf_integer(u64
, root_objectid
,
504 BTRFS_I(inode
)->root
->root_key
.objectid
)
509 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
510 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
512 TP_PROTO(const struct btrfs_inode
*inode
,
513 const struct btrfs_ordered_extent
*ordered
),
515 TP_ARGS(inode
, ordered
)
518 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
520 TP_PROTO(const struct btrfs_inode
*inode
,
521 const struct btrfs_ordered_extent
*ordered
),
523 TP_ARGS(inode
, ordered
)
526 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
528 TP_PROTO(const struct btrfs_inode
*inode
,
529 const struct btrfs_ordered_extent
*ordered
),
531 TP_ARGS(inode
, ordered
)
534 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
536 TP_PROTO(const struct btrfs_inode
*inode
,
537 const struct btrfs_ordered_extent
*ordered
),
539 TP_ARGS(inode
, ordered
)
541 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
542 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
543 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
544 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
545 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
546 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
548 TP_PROTO(const struct inode
*inode
,
549 const struct btrfs_ordered_extent
*ordered
),
551 TP_ARGS(inode
, ordered
)
554 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
556 TP_PROTO(const struct inode
*inode
,
557 const struct btrfs_ordered_extent
*ordered
),
559 TP_ARGS(inode
, ordered
)
562 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
564 TP_PROTO(const struct inode
*inode
,
565 const struct btrfs_ordered_extent
*ordered
),
567 TP_ARGS(inode
, ordered
)
570 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
572 TP_PROTO(const struct inode
*inode
,
573 const struct btrfs_ordered_extent
*ordered
),
575 TP_ARGS(inode
, ordered
)
578 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
580 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
582 TP_ARGS(inode
, ordered
)
585 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
587 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
589 TP_ARGS(inode
, ordered
)
592 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
594 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
596 TP_ARGS(inode
, ordered
)
599 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
601 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
603 TP_ARGS(inode
, ordered
)
607 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
608 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
610 TP_PROTO(const struct btrfs_inode
*inode
, u64 start
, u64 end
, int uptodate
),
612 TP_ARGS(inode
, start
, end
, uptodate
),
615 ctf_integer(u64
, ino
, btrfs_ino(inode
))
616 ctf_integer(u64
, start
, start
)
617 ctf_integer(u64
, end
, end
)
618 ctf_integer(int, uptodate
, uptodate
)
619 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
623 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
624 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
625 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
626 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
627 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
629 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
631 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
633 TP_ARGS(page
, start
, end
, uptodate
),
636 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
637 ctf_integer(pgoff_t
, index
, page
->index
)
638 ctf_integer(u64
, start
, start
)
639 ctf_integer(u64
, end
, end
)
640 ctf_integer(int, uptodate
, uptodate
)
641 ctf_integer(u64
, root_objectid
,
642 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
648 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
650 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
652 TP_ARGS(page
, start
, end
, uptodate
),
655 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
656 ctf_integer(pgoff_t
, index
, page
->index
)
657 ctf_integer(u64
, start
, start
)
658 ctf_integer(u64
, end
, end
)
659 ctf_integer(int, uptodate
, uptodate
)
660 ctf_integer(u64
, root_objectid
,
661 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
666 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
667 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
668 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
669 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
670 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
671 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
673 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
674 const struct writeback_control
*wbc
),
676 TP_ARGS(page
, inode
, wbc
),
679 ctf_integer(ino_t
, ino
, inode
->i_ino
)
680 ctf_integer(pgoff_t
, index
, page
->index
)
681 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
682 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
683 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
684 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
685 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
686 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
687 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
688 ctf_integer(pgoff_t
, writeback_index
,
689 inode
->i_mapping
->writeback_index
)
690 ctf_integer(u64
, root_objectid
,
691 BTRFS_I(inode
)->root
->root_key
.objectid
)
695 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
699 btrfs__extent_writepage
,
701 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
702 const struct writeback_control
*wbc
),
704 TP_ARGS(page
, inode
, wbc
)
707 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
709 TP_PROTO(const struct file
*file
, int datasync
),
711 TP_ARGS(file
, datasync
),
714 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
715 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
716 ctf_integer(int, datasync
, datasync
)
717 ctf_integer(u64
, root_objectid
,
718 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
722 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
724 TP_PROTO(struct page
*page
, struct inode
*inode
,
725 struct writeback_control
*wbc
),
727 TP_ARGS(page
, inode
, wbc
),
730 ctf_integer(ino_t
, ino
, inode
->i_ino
)
731 ctf_integer(pgoff_t
, index
, page
->index
)
732 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
733 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
734 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
735 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
736 #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
737 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
739 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
740 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
741 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
742 ctf_integer(pgoff_t
, writeback_index
,
743 inode
->i_mapping
->writeback_index
)
744 ctf_integer(u64
, root_objectid
,
745 BTRFS_I(inode
)->root
->root_key
.objectid
)
749 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
753 btrfs__extent_writepage
,
755 TP_PROTO(struct page
*page
, struct inode
*inode
,
756 struct writeback_control
*wbc
),
758 TP_ARGS(page
, inode
, wbc
)
761 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
763 TP_PROTO(struct file
*file
, int datasync
),
765 TP_ARGS(file
, datasync
),
768 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
769 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
770 ctf_integer(int, datasync
, datasync
)
771 ctf_integer(u64
, root_objectid
,
772 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
777 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
778 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
779 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
780 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
781 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
782 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
783 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
784 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
785 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
787 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
789 TP_ARGS(fs_info
, wait
),
792 ctf_integer(int, wait
, wait
)
795 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
796 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
798 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
800 TP_ARGS(fs_info
, wait
),
803 ctf_integer(int, wait
, wait
)
807 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
814 ctf_integer(int, wait
, wait
)
819 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
820 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
822 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
823 const struct btrfs_block_group
*block_group
, int create
),
825 TP_ARGS(fs_info
, block_group
, create
),
828 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
829 ctf_integer(u64
, offset
, block_group
->start
)
830 ctf_integer(u64
, size
, block_group
->length
)
831 ctf_integer(u64
, flags
, block_group
->flags
)
832 ctf_integer(u64
, bytes_used
, block_group
->used
)
833 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
834 ctf_integer(int, create
, create
)
837 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
838 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
839 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
840 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
841 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
842 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
844 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
845 const struct btrfs_block_group_cache
*block_group
, int create
),
847 TP_ARGS(fs_info
, block_group
, create
),
850 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
851 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
852 ctf_integer(u64
, size
, block_group
->key
.offset
)
853 ctf_integer(u64
, flags
, block_group
->flags
)
854 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
855 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
856 ctf_integer(int, create
, create
)
860 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
862 TP_PROTO(struct btrfs_fs_info
*fs_info
,
863 struct btrfs_block_group_cache
*block_group
, int create
),
865 TP_ARGS(fs_info
, block_group
, create
),
868 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
869 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
870 ctf_integer(u64
, size
, block_group
->key
.offset
)
871 ctf_integer(u64
, flags
, block_group
->flags
)
872 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
873 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
874 ctf_integer(int, create
, create
)
879 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
880 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
881 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
882 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
883 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
884 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
885 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
886 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
887 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
889 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
890 const struct btrfs_delayed_ref_node
*ref
,
891 const struct btrfs_delayed_tree_ref
*full_ref
,
894 TP_ARGS(fs_info
, ref
, full_ref
, action
),
897 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
898 ctf_integer(u64
, bytenr
, ref
->bytenr
)
899 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
900 ctf_integer(int, action
, action
)
901 ctf_integer(u64
, parent
, full_ref
->parent
)
902 ctf_integer(u64
, ref_root
, full_ref
->root
)
903 ctf_integer(int, level
, full_ref
->level
)
904 ctf_integer(int, type
, ref
->type
)
905 ctf_integer(u64
, seq
, ref
->seq
)
909 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
911 add_delayed_tree_ref
,
913 btrfs_add_delayed_tree_ref
,
915 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
916 const struct btrfs_delayed_ref_node
*ref
,
917 const struct btrfs_delayed_tree_ref
*full_ref
,
920 TP_ARGS(fs_info
, ref
, full_ref
, action
)
923 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
925 run_delayed_tree_ref
,
927 btrfs_run_delayed_tree_ref
,
929 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
930 const struct btrfs_delayed_ref_node
*ref
,
931 const struct btrfs_delayed_tree_ref
*full_ref
,
934 TP_ARGS(fs_info
, ref
, full_ref
, action
)
936 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
937 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
939 TP_PROTO(struct btrfs_fs_info
*fs_info
,
940 struct btrfs_delayed_ref_node
*ref
,
941 struct btrfs_delayed_tree_ref
*full_ref
,
944 TP_ARGS(fs_info
, ref
, full_ref
, action
),
947 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
948 ctf_integer(u64
, bytenr
, ref
->bytenr
)
949 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
950 ctf_integer(int, action
, action
)
951 ctf_integer(u64
, parent
, full_ref
->parent
)
952 ctf_integer(u64
, ref_root
, full_ref
->root
)
953 ctf_integer(int, level
, full_ref
->level
)
954 ctf_integer(int, type
, ref
->type
)
955 ctf_integer(u64
, seq
, ref
->seq
)
959 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
961 add_delayed_tree_ref
,
963 btrfs_add_delayed_tree_ref
,
965 TP_PROTO(struct btrfs_fs_info
*fs_info
,
966 struct btrfs_delayed_ref_node
*ref
,
967 struct btrfs_delayed_tree_ref
*full_ref
,
970 TP_ARGS(fs_info
, ref
, full_ref
, action
)
973 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
975 run_delayed_tree_ref
,
977 btrfs_run_delayed_tree_ref
,
979 TP_PROTO(struct btrfs_fs_info
*fs_info
,
980 struct btrfs_delayed_ref_node
*ref
,
981 struct btrfs_delayed_tree_ref
*full_ref
,
984 TP_ARGS(fs_info
, ref
, full_ref
, action
)
986 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
987 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
989 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
990 const struct btrfs_delayed_tree_ref
*full_ref
,
993 TP_ARGS(ref
, full_ref
, action
),
996 ctf_integer(u64
, bytenr
, ref
->bytenr
)
997 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
998 ctf_integer(int, action
, action
)
999 ctf_integer(u64
, parent
, full_ref
->parent
)
1000 ctf_integer(u64
, ref_root
, full_ref
->root
)
1001 ctf_integer(int, level
, full_ref
->level
)
1002 ctf_integer(int, type
, ref
->type
)
1003 ctf_integer(u64
, seq
, ref
->seq
)
1007 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1009 add_delayed_tree_ref
,
1011 btrfs_add_delayed_tree_ref
,
1013 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1014 const struct btrfs_delayed_tree_ref
*full_ref
,
1017 TP_ARGS(ref
, full_ref
, action
)
1020 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1022 run_delayed_tree_ref
,
1024 btrfs_run_delayed_tree_ref
,
1026 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1027 const struct btrfs_delayed_tree_ref
*full_ref
,
1030 TP_ARGS(ref
, full_ref
, action
)
1032 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
1033 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1035 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1036 struct btrfs_delayed_tree_ref
*full_ref
,
1039 TP_ARGS(ref
, full_ref
, action
),
1042 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1043 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1044 ctf_integer(int, action
, action
)
1045 ctf_integer(u64
, parent
, full_ref
->parent
)
1046 ctf_integer(u64
, ref_root
, full_ref
->root
)
1047 ctf_integer(int, level
, full_ref
->level
)
1048 ctf_integer(int, type
, ref
->type
)
1049 ctf_integer(u64
, seq
, ref
->seq
)
1053 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1055 add_delayed_tree_ref
,
1057 btrfs_add_delayed_tree_ref
,
1059 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1060 struct btrfs_delayed_tree_ref
*full_ref
,
1063 TP_ARGS(ref
, full_ref
, action
)
1066 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1068 run_delayed_tree_ref
,
1070 btrfs_run_delayed_tree_ref
,
1072 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1073 struct btrfs_delayed_tree_ref
*full_ref
,
1076 TP_ARGS(ref
, full_ref
, action
)
1078 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
1079 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
1081 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1082 struct btrfs_delayed_tree_ref
*full_ref
,
1085 TP_ARGS(ref
, full_ref
, action
),
1088 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1089 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1090 ctf_integer(int, action
, action
)
1091 ctf_integer(u64
, parent
, full_ref
->parent
)
1092 ctf_integer(u64
, ref_root
, full_ref
->root
)
1093 ctf_integer(int, level
, full_ref
->level
)
1094 ctf_integer(int, type
, ref
->type
)
1095 ctf_integer(u64
, seq
, ref
->seq
)
1099 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
1101 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1102 struct btrfs_delayed_tree_ref
*full_ref
,
1105 TP_ARGS(ref
, full_ref
, action
),
1108 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1109 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1110 ctf_integer(int, action
, action
)
1111 ctf_integer(u64
, parent
, full_ref
->parent
)
1112 ctf_integer(u64
, ref_root
, full_ref
->root
)
1113 ctf_integer(int, level
, full_ref
->level
)
1114 ctf_integer(int, type
, ref
->type
)
1119 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1120 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1121 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1122 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1123 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1124 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1125 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1126 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1127 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1129 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1130 const struct btrfs_delayed_ref_node
*ref
,
1131 const struct btrfs_delayed_data_ref
*full_ref
,
1134 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1137 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1138 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1139 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1140 ctf_integer(int, action
, action
)
1141 ctf_integer(u64
, parent
, full_ref
->parent
)
1142 ctf_integer(u64
, ref_root
, full_ref
->root
)
1143 ctf_integer(u64
, owner
, full_ref
->objectid
)
1144 ctf_integer(u64
, offset
, full_ref
->offset
)
1145 ctf_integer(int, type
, ref
->type
)
1146 ctf_integer(u64
, seq
, ref
->seq
)
1150 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1152 add_delayed_data_ref
,
1154 btrfs_add_delayed_data_ref
,
1156 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1157 const struct btrfs_delayed_ref_node
*ref
,
1158 const struct btrfs_delayed_data_ref
*full_ref
,
1161 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1164 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1166 run_delayed_data_ref
,
1168 btrfs_run_delayed_data_ref
,
1170 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1171 const struct btrfs_delayed_ref_node
*ref
,
1172 const struct btrfs_delayed_data_ref
*full_ref
,
1175 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1177 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1178 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1180 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1181 struct btrfs_delayed_ref_node
*ref
,
1182 struct btrfs_delayed_data_ref
*full_ref
,
1185 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1188 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1189 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1190 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1191 ctf_integer(int, action
, action
)
1192 ctf_integer(u64
, parent
, full_ref
->parent
)
1193 ctf_integer(u64
, ref_root
, full_ref
->root
)
1194 ctf_integer(u64
, owner
, full_ref
->objectid
)
1195 ctf_integer(u64
, offset
, full_ref
->offset
)
1196 ctf_integer(int, type
, ref
->type
)
1197 ctf_integer(u64
, seq
, ref
->seq
)
1201 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1203 add_delayed_data_ref
,
1205 btrfs_add_delayed_data_ref
,
1207 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1208 struct btrfs_delayed_ref_node
*ref
,
1209 struct btrfs_delayed_data_ref
*full_ref
,
1212 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1215 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1217 run_delayed_data_ref
,
1219 btrfs_run_delayed_data_ref
,
1221 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1222 struct btrfs_delayed_ref_node
*ref
,
1223 struct btrfs_delayed_data_ref
*full_ref
,
1226 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1228 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1229 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1231 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1232 const struct btrfs_delayed_data_ref
*full_ref
,
1235 TP_ARGS(ref
, full_ref
, action
),
1238 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1239 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1240 ctf_integer(int, action
, action
)
1241 ctf_integer(u64
, parent
, full_ref
->parent
)
1242 ctf_integer(u64
, ref_root
, full_ref
->root
)
1243 ctf_integer(u64
, owner
, full_ref
->objectid
)
1244 ctf_integer(u64
, offset
, full_ref
->offset
)
1245 ctf_integer(int, type
, ref
->type
)
1246 ctf_integer(u64
, seq
, ref
->seq
)
1250 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1252 add_delayed_data_ref
,
1254 btrfs_add_delayed_data_ref
,
1256 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1257 const struct btrfs_delayed_data_ref
*full_ref
,
1260 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1263 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1265 run_delayed_data_ref
,
1267 btrfs_run_delayed_data_ref
,
1269 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1270 const struct btrfs_delayed_data_ref
*full_ref
,
1273 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1275 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
1276 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1278 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1279 struct btrfs_delayed_data_ref
*full_ref
,
1282 TP_ARGS(ref
, full_ref
, action
),
1285 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1286 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1287 ctf_integer(int, action
, action
)
1288 ctf_integer(u64
, parent
, full_ref
->parent
)
1289 ctf_integer(u64
, ref_root
, full_ref
->root
)
1290 ctf_integer(u64
, owner
, full_ref
->objectid
)
1291 ctf_integer(u64
, offset
, full_ref
->offset
)
1292 ctf_integer(int, type
, ref
->type
)
1293 ctf_integer(u64
, seq
, ref
->seq
)
1297 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1299 add_delayed_data_ref
,
1301 btrfs_add_delayed_data_ref
,
1303 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1304 struct btrfs_delayed_data_ref
*full_ref
,
1307 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1310 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1312 run_delayed_data_ref
,
1314 btrfs_run_delayed_data_ref
,
1316 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1317 struct btrfs_delayed_data_ref
*full_ref
,
1320 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1322 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
1323 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1325 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1326 struct btrfs_delayed_data_ref
*full_ref
,
1329 TP_ARGS(ref
, full_ref
, action
),
1332 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1333 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1334 ctf_integer(int, action
, action
)
1335 ctf_integer(u64
, parent
, full_ref
->parent
)
1336 ctf_integer(u64
, ref_root
, full_ref
->root
)
1337 ctf_integer(u64
, owner
, full_ref
->objectid
)
1338 ctf_integer(u64
, offset
, full_ref
->offset
)
1339 ctf_integer(int, type
, ref
->type
)
1340 ctf_integer(u64
, seq
, ref
->seq
)
1344 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1346 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1347 struct btrfs_delayed_data_ref
*full_ref
,
1350 TP_ARGS(ref
, full_ref
, action
),
1353 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1354 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1355 ctf_integer(int, action
, action
)
1356 ctf_integer(u64
, parent
, full_ref
->parent
)
1357 ctf_integer(u64
, ref_root
, full_ref
->root
)
1358 ctf_integer(u64
, owner
, full_ref
->objectid
)
1359 ctf_integer(u64
, offset
, full_ref
->offset
)
1360 ctf_integer(int, type
, ref
->type
)
1365 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
1366 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1368 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1369 const struct btrfs_delayed_ref_head
*head_ref
,
1372 TP_ARGS(fs_info
, head_ref
, action
),
1375 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1376 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1377 ctf_integer(int, action
, action
)
1378 ctf_integer(int, is_data
, head_ref
->is_data
)
1382 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1384 add_delayed_ref_head
,
1386 btrfs_add_delayed_ref_head
,
1388 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1389 const struct btrfs_delayed_ref_head
*head_ref
,
1392 TP_ARGS(fs_info
, head_ref
, action
)
1395 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1397 run_delayed_ref_head
,
1399 btrfs_run_delayed_ref_head
,
1401 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1402 const struct btrfs_delayed_ref_head
*head_ref
,
1405 TP_ARGS(fs_info
, head_ref
, action
)
1408 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1409 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1410 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1411 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1412 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1413 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1414 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1415 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1417 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1419 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1420 const struct btrfs_delayed_ref_node
*ref
,
1421 const struct btrfs_delayed_ref_head
*head_ref
,
1424 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1427 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1428 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1429 ctf_integer(int, action
, action
)
1430 ctf_integer(int, is_data
, head_ref
->is_data
)
1434 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1436 add_delayed_ref_head
,
1438 btrfs_add_delayed_ref_head
,
1440 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1441 const struct btrfs_delayed_ref_node
*ref
,
1442 const struct btrfs_delayed_ref_head
*head_ref
,
1445 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1448 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1450 run_delayed_ref_head
,
1452 btrfs_run_delayed_ref_head
,
1454 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1455 const struct btrfs_delayed_ref_node
*ref
,
1456 const struct btrfs_delayed_ref_head
*head_ref
,
1459 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1462 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1463 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1465 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1466 struct btrfs_delayed_ref_node
*ref
,
1467 struct btrfs_delayed_ref_head
*head_ref
,
1470 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1473 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1474 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1475 ctf_integer(int, action
, action
)
1476 ctf_integer(int, is_data
, head_ref
->is_data
)
1480 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1482 add_delayed_ref_head
,
1484 btrfs_add_delayed_ref_head
,
1486 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1487 struct btrfs_delayed_ref_node
*ref
,
1488 struct btrfs_delayed_ref_head
*head_ref
,
1491 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1494 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1496 run_delayed_ref_head
,
1498 btrfs_run_delayed_ref_head
,
1500 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1501 struct btrfs_delayed_ref_node
*ref
,
1502 struct btrfs_delayed_ref_head
*head_ref
,
1505 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1508 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1509 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1511 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1512 const struct btrfs_delayed_ref_head
*head_ref
,
1515 TP_ARGS(ref
, head_ref
, action
),
1518 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1519 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1520 ctf_integer(int, action
, action
)
1521 ctf_integer(int, is_data
, head_ref
->is_data
)
1525 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1527 add_delayed_ref_head
,
1529 btrfs_add_delayed_ref_head
,
1531 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1532 const struct btrfs_delayed_ref_head
*head_ref
,
1535 TP_ARGS(ref
, head_ref
, action
)
1538 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1540 run_delayed_ref_head
,
1542 btrfs_run_delayed_ref_head
,
1544 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1545 const struct btrfs_delayed_ref_head
*head_ref
,
1548 TP_ARGS(ref
, head_ref
, action
)
1551 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
1552 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1554 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1555 struct btrfs_delayed_ref_head
*head_ref
,
1558 TP_ARGS(ref
, head_ref
, action
),
1561 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1562 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1563 ctf_integer(int, action
, action
)
1564 ctf_integer(int, is_data
, head_ref
->is_data
)
1568 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1570 add_delayed_ref_head
,
1572 btrfs_add_delayed_ref_head
,
1574 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1575 struct btrfs_delayed_ref_head
*head_ref
,
1578 TP_ARGS(ref
, head_ref
, action
)
1581 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1583 run_delayed_ref_head
,
1585 btrfs_run_delayed_ref_head
,
1587 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1588 struct btrfs_delayed_ref_head
*head_ref
,
1591 TP_ARGS(ref
, head_ref
, action
)
1595 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1597 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1598 struct btrfs_delayed_ref_head
*head_ref
,
1601 TP_ARGS(ref
, head_ref
, action
),
1604 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1605 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1606 ctf_integer(int, action
, action
)
1607 ctf_integer(int, is_data
, head_ref
->is_data
)
1612 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
1614 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1616 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1617 u64 offset
, u64 size
),
1619 TP_ARGS(fs_info
, map
, offset
, size
),
1622 ctf_integer(int, num_stripes
, map
->num_stripes
)
1623 ctf_integer(u64
, type
, map
->type
)
1624 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1625 ctf_integer(u64
, offset
, offset
)
1626 ctf_integer(u64
, size
, size
)
1627 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1631 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1633 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1634 u64 offset
, u64 size
),
1636 TP_ARGS(fs_info
, map
, offset
, size
)
1639 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1641 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1642 u64 offset
, u64 size
),
1644 TP_ARGS(fs_info
, map
, offset
, size
)
1647 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1649 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1651 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1652 u64 offset
, u64 size
),
1654 TP_ARGS(fs_info
, map
, offset
, size
),
1657 ctf_integer(int, num_stripes
, map
->num_stripes
)
1658 ctf_integer(u64
, type
, map
->type
)
1659 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1660 ctf_integer(u64
, offset
, offset
)
1661 ctf_integer(u64
, size
, size
)
1662 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1666 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1668 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1669 u64 offset
, u64 size
),
1671 TP_ARGS(fs_info
, map
, offset
, size
)
1674 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1676 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1677 u64 offset
, u64 size
),
1679 TP_ARGS(fs_info
, map
, offset
, size
)
1682 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1684 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1686 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1687 u64 offset
, u64 size
),
1689 TP_ARGS(fs_info
, map
, offset
, size
),
1692 ctf_integer(int, num_stripes
, map
->num_stripes
)
1693 ctf_integer(u64
, type
, map
->type
)
1694 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1695 ctf_integer(u64
, offset
, offset
)
1696 ctf_integer(u64
, size
, size
)
1697 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1701 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1703 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1704 u64 offset
, u64 size
),
1706 TP_ARGS(fs_info
, map
, offset
, size
)
1709 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1711 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1712 u64 offset
, u64 size
),
1714 TP_ARGS(fs_info
, map
, offset
, size
)
1717 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1718 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1719 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1720 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1722 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1724 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1725 u64 offset
, u64 size
),
1727 TP_ARGS(root
, map
, offset
, size
),
1730 ctf_integer(int, num_stripes
, map
->num_stripes
)
1731 ctf_integer(u64
, type
, map
->type
)
1732 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1733 ctf_integer(u64
, offset
, offset
)
1734 ctf_integer(u64
, size
, size
)
1735 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1739 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1741 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1742 u64 offset
, u64 size
),
1744 TP_ARGS(root
, map
, offset
, size
)
1747 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1749 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1750 u64 offset
, u64 size
),
1752 TP_ARGS(root
, map
, offset
, size
)
1755 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1757 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1759 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1760 u64 offset
, u64 size
),
1762 TP_ARGS(root
, map
, offset
, size
),
1765 ctf_integer(int, num_stripes
, map
->num_stripes
)
1766 ctf_integer(u64
, type
, map
->type
)
1767 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1768 ctf_integer(u64
, offset
, offset
)
1769 ctf_integer(u64
, size
, size
)
1770 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1774 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1776 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1777 u64 offset
, u64 size
),
1779 TP_ARGS(root
, map
, offset
, size
)
1782 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1784 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1785 u64 offset
, u64 size
),
1787 TP_ARGS(root
, map
, offset
, size
)
1790 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1792 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1793 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1794 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1795 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1796 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1797 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1799 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1800 const struct extent_buffer
*cow
),
1802 TP_ARGS(root
, buf
, cow
),
1805 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1806 ctf_integer(u64
, buf_start
, buf
->start
)
1807 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1808 ctf_integer(u64
, cow_start
, cow
->start
)
1809 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1810 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1814 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1816 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1817 struct extent_buffer
*cow
),
1819 TP_ARGS(root
, buf
, cow
),
1822 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1823 ctf_integer(u64
, buf_start
, buf
->start
)
1824 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1825 ctf_integer(u64
, cow_start
, cow
->start
)
1826 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1827 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1832 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1833 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1835 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const char *type
, u64 val
,
1836 u64 bytes
, int reserve
),
1838 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1841 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1842 ctf_string(type
, type
)
1843 ctf_integer(u64
, val
, val
)
1844 ctf_integer(u64
, bytes
, bytes
)
1845 ctf_integer(int, reserve
, reserve
)
1848 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1849 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1850 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1851 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1852 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1853 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1855 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1856 u64 bytes
, int reserve
),
1858 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1861 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1862 ctf_string(type
, type
)
1863 ctf_integer(u64
, val
, val
)
1864 ctf_integer(u64
, bytes
, bytes
)
1865 ctf_integer(int, reserve
, reserve
)
1868 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
1869 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1871 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1872 u64 bytes
, int reserve
),
1874 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1877 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1878 ctf_string(type
, type
)
1879 ctf_integer(u64
, val
, val
)
1880 ctf_integer(u64
, bytes
, bytes
)
1881 ctf_integer(int, reserve
, reserve
)
1886 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1888 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1890 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1892 TP_ARGS(fs_info
, start
, len
),
1895 ctf_integer(u64
, start
, start
)
1896 ctf_integer(u64
, len
, len
)
1900 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1902 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1904 TP_ARGS(fs_info
, start
, len
)
1907 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1909 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1911 TP_ARGS(fs_info
, start
, len
)
1914 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1916 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1918 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1920 TP_ARGS(fs_info
, start
, len
),
1923 ctf_integer(u64
, start
, start
)
1924 ctf_integer(u64
, len
, len
)
1928 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1930 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1932 TP_ARGS(fs_info
, start
, len
)
1935 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1937 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1939 TP_ARGS(fs_info
, start
, len
)
1942 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1943 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1944 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1945 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1947 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1949 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1951 TP_ARGS(root
, start
, len
),
1954 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1955 ctf_integer(u64
, start
, start
)
1956 ctf_integer(u64
, len
, len
)
1960 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1962 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1964 TP_ARGS(root
, start
, len
)
1967 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1969 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1971 TP_ARGS(root
, start
, len
)
1974 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1976 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1978 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1980 TP_ARGS(root
, start
, len
),
1983 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1984 ctf_integer(u64
, start
, start
)
1985 ctf_integer(u64
, len
, len
)
1989 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1991 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1993 TP_ARGS(root
, start
, len
)
1996 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1998 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
2000 TP_ARGS(root
, start
, len
)
2003 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2005 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2006 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2008 btrfs_find_free_extent
,
2010 TP_PROTO(const struct btrfs_root
*root
,
2011 const struct find_free_extent_ctl
*ffe_ctl
),
2013 TP_ARGS(root
, ffe_ctl
),
2016 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2017 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2018 ctf_integer(u64
, num_bytes
, ffe_ctl
->num_bytes
)
2019 ctf_integer(u64
, empty_size
, ffe_ctl
->empty_size
)
2020 ctf_integer(u64
, flags
, ffe_ctl
->flags
)
2024 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
2025 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
2026 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
2027 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
2028 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2030 btrfs_find_free_extent
,
2032 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2035 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2038 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2039 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2040 ctf_integer(u64
, num_bytes
, num_bytes
)
2041 ctf_integer(u64
, empty_size
, empty_size
)
2042 ctf_integer(u64
, data
, data
)
2046 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2048 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2050 btrfs_find_free_extent
,
2052 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2055 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2058 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2059 ctf_integer(u64
, num_bytes
, num_bytes
)
2060 ctf_integer(u64
, empty_size
, empty_size
)
2061 ctf_integer(u64
, data
, data
)
2065 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2067 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2069 btrfs_find_free_extent
,
2071 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2074 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2077 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2078 ctf_integer(u64
, num_bytes
, num_bytes
)
2079 ctf_integer(u64
, empty_size
, empty_size
)
2080 ctf_integer(u64
, data
, data
)
2084 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2086 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2088 btrfs_find_free_extent
,
2090 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2093 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2096 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2097 ctf_integer(u64
, num_bytes
, num_bytes
)
2098 ctf_integer(u64
, empty_size
, empty_size
)
2099 ctf_integer(u64
, data
, data
)
2103 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2105 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2107 btrfs_find_free_extent
,
2109 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2112 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2115 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2116 ctf_integer(u64
, num_bytes
, num_bytes
)
2117 ctf_integer(u64
, empty_size
, empty_size
)
2118 ctf_integer(u64
, data
, data
)
2122 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2123 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2124 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2125 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2127 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2129 btrfs_find_free_extent
,
2131 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2134 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2137 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2138 ctf_integer(u64
, num_bytes
, num_bytes
)
2139 ctf_integer(u64
, empty_size
, empty_size
)
2140 ctf_integer(u64
, data
, data
)
2143 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
2145 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2147 btrfs_find_free_extent
,
2149 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2152 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2155 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2156 ctf_integer(u64
, num_bytes
, num_bytes
)
2157 ctf_integer(u64
, empty_size
, empty_size
)
2158 ctf_integer(u64
, data
, data
)
2163 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2164 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2166 TP_PROTO(const struct btrfs_block_group
*block_group
,
2167 const struct find_free_extent_ctl
*ffe_ctl
),
2169 TP_ARGS(block_group
, ffe_ctl
),
2172 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2173 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2174 ctf_integer(u64
, flags
, block_group
->flags
)
2175 ctf_integer(u64
, start
, ffe_ctl
->search_start
)
2176 ctf_integer(u64
, len
, ffe_ctl
->num_bytes
)
2180 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2182 TP_PROTO(const struct btrfs_block_group
*block_group
,
2183 const struct find_free_extent_ctl
*ffe_ctl
),
2185 TP_ARGS(block_group
, ffe_ctl
)
2188 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2190 TP_PROTO(const struct btrfs_block_group
*block_group
,
2191 const struct find_free_extent_ctl
*ffe_ctl
),
2193 TP_ARGS(block_group
, ffe_ctl
)
2196 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2197 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2199 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2202 TP_ARGS(block_group
, start
, len
),
2205 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2206 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2207 ctf_integer(u64
, flags
, block_group
->flags
)
2208 ctf_integer(u64
, start
, start
)
2209 ctf_integer(u64
, len
, len
)
2213 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2215 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2218 TP_ARGS(block_group
, start
, len
)
2221 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2223 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2226 TP_ARGS(block_group
, start
, len
)
2229 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2231 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2233 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2236 TP_ARGS(block_group
, start
, len
),
2239 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2240 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2241 ctf_integer(u64
, flags
, block_group
->flags
)
2242 ctf_integer(u64
, start
, start
)
2243 ctf_integer(u64
, len
, len
)
2247 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2249 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2252 TP_ARGS(block_group
, start
, len
)
2255 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2257 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2260 TP_ARGS(block_group
, start
, len
)
2263 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2265 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2267 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2268 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2271 TP_ARGS(fs_info
, block_group
, start
, len
),
2274 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2275 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2276 ctf_integer(u64
, flags
, block_group
->flags
)
2277 ctf_integer(u64
, start
, start
)
2278 ctf_integer(u64
, len
, len
)
2282 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2284 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2285 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2288 TP_ARGS(fs_info
, block_group
, start
, len
)
2291 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2293 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2294 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2297 TP_ARGS(fs_info
, block_group
, start
, len
)
2300 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2302 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2304 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2305 struct btrfs_block_group_cache
*block_group
, u64 start
,
2308 TP_ARGS(fs_info
, block_group
, start
, len
),
2311 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2312 ctf_integer(u64
, flags
, block_group
->flags
)
2313 ctf_integer(u64
, start
, start
)
2314 ctf_integer(u64
, len
, len
)
2318 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2320 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2321 struct btrfs_block_group_cache
*block_group
, u64 start
,
2324 TP_ARGS(fs_info
, block_group
, start
, len
)
2327 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2329 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2330 struct btrfs_block_group_cache
*block_group
, u64 start
,
2333 TP_ARGS(fs_info
, block_group
, start
, len
)
2335 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2336 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2337 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2338 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2340 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2342 TP_PROTO(const struct btrfs_root
*root
,
2343 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2346 TP_ARGS(root
, block_group
, start
, len
),
2349 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
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
)
2357 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2359 TP_PROTO(const struct btrfs_root
*root
,
2360 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2363 TP_ARGS(root
, block_group
, start
, len
)
2366 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2368 TP_PROTO(const struct btrfs_root
*root
,
2369 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2372 TP_ARGS(root
, block_group
, start
, len
)
2375 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
2377 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2379 TP_PROTO(struct btrfs_root
*root
,
2380 struct btrfs_block_group_cache
*block_group
, u64 start
,
2383 TP_ARGS(root
, block_group
, start
, len
),
2386 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2387 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2388 ctf_integer(u64
, flags
, block_group
->flags
)
2389 ctf_integer(u64
, start
, start
)
2390 ctf_integer(u64
, len
, len
)
2394 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2396 TP_PROTO(struct btrfs_root
*root
,
2397 struct btrfs_block_group_cache
*block_group
, u64 start
,
2400 TP_ARGS(root
, block_group
, start
, len
)
2403 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2405 TP_PROTO(struct btrfs_root
*root
,
2406 struct btrfs_block_group_cache
*block_group
, u64 start
,
2409 TP_ARGS(root
, block_group
, start
, len
)
2412 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2414 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2415 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2417 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2418 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2420 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2423 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2424 ctf_integer(u64
, flags
, block_group
->flags
)
2425 ctf_integer(u64
, start
, start
)
2426 ctf_integer(u64
, bytes
, bytes
)
2427 ctf_integer(u64
, empty_size
, empty_size
)
2428 ctf_integer(u64
, min_bytes
, min_bytes
)
2432 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2434 TP_PROTO(const struct btrfs_block_group
*block_group
),
2436 TP_ARGS(block_group
),
2439 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2443 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2445 TP_PROTO(const struct btrfs_block_group
*block_group
,
2446 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2448 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2451 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2452 ctf_integer(u64
, flags
, block_group
->flags
)
2453 ctf_integer(u64
, start
, cluster
->window_start
)
2454 ctf_integer(u64
, max_size
, cluster
->max_size
)
2455 ctf_integer(u64
, size
, size
)
2456 ctf_integer(int, bitmap
, bitmap
)
2459 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2460 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2461 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2462 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2463 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2464 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2466 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2467 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2469 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2472 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2473 ctf_integer(u64
, flags
, block_group
->flags
)
2474 ctf_integer(u64
, start
, start
)
2475 ctf_integer(u64
, bytes
, bytes
)
2476 ctf_integer(u64
, empty_size
, empty_size
)
2477 ctf_integer(u64
, min_bytes
, min_bytes
)
2481 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2483 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2485 TP_ARGS(block_group
),
2488 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2492 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2494 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2495 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2497 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2500 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2501 ctf_integer(u64
, flags
, block_group
->flags
)
2502 ctf_integer(u64
, start
, cluster
->window_start
)
2503 ctf_integer(u64
, max_size
, cluster
->max_size
)
2504 ctf_integer(u64
, size
, size
)
2505 ctf_integer(int, bitmap
, bitmap
)
2508 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
2509 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2511 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2512 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2514 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2517 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2518 ctf_integer(u64
, flags
, block_group
->flags
)
2519 ctf_integer(u64
, start
, start
)
2520 ctf_integer(u64
, bytes
, bytes
)
2521 ctf_integer(u64
, empty_size
, empty_size
)
2522 ctf_integer(u64
, min_bytes
, min_bytes
)
2526 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2528 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2530 TP_ARGS(block_group
),
2533 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2537 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2539 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2540 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2542 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2545 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2546 ctf_integer(u64
, flags
, block_group
->flags
)
2547 ctf_integer(u64
, start
, cluster
->window_start
)
2548 ctf_integer(u64
, max_size
, cluster
->max_size
)
2549 ctf_integer(u64
, size
, size
)
2550 ctf_integer(int, bitmap
, bitmap
)
2555 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2556 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2557 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2558 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2559 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2560 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2562 btrfs_alloc_extent_state
,
2564 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2566 TP_ARGS(state
, mask
, IP
),
2569 ctf_integer_hex(const struct extent_state
*, state
, state
)
2570 ctf_integer(gfp_t
, mask
, mask
)
2571 ctf_integer_hex(unsigned long, ip
, IP
)
2575 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2577 btrfs_free_extent_state
,
2579 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2584 ctf_integer_hex(const struct extent_state
*, state
, state
)
2585 ctf_integer_hex(unsigned long, ip
, IP
)
2588 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
2589 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2591 btrfs_alloc_extent_state
,
2593 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2595 TP_ARGS(state
, mask
, IP
),
2598 ctf_integer_hex(struct extent_state
*, state
, state
)
2599 ctf_integer(gfp_t
, mask
, mask
)
2600 ctf_integer_hex(unsigned long, ip
, IP
)
2604 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2606 btrfs_free_extent_state
,
2608 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2613 ctf_integer_hex(struct extent_state
*, state
, state
)
2614 ctf_integer_hex(unsigned long, ip
, IP
)
2619 #endif /* LTTNG_TRACE_BTRFS_H */
2621 /* This part must be outside protection */
2622 #include <lttng/define_trace.h>