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
;
34 struct btrfs_block_group_cache
;
36 struct btrfs_free_cluster
;
42 #define BTRFS_UUID_SIZE 16
44 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
45 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
47 #define lttng_fs_info_fsid fs_info->fsid
50 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
51 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
53 TP_PROTO(const struct btrfs_fs_info
*fs_info
),
58 ctf_integer(u64
, generation
, fs_info
->generation
)
59 ctf_integer(u64
, root_objectid
, BTRFS_ROOT_TREE_OBJECTID
)
62 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
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) || \
66 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
67 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
69 TP_PROTO(const struct btrfs_root
*root
),
74 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
75 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
79 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
81 TP_PROTO(struct btrfs_root
*root
),
86 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
87 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
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))
97 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
99 TP_PROTO(const struct inode
*inode
),
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
)
115 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
117 TP_PROTO(const struct inode
*inode
),
122 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
124 TP_PROTO(const struct inode
*inode
),
129 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
131 TP_PROTO(const struct inode
*inode
),
136 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
138 TP_PROTO(struct inode
*inode
),
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
,
150 BTRFS_I(inode
)->root
->root_key
.objectid
)
154 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
156 TP_PROTO(struct inode
*inode
),
161 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
163 TP_PROTO(struct inode
*inode
),
168 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
170 TP_PROTO(struct inode
*inode
),
176 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
178 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
180 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
181 const struct extent_map
*map
),
183 TP_ARGS(root
, inode
, map
),
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 long, flags
, map
->flags
)
194 ctf_integer(int, refs
, refcount_read(&map
->refs
))
195 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
199 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
201 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
203 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
204 struct extent_map
*map
),
206 TP_ARGS(root
, inode
, map
),
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
)
222 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
224 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
226 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
227 struct extent_map
*map
),
229 TP_ARGS(root
, inode
, map
),
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
, atomic_read(&map
->refs
))
241 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
245 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
247 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
249 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
250 struct extent_map
*map
),
252 TP_ARGS(root
, inode
, map
),
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
)
268 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
269 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
270 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
271 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
273 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
275 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
280 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
281 ctf_integer(u64
, start
, map
->start
)
282 ctf_integer(u64
, len
, map
->len
)
283 ctf_integer(u64
, orig_start
, map
->orig_start
)
284 ctf_integer(u64
, block_start
, map
->block_start
)
285 ctf_integer(u64
, block_len
, map
->block_len
)
286 ctf_integer(unsigned long, flags
, map
->flags
)
287 ctf_integer(int, refs
, atomic_read(&map
->refs
))
288 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
292 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
294 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
296 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
301 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
302 ctf_integer(u64
, start
, map
->start
)
303 ctf_integer(u64
, len
, map
->len
)
304 ctf_integer(u64
, orig_start
, map
->orig_start
)
305 ctf_integer(u64
, block_start
, map
->block_start
)
306 ctf_integer(u64
, block_len
, map
->block_len
)
307 ctf_integer(unsigned long, flags
, map
->flags
)
308 ctf_integer(int, refs
, atomic_read(&map
->refs
))
309 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
313 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
315 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
316 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
318 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
319 const struct extent_map
*existing
, const struct extent_map
*map
,
322 TP_ARGS(fs_info
, existing
, map
, start
, len
),
325 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
326 ctf_integer(u64
, e_start
, existing
->start
)
327 ctf_integer(u64
, e_len
, existing
->len
)
328 ctf_integer(u64
, map_start
, map
->start
)
329 ctf_integer(u64
, map_len
, map
->len
)
330 ctf_integer(u64
, start
, start
)
331 ctf_integer(u64
, len
, len
)
334 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
335 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
337 TP_PROTO(struct btrfs_fs_info
*fs_info
,
338 const struct extent_map
*existing
, const struct extent_map
*map
,
341 TP_ARGS(fs_info
, existing
, map
, start
, len
),
344 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
345 ctf_integer(u64
, e_start
, existing
->start
)
346 ctf_integer(u64
, e_len
, existing
->len
)
347 ctf_integer(u64
, map_start
, map
->start
)
348 ctf_integer(u64
, map_len
, map
->len
)
349 ctf_integer(u64
, start
, start
)
350 ctf_integer(u64
, len
, len
)
353 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
354 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
356 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
358 TP_ARGS(existing
, map
, start
, len
),
361 ctf_integer(u64
, e_start
, existing
->start
)
362 ctf_integer(u64
, e_len
, existing
->len
)
363 ctf_integer(u64
, map_start
, map
->start
)
364 ctf_integer(u64
, map_len
, map
->len
)
365 ctf_integer(u64
, start
, start
)
366 ctf_integer(u64
, len
, len
)
371 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
372 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
374 TP_PROTO(const struct btrfs_inode
*inode
,
375 const struct btrfs_ordered_extent
*ordered
),
377 TP_ARGS(inode
, ordered
),
380 ctf_array(u8
, fsid
, inode
->root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
381 ctf_integer(ino_t
, ino
, btrfs_ino(inode
))
382 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
383 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
384 ctf_integer(u64
, len
, ordered
->num_bytes
)
385 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
386 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
387 ctf_integer(unsigned long, flags
, ordered
->flags
)
388 ctf_integer(int, compress_type
, ordered
->compress_type
)
389 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
390 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
393 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
394 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
396 TP_PROTO(const struct inode
*inode
,
397 const struct btrfs_ordered_extent
*ordered
),
399 TP_ARGS(inode
, ordered
),
402 ctf_integer(ino_t
, ino
, inode
->i_ino
)
403 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
404 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
405 ctf_integer(u64
, len
, ordered
->num_bytes
)
406 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
407 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
408 ctf_integer(unsigned long, flags
, ordered
->flags
)
409 ctf_integer(int, compress_type
, ordered
->compress_type
)
410 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
411 ctf_integer(u64
, root_objectid
,
412 BTRFS_I(inode
)->root
->root_key
.objectid
)
415 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
416 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
418 TP_PROTO(const struct inode
*inode
,
419 const struct btrfs_ordered_extent
*ordered
),
421 TP_ARGS(inode
, ordered
),
424 ctf_integer(ino_t
, ino
, inode
->i_ino
)
425 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
426 ctf_integer(u64
, start
, ordered
->start
)
427 ctf_integer(u64
, len
, ordered
->len
)
428 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
429 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
430 ctf_integer(unsigned long, flags
, ordered
->flags
)
431 ctf_integer(int, compress_type
, ordered
->compress_type
)
432 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
433 ctf_integer(u64
, root_objectid
,
434 BTRFS_I(inode
)->root
->root_key
.objectid
)
437 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
438 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
440 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
442 TP_ARGS(inode
, ordered
),
445 ctf_integer(ino_t
, ino
, inode
->i_ino
)
446 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
447 ctf_integer(u64
, start
, ordered
->start
)
448 ctf_integer(u64
, len
, ordered
->len
)
449 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
450 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
451 ctf_integer(unsigned long, flags
, ordered
->flags
)
452 ctf_integer(int, compress_type
, ordered
->compress_type
)
453 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
454 ctf_integer(u64
, root_objectid
,
455 BTRFS_I(inode
)->root
->root_key
.objectid
)
458 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
459 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
460 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
461 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
462 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
464 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
466 TP_ARGS(inode
, ordered
),
469 ctf_integer(ino_t
, ino
, inode
->i_ino
)
470 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
471 ctf_integer(u64
, start
, ordered
->start
)
472 ctf_integer(u64
, len
, ordered
->len
)
473 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
474 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
475 ctf_integer(unsigned long, flags
, ordered
->flags
)
476 ctf_integer(int, compress_type
, ordered
->compress_type
)
477 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
478 ctf_integer(u64
, root_objectid
,
479 BTRFS_I(inode
)->root
->root_key
.objectid
)
483 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
485 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
487 TP_ARGS(inode
, ordered
),
490 ctf_integer(ino_t
, ino
, inode
->i_ino
)
491 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
492 ctf_integer(u64
, start
, ordered
->start
)
493 ctf_integer(u64
, len
, ordered
->len
)
494 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
495 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
496 ctf_integer(unsigned long, flags
, ordered
->flags
)
497 ctf_integer(int, compress_type
, ordered
->compress_type
)
498 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
499 ctf_integer(u64
, root_objectid
,
500 BTRFS_I(inode
)->root
->root_key
.objectid
)
505 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
506 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
508 TP_PROTO(const struct btrfs_inode
*inode
,
509 const struct btrfs_ordered_extent
*ordered
),
511 TP_ARGS(inode
, ordered
)
514 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
516 TP_PROTO(const struct btrfs_inode
*inode
,
517 const struct btrfs_ordered_extent
*ordered
),
519 TP_ARGS(inode
, ordered
)
522 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
524 TP_PROTO(const struct btrfs_inode
*inode
,
525 const struct btrfs_ordered_extent
*ordered
),
527 TP_ARGS(inode
, ordered
)
530 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
532 TP_PROTO(const struct btrfs_inode
*inode
,
533 const struct btrfs_ordered_extent
*ordered
),
535 TP_ARGS(inode
, ordered
)
537 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
538 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
539 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
540 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
541 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
542 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
544 TP_PROTO(const struct inode
*inode
,
545 const struct btrfs_ordered_extent
*ordered
),
547 TP_ARGS(inode
, ordered
)
550 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
552 TP_PROTO(const struct inode
*inode
,
553 const struct btrfs_ordered_extent
*ordered
),
555 TP_ARGS(inode
, ordered
)
558 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
560 TP_PROTO(const struct inode
*inode
,
561 const struct btrfs_ordered_extent
*ordered
),
563 TP_ARGS(inode
, ordered
)
566 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
568 TP_PROTO(const struct inode
*inode
,
569 const struct btrfs_ordered_extent
*ordered
),
571 TP_ARGS(inode
, ordered
)
574 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
576 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
578 TP_ARGS(inode
, ordered
)
581 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
583 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
585 TP_ARGS(inode
, ordered
)
588 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
590 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
592 TP_ARGS(inode
, ordered
)
595 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
597 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
599 TP_ARGS(inode
, ordered
)
603 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
604 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup
,
606 TP_PROTO(const struct btrfs_inode
*inode
,
607 const struct btrfs_ordered_extent
*ordered
),
609 TP_ARGS(inode
, ordered
)
612 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_range
,
614 TP_PROTO(const struct btrfs_inode
*inode
,
615 const struct btrfs_ordered_extent
*ordered
),
617 TP_ARGS(inode
, ordered
)
620 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_first_range
,
622 TP_PROTO(const struct btrfs_inode
*inode
,
623 const struct btrfs_ordered_extent
*ordered
),
625 TP_ARGS(inode
, ordered
)
628 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_for_logging
,
630 TP_PROTO(const struct btrfs_inode
*inode
,
631 const struct btrfs_ordered_extent
*ordered
),
633 TP_ARGS(inode
, ordered
)
636 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_first
,
638 TP_PROTO(const struct btrfs_inode
*inode
,
639 const struct btrfs_ordered_extent
*ordered
),
641 TP_ARGS(inode
, ordered
)
644 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_split
,
646 TP_PROTO(const struct btrfs_inode
*inode
,
647 const struct btrfs_ordered_extent
*ordered
),
649 TP_ARGS(inode
, ordered
)
652 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_dec_test_pending
,
654 TP_PROTO(const struct btrfs_inode
*inode
,
655 const struct btrfs_ordered_extent
*ordered
),
657 TP_ARGS(inode
, ordered
)
660 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_mark_finished
,
662 TP_PROTO(const struct btrfs_inode
*inode
,
663 const struct btrfs_ordered_extent
*ordered
),
665 TP_ARGS(inode
, ordered
)
669 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
670 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
672 TP_PROTO(const struct btrfs_inode
*inode
, u64 start
, u64 end
, int uptodate
),
674 TP_ARGS(inode
, start
, end
, uptodate
),
677 ctf_integer(u64
, ino
, btrfs_ino(inode
))
678 ctf_integer(u64
, start
, start
)
679 ctf_integer(u64
, end
, end
)
680 ctf_integer(int, uptodate
, uptodate
)
681 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
685 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
686 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
687 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
688 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
689 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
691 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
693 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
695 TP_ARGS(page
, start
, end
, uptodate
),
698 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
699 ctf_integer(pgoff_t
, index
, page
->index
)
700 ctf_integer(u64
, start
, start
)
701 ctf_integer(u64
, end
, end
)
702 ctf_integer(int, uptodate
, uptodate
)
703 ctf_integer(u64
, root_objectid
,
704 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
710 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
712 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
714 TP_ARGS(page
, start
, end
, uptodate
),
717 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
718 ctf_integer(pgoff_t
, index
, page
->index
)
719 ctf_integer(u64
, start
, start
)
720 ctf_integer(u64
, end
, end
)
721 ctf_integer(int, uptodate
, uptodate
)
722 ctf_integer(u64
, root_objectid
,
723 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
728 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
729 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
730 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
731 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
732 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
733 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
735 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
736 const struct writeback_control
*wbc
),
738 TP_ARGS(page
, inode
, wbc
),
741 ctf_integer(ino_t
, ino
, inode
->i_ino
)
742 ctf_integer(pgoff_t
, index
, page
->index
)
743 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
744 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
745 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
746 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
747 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
748 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
749 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
750 ctf_integer(pgoff_t
, writeback_index
,
751 inode
->i_mapping
->writeback_index
)
752 ctf_integer(u64
, root_objectid
,
753 BTRFS_I(inode
)->root
->root_key
.objectid
)
757 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
761 btrfs__extent_writepage
,
763 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
764 const struct writeback_control
*wbc
),
766 TP_ARGS(page
, inode
, wbc
)
769 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
771 TP_PROTO(const struct file
*file
, int datasync
),
773 TP_ARGS(file
, datasync
),
776 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
777 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
778 ctf_integer(int, datasync
, datasync
)
779 ctf_integer(u64
, root_objectid
,
780 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
784 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
786 TP_PROTO(struct page
*page
, struct inode
*inode
,
787 struct writeback_control
*wbc
),
789 TP_ARGS(page
, inode
, wbc
),
792 ctf_integer(ino_t
, ino
, inode
->i_ino
)
793 ctf_integer(pgoff_t
, index
, page
->index
)
794 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
795 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
796 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
797 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
798 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
799 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
800 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
801 ctf_integer(pgoff_t
, writeback_index
,
802 inode
->i_mapping
->writeback_index
)
803 ctf_integer(u64
, root_objectid
,
804 BTRFS_I(inode
)->root
->root_key
.objectid
)
808 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
812 btrfs__extent_writepage
,
814 TP_PROTO(struct page
*page
, struct inode
*inode
,
815 struct writeback_control
*wbc
),
817 TP_ARGS(page
, inode
, wbc
)
820 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
822 TP_PROTO(struct file
*file
, int datasync
),
824 TP_ARGS(file
, datasync
),
827 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
828 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
829 ctf_integer(int, datasync
, datasync
)
830 ctf_integer(u64
, root_objectid
,
831 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
836 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
837 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
838 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
839 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
840 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
841 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
842 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
843 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
844 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
846 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
848 TP_ARGS(fs_info
, wait
),
851 ctf_integer(int, wait
, wait
)
854 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
855 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
857 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
859 TP_ARGS(fs_info
, wait
),
862 ctf_integer(int, wait
, wait
)
866 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
873 ctf_integer(int, wait
, wait
)
878 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
879 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
881 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
882 const struct btrfs_block_group
*block_group
, int create
),
884 TP_ARGS(fs_info
, block_group
, create
),
887 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
888 ctf_integer(u64
, offset
, block_group
->start
)
889 ctf_integer(u64
, size
, block_group
->length
)
890 ctf_integer(u64
, flags
, block_group
->flags
)
891 ctf_integer(u64
, bytes_used
, block_group
->used
)
892 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
893 ctf_integer(int, create
, create
)
896 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
897 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
898 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
899 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
900 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
901 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
903 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
904 const struct btrfs_block_group_cache
*block_group
, int create
),
906 TP_ARGS(fs_info
, block_group
, create
),
909 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
910 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
911 ctf_integer(u64
, size
, block_group
->key
.offset
)
912 ctf_integer(u64
, flags
, block_group
->flags
)
913 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
914 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
915 ctf_integer(int, create
, create
)
919 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
921 TP_PROTO(struct btrfs_fs_info
*fs_info
,
922 struct btrfs_block_group_cache
*block_group
, int create
),
924 TP_ARGS(fs_info
, block_group
, create
),
927 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
928 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
929 ctf_integer(u64
, size
, block_group
->key
.offset
)
930 ctf_integer(u64
, flags
, block_group
->flags
)
931 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
932 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
933 ctf_integer(int, create
, create
)
938 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
939 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
940 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
941 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
942 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
943 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
944 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
945 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
946 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
948 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
949 const struct btrfs_delayed_ref_node
*ref
,
950 const struct btrfs_delayed_tree_ref
*full_ref
,
953 TP_ARGS(fs_info
, ref
, full_ref
, action
),
956 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
957 ctf_integer(u64
, bytenr
, ref
->bytenr
)
958 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
959 ctf_integer(int, action
, action
)
960 ctf_integer(u64
, parent
, full_ref
->parent
)
961 ctf_integer(u64
, ref_root
, full_ref
->root
)
962 ctf_integer(int, level
, full_ref
->level
)
963 ctf_integer(int, type
, ref
->type
)
964 ctf_integer(u64
, seq
, ref
->seq
)
968 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
970 add_delayed_tree_ref
,
972 btrfs_add_delayed_tree_ref
,
974 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
975 const struct btrfs_delayed_ref_node
*ref
,
976 const struct btrfs_delayed_tree_ref
*full_ref
,
979 TP_ARGS(fs_info
, ref
, full_ref
, action
)
982 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
984 run_delayed_tree_ref
,
986 btrfs_run_delayed_tree_ref
,
988 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
989 const struct btrfs_delayed_ref_node
*ref
,
990 const struct btrfs_delayed_tree_ref
*full_ref
,
993 TP_ARGS(fs_info
, ref
, full_ref
, action
)
995 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
996 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
998 TP_PROTO(struct btrfs_fs_info
*fs_info
,
999 struct btrfs_delayed_ref_node
*ref
,
1000 struct btrfs_delayed_tree_ref
*full_ref
,
1003 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1006 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1007 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1008 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1009 ctf_integer(int, action
, action
)
1010 ctf_integer(u64
, parent
, full_ref
->parent
)
1011 ctf_integer(u64
, ref_root
, full_ref
->root
)
1012 ctf_integer(int, level
, full_ref
->level
)
1013 ctf_integer(int, type
, ref
->type
)
1014 ctf_integer(u64
, seq
, ref
->seq
)
1018 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1020 add_delayed_tree_ref
,
1022 btrfs_add_delayed_tree_ref
,
1024 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1025 struct btrfs_delayed_ref_node
*ref
,
1026 struct btrfs_delayed_tree_ref
*full_ref
,
1029 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1032 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1034 run_delayed_tree_ref
,
1036 btrfs_run_delayed_tree_ref
,
1038 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1039 struct btrfs_delayed_ref_node
*ref
,
1040 struct btrfs_delayed_tree_ref
*full_ref
,
1043 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1045 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1046 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1048 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1049 const struct btrfs_delayed_tree_ref
*full_ref
,
1052 TP_ARGS(ref
, full_ref
, action
),
1055 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1056 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1057 ctf_integer(int, action
, action
)
1058 ctf_integer(u64
, parent
, full_ref
->parent
)
1059 ctf_integer(u64
, ref_root
, full_ref
->root
)
1060 ctf_integer(int, level
, full_ref
->level
)
1061 ctf_integer(int, type
, ref
->type
)
1062 ctf_integer(u64
, seq
, ref
->seq
)
1066 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1068 add_delayed_tree_ref
,
1070 btrfs_add_delayed_tree_ref
,
1072 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1073 const struct btrfs_delayed_tree_ref
*full_ref
,
1076 TP_ARGS(ref
, full_ref
, action
)
1079 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1081 run_delayed_tree_ref
,
1083 btrfs_run_delayed_tree_ref
,
1085 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1086 const struct btrfs_delayed_tree_ref
*full_ref
,
1089 TP_ARGS(ref
, full_ref
, action
)
1092 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1094 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1095 struct btrfs_delayed_tree_ref
*full_ref
,
1098 TP_ARGS(ref
, full_ref
, action
),
1101 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1102 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1103 ctf_integer(int, action
, action
)
1104 ctf_integer(u64
, parent
, full_ref
->parent
)
1105 ctf_integer(u64
, ref_root
, full_ref
->root
)
1106 ctf_integer(int, level
, full_ref
->level
)
1107 ctf_integer(int, type
, ref
->type
)
1108 ctf_integer(u64
, seq
, ref
->seq
)
1112 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1114 add_delayed_tree_ref
,
1116 btrfs_add_delayed_tree_ref
,
1118 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1119 struct btrfs_delayed_tree_ref
*full_ref
,
1122 TP_ARGS(ref
, full_ref
, action
)
1125 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1127 run_delayed_tree_ref
,
1129 btrfs_run_delayed_tree_ref
,
1131 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1132 struct btrfs_delayed_tree_ref
*full_ref
,
1135 TP_ARGS(ref
, full_ref
, action
)
1139 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1140 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1141 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1142 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1143 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1144 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1145 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1146 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1147 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1149 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1150 const struct btrfs_delayed_ref_node
*ref
,
1151 const struct btrfs_delayed_data_ref
*full_ref
,
1154 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1157 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1158 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1159 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1160 ctf_integer(int, action
, action
)
1161 ctf_integer(u64
, parent
, full_ref
->parent
)
1162 ctf_integer(u64
, ref_root
, full_ref
->root
)
1163 ctf_integer(u64
, owner
, full_ref
->objectid
)
1164 ctf_integer(u64
, offset
, full_ref
->offset
)
1165 ctf_integer(int, type
, ref
->type
)
1166 ctf_integer(u64
, seq
, ref
->seq
)
1170 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1172 add_delayed_data_ref
,
1174 btrfs_add_delayed_data_ref
,
1176 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1177 const struct btrfs_delayed_ref_node
*ref
,
1178 const struct btrfs_delayed_data_ref
*full_ref
,
1181 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1184 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1186 run_delayed_data_ref
,
1188 btrfs_run_delayed_data_ref
,
1190 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1191 const struct btrfs_delayed_ref_node
*ref
,
1192 const struct btrfs_delayed_data_ref
*full_ref
,
1195 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1197 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1198 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1200 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1201 struct btrfs_delayed_ref_node
*ref
,
1202 struct btrfs_delayed_data_ref
*full_ref
,
1205 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1208 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1209 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1210 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1211 ctf_integer(int, action
, action
)
1212 ctf_integer(u64
, parent
, full_ref
->parent
)
1213 ctf_integer(u64
, ref_root
, full_ref
->root
)
1214 ctf_integer(u64
, owner
, full_ref
->objectid
)
1215 ctf_integer(u64
, offset
, full_ref
->offset
)
1216 ctf_integer(int, type
, ref
->type
)
1217 ctf_integer(u64
, seq
, ref
->seq
)
1221 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1223 add_delayed_data_ref
,
1225 btrfs_add_delayed_data_ref
,
1227 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1228 struct btrfs_delayed_ref_node
*ref
,
1229 struct btrfs_delayed_data_ref
*full_ref
,
1232 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1235 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1237 run_delayed_data_ref
,
1239 btrfs_run_delayed_data_ref
,
1241 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1242 struct btrfs_delayed_ref_node
*ref
,
1243 struct btrfs_delayed_data_ref
*full_ref
,
1246 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1248 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1249 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1251 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1252 const struct btrfs_delayed_data_ref
*full_ref
,
1255 TP_ARGS(ref
, full_ref
, action
),
1258 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1259 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1260 ctf_integer(int, action
, action
)
1261 ctf_integer(u64
, parent
, full_ref
->parent
)
1262 ctf_integer(u64
, ref_root
, full_ref
->root
)
1263 ctf_integer(u64
, owner
, full_ref
->objectid
)
1264 ctf_integer(u64
, offset
, full_ref
->offset
)
1265 ctf_integer(int, type
, ref
->type
)
1266 ctf_integer(u64
, seq
, ref
->seq
)
1270 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1272 add_delayed_data_ref
,
1274 btrfs_add_delayed_data_ref
,
1276 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1277 const struct btrfs_delayed_data_ref
*full_ref
,
1280 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1283 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1285 run_delayed_data_ref
,
1287 btrfs_run_delayed_data_ref
,
1289 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1290 const struct btrfs_delayed_data_ref
*full_ref
,
1293 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1296 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1298 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1299 struct btrfs_delayed_data_ref
*full_ref
,
1302 TP_ARGS(ref
, full_ref
, action
),
1305 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1306 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1307 ctf_integer(int, action
, action
)
1308 ctf_integer(u64
, parent
, full_ref
->parent
)
1309 ctf_integer(u64
, ref_root
, full_ref
->root
)
1310 ctf_integer(u64
, owner
, full_ref
->objectid
)
1311 ctf_integer(u64
, offset
, full_ref
->offset
)
1312 ctf_integer(int, type
, ref
->type
)
1313 ctf_integer(u64
, seq
, ref
->seq
)
1317 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1319 add_delayed_data_ref
,
1321 btrfs_add_delayed_data_ref
,
1323 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1324 struct btrfs_delayed_data_ref
*full_ref
,
1327 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1330 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1332 run_delayed_data_ref
,
1334 btrfs_run_delayed_data_ref
,
1336 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1337 struct btrfs_delayed_data_ref
*full_ref
,
1340 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1344 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
1345 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1347 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1348 const struct btrfs_delayed_ref_head
*head_ref
,
1351 TP_ARGS(fs_info
, head_ref
, action
),
1354 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1355 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1356 ctf_integer(int, action
, action
)
1357 ctf_integer(int, is_data
, head_ref
->is_data
)
1361 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1363 add_delayed_ref_head
,
1365 btrfs_add_delayed_ref_head
,
1367 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1368 const struct btrfs_delayed_ref_head
*head_ref
,
1371 TP_ARGS(fs_info
, head_ref
, action
)
1374 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1376 run_delayed_ref_head
,
1378 btrfs_run_delayed_ref_head
,
1380 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1381 const struct btrfs_delayed_ref_head
*head_ref
,
1384 TP_ARGS(fs_info
, head_ref
, action
)
1387 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1388 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1389 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1390 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1391 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1392 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1393 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1394 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1396 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1398 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1399 const struct btrfs_delayed_ref_node
*ref
,
1400 const struct btrfs_delayed_ref_head
*head_ref
,
1403 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1406 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1407 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1408 ctf_integer(int, action
, action
)
1409 ctf_integer(int, is_data
, head_ref
->is_data
)
1413 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1415 add_delayed_ref_head
,
1417 btrfs_add_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 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1429 run_delayed_ref_head
,
1431 btrfs_run_delayed_ref_head
,
1433 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1434 const struct btrfs_delayed_ref_node
*ref
,
1435 const struct btrfs_delayed_ref_head
*head_ref
,
1438 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1441 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1442 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1444 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1445 struct btrfs_delayed_ref_node
*ref
,
1446 struct btrfs_delayed_ref_head
*head_ref
,
1449 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1452 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1453 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1454 ctf_integer(int, action
, action
)
1455 ctf_integer(int, is_data
, head_ref
->is_data
)
1459 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1461 add_delayed_ref_head
,
1463 btrfs_add_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 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1475 run_delayed_ref_head
,
1477 btrfs_run_delayed_ref_head
,
1479 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1480 struct btrfs_delayed_ref_node
*ref
,
1481 struct btrfs_delayed_ref_head
*head_ref
,
1484 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1487 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1488 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1490 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1491 const struct btrfs_delayed_ref_head
*head_ref
,
1494 TP_ARGS(ref
, head_ref
, action
),
1497 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1498 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1499 ctf_integer(int, action
, action
)
1500 ctf_integer(int, is_data
, head_ref
->is_data
)
1504 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1506 add_delayed_ref_head
,
1508 btrfs_add_delayed_ref_head
,
1510 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1511 const struct btrfs_delayed_ref_head
*head_ref
,
1514 TP_ARGS(ref
, head_ref
, action
)
1517 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1519 run_delayed_ref_head
,
1521 btrfs_run_delayed_ref_head
,
1523 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1524 const struct btrfs_delayed_ref_head
*head_ref
,
1527 TP_ARGS(ref
, head_ref
, action
)
1531 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1533 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1534 struct btrfs_delayed_ref_head
*head_ref
,
1537 TP_ARGS(ref
, head_ref
, action
),
1540 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1541 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1542 ctf_integer(int, action
, action
)
1543 ctf_integer(int, is_data
, head_ref
->is_data
)
1547 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1549 add_delayed_ref_head
,
1551 btrfs_add_delayed_ref_head
,
1553 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1554 struct btrfs_delayed_ref_head
*head_ref
,
1557 TP_ARGS(ref
, head_ref
, action
)
1560 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1562 run_delayed_ref_head
,
1564 btrfs_run_delayed_ref_head
,
1566 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1567 struct btrfs_delayed_ref_head
*head_ref
,
1570 TP_ARGS(ref
, head_ref
, action
)
1574 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1576 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1578 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1579 u64 offset
, u64 size
),
1581 TP_ARGS(fs_info
, map
, offset
, size
),
1584 ctf_integer(int, num_stripes
, map
->num_stripes
)
1585 ctf_integer(u64
, type
, map
->type
)
1586 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1587 ctf_integer(u64
, offset
, offset
)
1588 ctf_integer(u64
, size
, size
)
1589 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1593 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1595 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1596 u64 offset
, u64 size
),
1598 TP_ARGS(fs_info
, map
, offset
, size
)
1601 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1603 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1604 u64 offset
, u64 size
),
1606 TP_ARGS(fs_info
, map
, offset
, size
)
1609 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1611 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1613 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1614 u64 offset
, u64 size
),
1616 TP_ARGS(fs_info
, map
, offset
, size
),
1619 ctf_integer(int, num_stripes
, map
->num_stripes
)
1620 ctf_integer(u64
, type
, map
->type
)
1621 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1622 ctf_integer(u64
, offset
, offset
)
1623 ctf_integer(u64
, size
, size
)
1624 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1628 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1630 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1631 u64 offset
, u64 size
),
1633 TP_ARGS(fs_info
, map
, offset
, size
)
1636 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1638 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1639 u64 offset
, u64 size
),
1641 TP_ARGS(fs_info
, map
, offset
, size
)
1644 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1645 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1646 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1647 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1649 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1651 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1652 u64 offset
, u64 size
),
1654 TP_ARGS(root
, 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
, root
->root_key
.objectid
)
1666 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1668 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1669 u64 offset
, u64 size
),
1671 TP_ARGS(root
, map
, offset
, size
)
1674 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1676 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1677 u64 offset
, u64 size
),
1679 TP_ARGS(root
, map
, offset
, size
)
1682 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1684 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1686 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1687 u64 offset
, u64 size
),
1689 TP_ARGS(root
, 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
, root
->root_key
.objectid
)
1701 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1703 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1704 u64 offset
, u64 size
),
1706 TP_ARGS(root
, map
, offset
, size
)
1709 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1711 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1712 u64 offset
, u64 size
),
1714 TP_ARGS(root
, map
, offset
, size
)
1717 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1719 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1720 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1721 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1722 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1723 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1724 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1726 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1727 const struct extent_buffer
*cow
),
1729 TP_ARGS(root
, buf
, cow
),
1732 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1733 ctf_integer(u64
, buf_start
, buf
->start
)
1734 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1735 ctf_integer(u64
, cow_start
, cow
->start
)
1736 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1737 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1741 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1743 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1744 struct extent_buffer
*cow
),
1746 TP_ARGS(root
, buf
, cow
),
1749 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1750 ctf_integer(u64
, buf_start
, buf
->start
)
1751 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1752 ctf_integer(u64
, cow_start
, cow
->start
)
1753 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1754 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1759 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1760 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1762 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const char *type
, u64 val
,
1763 u64 bytes
, int reserve
),
1765 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1768 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1769 ctf_string(type
, type
)
1770 ctf_integer(u64
, val
, val
)
1771 ctf_integer(u64
, bytes
, bytes
)
1772 ctf_integer(int, reserve
, reserve
)
1775 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1776 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1777 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1778 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1779 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1780 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1782 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1783 u64 bytes
, int reserve
),
1785 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1788 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1789 ctf_string(type
, type
)
1790 ctf_integer(u64
, val
, val
)
1791 ctf_integer(u64
, bytes
, bytes
)
1792 ctf_integer(int, reserve
, reserve
)
1796 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1798 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1799 u64 bytes
, int reserve
),
1801 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1804 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1805 ctf_string(type
, type
)
1806 ctf_integer(u64
, val
, val
)
1807 ctf_integer(u64
, bytes
, bytes
)
1808 ctf_integer(int, reserve
, reserve
)
1813 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1815 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1817 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1819 TP_ARGS(fs_info
, start
, len
),
1822 ctf_integer(u64
, start
, start
)
1823 ctf_integer(u64
, len
, len
)
1827 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1829 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1831 TP_ARGS(fs_info
, start
, len
)
1834 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1836 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1838 TP_ARGS(fs_info
, start
, len
)
1841 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1843 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1845 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1847 TP_ARGS(fs_info
, start
, len
),
1850 ctf_integer(u64
, start
, start
)
1851 ctf_integer(u64
, len
, len
)
1855 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1857 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1859 TP_ARGS(fs_info
, start
, len
)
1862 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1864 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1866 TP_ARGS(fs_info
, start
, len
)
1869 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1870 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1871 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1872 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1874 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1876 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1878 TP_ARGS(root
, start
, len
),
1881 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1882 ctf_integer(u64
, start
, start
)
1883 ctf_integer(u64
, len
, len
)
1887 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1889 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1891 TP_ARGS(root
, start
, len
)
1894 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1896 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1898 TP_ARGS(root
, start
, len
)
1901 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1903 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1905 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1907 TP_ARGS(root
, start
, len
),
1910 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1911 ctf_integer(u64
, start
, start
)
1912 ctf_integer(u64
, len
, len
)
1916 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1918 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1920 TP_ARGS(root
, start
, len
)
1923 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1925 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1927 TP_ARGS(root
, start
, len
)
1930 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1932 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
1933 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1935 btrfs_find_free_extent
,
1937 TP_PROTO(const struct btrfs_root
*root
,
1938 const struct find_free_extent_ctl
*ffe_ctl
),
1940 TP_ARGS(root
, ffe_ctl
),
1943 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1944 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1945 ctf_integer(u64
, num_bytes
, ffe_ctl
->num_bytes
)
1946 ctf_integer(u64
, empty_size
, ffe_ctl
->empty_size
)
1947 ctf_integer(u64
, flags
, ffe_ctl
->flags
)
1951 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
1952 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
1953 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
1954 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
1955 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1957 btrfs_find_free_extent
,
1959 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1962 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1965 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1966 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1967 ctf_integer(u64
, num_bytes
, num_bytes
)
1968 ctf_integer(u64
, empty_size
, empty_size
)
1969 ctf_integer(u64
, data
, data
)
1973 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1975 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1977 btrfs_find_free_extent
,
1979 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1982 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1985 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1986 ctf_integer(u64
, num_bytes
, num_bytes
)
1987 ctf_integer(u64
, empty_size
, empty_size
)
1988 ctf_integer(u64
, data
, data
)
1992 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
1994 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1996 btrfs_find_free_extent
,
1998 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2001 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2004 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2005 ctf_integer(u64
, num_bytes
, num_bytes
)
2006 ctf_integer(u64
, empty_size
, empty_size
)
2007 ctf_integer(u64
, data
, data
)
2011 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2013 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2015 btrfs_find_free_extent
,
2017 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2020 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2023 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2024 ctf_integer(u64
, num_bytes
, num_bytes
)
2025 ctf_integer(u64
, empty_size
, empty_size
)
2026 ctf_integer(u64
, data
, data
)
2030 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2032 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2034 btrfs_find_free_extent
,
2036 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2039 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2042 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2043 ctf_integer(u64
, num_bytes
, num_bytes
)
2044 ctf_integer(u64
, empty_size
, empty_size
)
2045 ctf_integer(u64
, data
, data
)
2049 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2050 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2051 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2052 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2054 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2056 btrfs_find_free_extent
,
2058 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2061 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2064 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2065 ctf_integer(u64
, num_bytes
, num_bytes
)
2066 ctf_integer(u64
, empty_size
, empty_size
)
2067 ctf_integer(u64
, data
, data
)
2072 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2074 btrfs_find_free_extent
,
2076 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2079 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2082 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2083 ctf_integer(u64
, num_bytes
, num_bytes
)
2084 ctf_integer(u64
, empty_size
, empty_size
)
2085 ctf_integer(u64
, data
, data
)
2090 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2091 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2093 TP_PROTO(const struct btrfs_block_group
*block_group
,
2094 const struct find_free_extent_ctl
*ffe_ctl
),
2096 TP_ARGS(block_group
, ffe_ctl
),
2099 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2100 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2101 ctf_integer(u64
, flags
, block_group
->flags
)
2102 ctf_integer(u64
, start
, ffe_ctl
->search_start
)
2103 ctf_integer(u64
, len
, ffe_ctl
->num_bytes
)
2107 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2109 TP_PROTO(const struct btrfs_block_group
*block_group
,
2110 const struct find_free_extent_ctl
*ffe_ctl
),
2112 TP_ARGS(block_group
, ffe_ctl
)
2115 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2117 TP_PROTO(const struct btrfs_block_group
*block_group
,
2118 const struct find_free_extent_ctl
*ffe_ctl
),
2120 TP_ARGS(block_group
, ffe_ctl
)
2123 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2124 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2126 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2129 TP_ARGS(block_group
, start
, len
),
2132 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2133 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2134 ctf_integer(u64
, flags
, block_group
->flags
)
2135 ctf_integer(u64
, start
, start
)
2136 ctf_integer(u64
, len
, len
)
2140 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2142 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2145 TP_ARGS(block_group
, start
, len
)
2148 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2150 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2153 TP_ARGS(block_group
, start
, len
)
2156 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2158 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2160 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2163 TP_ARGS(block_group
, start
, len
),
2166 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2167 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2168 ctf_integer(u64
, flags
, block_group
->flags
)
2169 ctf_integer(u64
, start
, start
)
2170 ctf_integer(u64
, len
, len
)
2174 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2176 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2179 TP_ARGS(block_group
, start
, len
)
2182 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2184 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2187 TP_ARGS(block_group
, start
, len
)
2190 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2192 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2194 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2195 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2198 TP_ARGS(fs_info
, block_group
, start
, len
),
2201 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2202 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2203 ctf_integer(u64
, flags
, block_group
->flags
)
2204 ctf_integer(u64
, start
, start
)
2205 ctf_integer(u64
, len
, len
)
2209 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2211 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2212 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2215 TP_ARGS(fs_info
, block_group
, start
, len
)
2218 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2220 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2221 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2224 TP_ARGS(fs_info
, block_group
, start
, len
)
2227 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2229 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2231 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2232 struct btrfs_block_group_cache
*block_group
, u64 start
,
2235 TP_ARGS(fs_info
, block_group
, start
, len
),
2238 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2239 ctf_integer(u64
, flags
, block_group
->flags
)
2240 ctf_integer(u64
, start
, start
)
2241 ctf_integer(u64
, len
, len
)
2245 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2247 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2248 struct btrfs_block_group_cache
*block_group
, u64 start
,
2251 TP_ARGS(fs_info
, block_group
, start
, len
)
2254 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2256 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2257 struct btrfs_block_group_cache
*block_group
, u64 start
,
2260 TP_ARGS(fs_info
, block_group
, start
, len
)
2262 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2263 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2264 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2265 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2267 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2269 TP_PROTO(const struct btrfs_root
*root
,
2270 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2273 TP_ARGS(root
, block_group
, start
, len
),
2276 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2277 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2278 ctf_integer(u64
, flags
, block_group
->flags
)
2279 ctf_integer(u64
, start
, start
)
2280 ctf_integer(u64
, len
, len
)
2284 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2286 TP_PROTO(const struct btrfs_root
*root
,
2287 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2290 TP_ARGS(root
, block_group
, start
, len
)
2293 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2295 TP_PROTO(const struct btrfs_root
*root
,
2296 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2299 TP_ARGS(root
, block_group
, start
, len
)
2304 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2306 TP_PROTO(struct btrfs_root
*root
,
2307 struct btrfs_block_group_cache
*block_group
, u64 start
,
2310 TP_ARGS(root
, block_group
, start
, len
),
2313 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2314 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2315 ctf_integer(u64
, flags
, block_group
->flags
)
2316 ctf_integer(u64
, start
, start
)
2317 ctf_integer(u64
, len
, len
)
2321 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2323 TP_PROTO(struct btrfs_root
*root
,
2324 struct btrfs_block_group_cache
*block_group
, u64 start
,
2327 TP_ARGS(root
, block_group
, start
, len
)
2330 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2332 TP_PROTO(struct btrfs_root
*root
,
2333 struct btrfs_block_group_cache
*block_group
, u64 start
,
2336 TP_ARGS(root
, block_group
, start
, len
)
2339 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2341 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2342 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2344 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2345 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2347 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2350 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2351 ctf_integer(u64
, flags
, block_group
->flags
)
2352 ctf_integer(u64
, start
, start
)
2353 ctf_integer(u64
, bytes
, bytes
)
2354 ctf_integer(u64
, empty_size
, empty_size
)
2355 ctf_integer(u64
, min_bytes
, min_bytes
)
2359 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2361 TP_PROTO(const struct btrfs_block_group
*block_group
),
2363 TP_ARGS(block_group
),
2366 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2370 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2372 TP_PROTO(const struct btrfs_block_group
*block_group
,
2373 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2375 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2378 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2379 ctf_integer(u64
, flags
, block_group
->flags
)
2380 ctf_integer(u64
, start
, cluster
->window_start
)
2381 ctf_integer(u64
, max_size
, cluster
->max_size
)
2382 ctf_integer(u64
, size
, size
)
2383 ctf_integer(int, bitmap
, bitmap
)
2386 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2387 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2388 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2389 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2390 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2391 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2393 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2394 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2396 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2399 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2400 ctf_integer(u64
, flags
, block_group
->flags
)
2401 ctf_integer(u64
, start
, start
)
2402 ctf_integer(u64
, bytes
, bytes
)
2403 ctf_integer(u64
, empty_size
, empty_size
)
2404 ctf_integer(u64
, min_bytes
, min_bytes
)
2408 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2410 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2412 TP_ARGS(block_group
),
2415 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2419 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2421 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2422 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2424 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2427 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2428 ctf_integer(u64
, flags
, block_group
->flags
)
2429 ctf_integer(u64
, start
, cluster
->window_start
)
2430 ctf_integer(u64
, max_size
, cluster
->max_size
)
2431 ctf_integer(u64
, size
, size
)
2432 ctf_integer(int, bitmap
, bitmap
)
2436 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2438 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2439 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2441 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2444 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2445 ctf_integer(u64
, flags
, block_group
->flags
)
2446 ctf_integer(u64
, start
, start
)
2447 ctf_integer(u64
, bytes
, bytes
)
2448 ctf_integer(u64
, empty_size
, empty_size
)
2449 ctf_integer(u64
, min_bytes
, min_bytes
)
2453 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2455 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2457 TP_ARGS(block_group
),
2460 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2464 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2466 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2467 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2469 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2472 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2473 ctf_integer(u64
, flags
, block_group
->flags
)
2474 ctf_integer(u64
, start
, cluster
->window_start
)
2475 ctf_integer(u64
, max_size
, cluster
->max_size
)
2476 ctf_integer(u64
, size
, size
)
2477 ctf_integer(int, bitmap
, bitmap
)
2482 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2483 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2484 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2485 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2486 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2487 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2489 btrfs_alloc_extent_state
,
2491 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2493 TP_ARGS(state
, mask
, IP
),
2496 ctf_integer_hex(const struct extent_state
*, state
, state
)
2497 ctf_integer(gfp_t
, mask
, mask
)
2498 ctf_integer_hex(unsigned long, ip
, IP
)
2502 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2504 btrfs_free_extent_state
,
2506 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2511 ctf_integer_hex(const struct extent_state
*, state
, state
)
2512 ctf_integer_hex(unsigned long, ip
, IP
)
2516 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2518 btrfs_alloc_extent_state
,
2520 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2522 TP_ARGS(state
, mask
, IP
),
2525 ctf_integer_hex(struct extent_state
*, state
, state
)
2526 ctf_integer(gfp_t
, mask
, mask
)
2527 ctf_integer_hex(unsigned long, ip
, IP
)
2531 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2533 btrfs_free_extent_state
,
2535 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2540 ctf_integer_hex(struct extent_state
*, state
, state
)
2541 ctf_integer_hex(unsigned long, ip
, IP
)
2546 #endif /* LTTNG_TRACE_BTRFS_H */
2548 /* This part must be outside protection */
2549 #include <lttng/define_trace.h>