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(6,8,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 int, flags
, map
->flags
)
194 ctf_integer(int, refs
, refcount_read(&map
->refs
))
195 ctf_integer(unsigned int, compress_type
, extent_map_compression(map
))
199 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
201 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
203 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
204 const 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,12,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
, refcount_read(&map
->refs
))
241 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
245 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
247 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
249 TP_PROTO(struct btrfs_root
*root
, struct btrfs_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_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
270 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
272 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
273 struct extent_map
*map
),
275 TP_ARGS(root
, inode
, map
),
278 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
279 ctf_integer(u64
, ino
, btrfs_ino(inode
))
280 ctf_integer(u64
, start
, map
->start
)
281 ctf_integer(u64
, len
, map
->len
)
282 ctf_integer(u64
, orig_start
, map
->orig_start
)
283 ctf_integer(u64
, block_start
, map
->block_start
)
284 ctf_integer(u64
, block_len
, map
->block_len
)
285 ctf_integer(unsigned long, flags
, map
->flags
)
286 ctf_integer(int, refs
, atomic_read(&map
->refs
))
287 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
291 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
292 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
293 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
294 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
296 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
298 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
303 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
304 ctf_integer(u64
, start
, map
->start
)
305 ctf_integer(u64
, len
, map
->len
)
306 ctf_integer(u64
, orig_start
, map
->orig_start
)
307 ctf_integer(u64
, block_start
, map
->block_start
)
308 ctf_integer(u64
, block_len
, map
->block_len
)
309 ctf_integer(unsigned long, flags
, map
->flags
)
310 ctf_integer(int, refs
, atomic_read(&map
->refs
))
311 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
315 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
317 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
319 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
324 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
325 ctf_integer(u64
, start
, map
->start
)
326 ctf_integer(u64
, len
, map
->len
)
327 ctf_integer(u64
, orig_start
, map
->orig_start
)
328 ctf_integer(u64
, block_start
, map
->block_start
)
329 ctf_integer(u64
, block_len
, map
->block_len
)
330 ctf_integer(unsigned long, flags
, map
->flags
)
331 ctf_integer(int, refs
, atomic_read(&map
->refs
))
332 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
336 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
338 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
339 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
341 TP_PROTO(const 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,18,0))
358 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
360 TP_PROTO(struct btrfs_fs_info
*fs_info
,
361 const struct extent_map
*existing
, const struct extent_map
*map
,
364 TP_ARGS(fs_info
, existing
, map
, start
, len
),
367 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
368 ctf_integer(u64
, e_start
, existing
->start
)
369 ctf_integer(u64
, e_len
, existing
->len
)
370 ctf_integer(u64
, map_start
, map
->start
)
371 ctf_integer(u64
, map_len
, map
->len
)
372 ctf_integer(u64
, start
, start
)
373 ctf_integer(u64
, len
, len
)
376 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
377 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
379 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
381 TP_ARGS(existing
, map
, start
, len
),
384 ctf_integer(u64
, e_start
, existing
->start
)
385 ctf_integer(u64
, e_len
, existing
->len
)
386 ctf_integer(u64
, map_start
, map
->start
)
387 ctf_integer(u64
, map_len
, map
->len
)
388 ctf_integer(u64
, start
, start
)
389 ctf_integer(u64
, len
, len
)
394 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
395 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
397 TP_PROTO(const struct btrfs_inode
*inode
,
398 const struct btrfs_ordered_extent
*ordered
),
400 TP_ARGS(inode
, ordered
),
403 ctf_array(u8
, fsid
, inode
->root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
404 ctf_integer(ino_t
, ino
, btrfs_ino(inode
))
405 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
406 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
407 ctf_integer(u64
, len
, ordered
->num_bytes
)
408 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
409 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
410 ctf_integer(unsigned long, flags
, ordered
->flags
)
411 ctf_integer(int, compress_type
, ordered
->compress_type
)
412 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
413 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
416 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
417 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
419 TP_PROTO(const struct inode
*inode
,
420 const struct btrfs_ordered_extent
*ordered
),
422 TP_ARGS(inode
, ordered
),
425 ctf_integer(ino_t
, ino
, inode
->i_ino
)
426 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
427 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
428 ctf_integer(u64
, len
, ordered
->num_bytes
)
429 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
430 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
431 ctf_integer(unsigned long, flags
, ordered
->flags
)
432 ctf_integer(int, compress_type
, ordered
->compress_type
)
433 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
434 ctf_integer(u64
, root_objectid
,
435 BTRFS_I(inode
)->root
->root_key
.objectid
)
438 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
439 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
441 TP_PROTO(const struct inode
*inode
,
442 const struct btrfs_ordered_extent
*ordered
),
444 TP_ARGS(inode
, ordered
),
447 ctf_integer(ino_t
, ino
, inode
->i_ino
)
448 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
449 ctf_integer(u64
, start
, ordered
->start
)
450 ctf_integer(u64
, len
, ordered
->len
)
451 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
452 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
453 ctf_integer(unsigned long, flags
, ordered
->flags
)
454 ctf_integer(int, compress_type
, ordered
->compress_type
)
455 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
456 ctf_integer(u64
, root_objectid
,
457 BTRFS_I(inode
)->root
->root_key
.objectid
)
460 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
461 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
463 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
465 TP_ARGS(inode
, ordered
),
468 ctf_integer(ino_t
, ino
, inode
->i_ino
)
469 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
470 ctf_integer(u64
, start
, ordered
->start
)
471 ctf_integer(u64
, len
, ordered
->len
)
472 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
473 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
474 ctf_integer(unsigned long, flags
, ordered
->flags
)
475 ctf_integer(int, compress_type
, ordered
->compress_type
)
476 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
477 ctf_integer(u64
, root_objectid
,
478 BTRFS_I(inode
)->root
->root_key
.objectid
)
481 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
482 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
483 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
484 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
485 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
487 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
489 TP_ARGS(inode
, ordered
),
492 ctf_integer(ino_t
, ino
, inode
->i_ino
)
493 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
494 ctf_integer(u64
, start
, ordered
->start
)
495 ctf_integer(u64
, len
, ordered
->len
)
496 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
497 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
498 ctf_integer(unsigned long, flags
, ordered
->flags
)
499 ctf_integer(int, compress_type
, ordered
->compress_type
)
500 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
501 ctf_integer(u64
, root_objectid
,
502 BTRFS_I(inode
)->root
->root_key
.objectid
)
506 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
508 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
510 TP_ARGS(inode
, ordered
),
513 ctf_integer(ino_t
, ino
, inode
->i_ino
)
514 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
515 ctf_integer(u64
, start
, ordered
->start
)
516 ctf_integer(u64
, len
, ordered
->len
)
517 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
518 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
519 ctf_integer(unsigned long, flags
, ordered
->flags
)
520 ctf_integer(int, compress_type
, ordered
->compress_type
)
521 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
522 ctf_integer(u64
, root_objectid
,
523 BTRFS_I(inode
)->root
->root_key
.objectid
)
528 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
529 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
531 TP_PROTO(const struct btrfs_inode
*inode
,
532 const struct btrfs_ordered_extent
*ordered
),
534 TP_ARGS(inode
, ordered
)
537 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
539 TP_PROTO(const struct btrfs_inode
*inode
,
540 const struct btrfs_ordered_extent
*ordered
),
542 TP_ARGS(inode
, ordered
)
545 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
547 TP_PROTO(const struct btrfs_inode
*inode
,
548 const struct btrfs_ordered_extent
*ordered
),
550 TP_ARGS(inode
, ordered
)
553 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
555 TP_PROTO(const struct btrfs_inode
*inode
,
556 const struct btrfs_ordered_extent
*ordered
),
558 TP_ARGS(inode
, ordered
)
560 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
561 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
562 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
563 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
564 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
565 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
567 TP_PROTO(const struct inode
*inode
,
568 const struct btrfs_ordered_extent
*ordered
),
570 TP_ARGS(inode
, ordered
)
573 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
575 TP_PROTO(const struct inode
*inode
,
576 const struct btrfs_ordered_extent
*ordered
),
578 TP_ARGS(inode
, ordered
)
581 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
583 TP_PROTO(const struct inode
*inode
,
584 const struct btrfs_ordered_extent
*ordered
),
586 TP_ARGS(inode
, ordered
)
589 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
591 TP_PROTO(const struct inode
*inode
,
592 const struct btrfs_ordered_extent
*ordered
),
594 TP_ARGS(inode
, ordered
)
597 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
599 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
601 TP_ARGS(inode
, ordered
)
604 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
606 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
608 TP_ARGS(inode
, ordered
)
611 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
613 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
615 TP_ARGS(inode
, ordered
)
618 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
620 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
622 TP_ARGS(inode
, ordered
)
626 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
627 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup
,
629 TP_PROTO(const struct btrfs_inode
*inode
,
630 const struct btrfs_ordered_extent
*ordered
),
632 TP_ARGS(inode
, ordered
)
635 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_range
,
637 TP_PROTO(const struct btrfs_inode
*inode
,
638 const struct btrfs_ordered_extent
*ordered
),
640 TP_ARGS(inode
, ordered
)
643 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_first_range
,
645 TP_PROTO(const struct btrfs_inode
*inode
,
646 const struct btrfs_ordered_extent
*ordered
),
648 TP_ARGS(inode
, ordered
)
651 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_for_logging
,
653 TP_PROTO(const struct btrfs_inode
*inode
,
654 const struct btrfs_ordered_extent
*ordered
),
656 TP_ARGS(inode
, ordered
)
659 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_lookup_first
,
661 TP_PROTO(const struct btrfs_inode
*inode
,
662 const struct btrfs_ordered_extent
*ordered
),
664 TP_ARGS(inode
, ordered
)
667 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_split
,
669 TP_PROTO(const struct btrfs_inode
*inode
,
670 const struct btrfs_ordered_extent
*ordered
),
672 TP_ARGS(inode
, ordered
)
675 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_dec_test_pending
,
677 TP_PROTO(const struct btrfs_inode
*inode
,
678 const struct btrfs_ordered_extent
*ordered
),
680 TP_ARGS(inode
, ordered
)
683 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_mark_finished
,
685 TP_PROTO(const struct btrfs_inode
*inode
,
686 const struct btrfs_ordered_extent
*ordered
),
688 TP_ARGS(inode
, ordered
)
692 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
693 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
695 TP_PROTO(const struct btrfs_inode
*inode
, u64 start
, u64 end
, int uptodate
),
697 TP_ARGS(inode
, start
, end
, uptodate
),
700 ctf_integer(u64
, ino
, btrfs_ino(inode
))
701 ctf_integer(u64
, start
, start
)
702 ctf_integer(u64
, end
, end
)
703 ctf_integer(int, uptodate
, uptodate
)
704 ctf_integer(u64
, root_objectid
, inode
->root
->root_key
.objectid
)
708 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
709 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
710 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
711 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
712 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
714 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
716 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
718 TP_ARGS(page
, start
, end
, uptodate
),
721 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
722 ctf_integer(pgoff_t
, index
, page
->index
)
723 ctf_integer(u64
, start
, start
)
724 ctf_integer(u64
, end
, end
)
725 ctf_integer(int, uptodate
, uptodate
)
726 ctf_integer(u64
, root_objectid
,
727 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
733 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
735 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
737 TP_ARGS(page
, start
, end
, uptodate
),
740 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
741 ctf_integer(pgoff_t
, index
, page
->index
)
742 ctf_integer(u64
, start
, start
)
743 ctf_integer(u64
, end
, end
)
744 ctf_integer(int, uptodate
, uptodate
)
745 ctf_integer(u64
, root_objectid
,
746 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
751 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
752 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
753 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
754 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
755 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
756 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
758 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
759 const struct writeback_control
*wbc
),
761 TP_ARGS(page
, inode
, wbc
),
764 ctf_integer(ino_t
, ino
, inode
->i_ino
)
765 ctf_integer(pgoff_t
, index
, page
->index
)
766 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
767 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
768 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
769 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
770 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
771 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
772 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
773 ctf_integer(pgoff_t
, writeback_index
,
774 inode
->i_mapping
->writeback_index
)
775 ctf_integer(u64
, root_objectid
,
776 BTRFS_I(inode
)->root
->root_key
.objectid
)
780 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
784 btrfs__extent_writepage
,
786 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
787 const struct writeback_control
*wbc
),
789 TP_ARGS(page
, inode
, wbc
)
792 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
794 TP_PROTO(const struct file
*file
, int datasync
),
796 TP_ARGS(file
, datasync
),
799 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
800 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
801 ctf_integer(int, datasync
, datasync
)
802 ctf_integer(u64
, root_objectid
,
803 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
807 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
809 TP_PROTO(struct page
*page
, struct inode
*inode
,
810 struct writeback_control
*wbc
),
812 TP_ARGS(page
, inode
, wbc
),
815 ctf_integer(ino_t
, ino
, inode
->i_ino
)
816 ctf_integer(pgoff_t
, index
, page
->index
)
817 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
818 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
819 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
820 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
821 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
822 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
823 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
824 ctf_integer(pgoff_t
, writeback_index
,
825 inode
->i_mapping
->writeback_index
)
826 ctf_integer(u64
, root_objectid
,
827 BTRFS_I(inode
)->root
->root_key
.objectid
)
831 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
835 btrfs__extent_writepage
,
837 TP_PROTO(struct page
*page
, struct inode
*inode
,
838 struct writeback_control
*wbc
),
840 TP_ARGS(page
, inode
, wbc
)
843 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
845 TP_PROTO(struct file
*file
, int datasync
),
847 TP_ARGS(file
, datasync
),
850 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
851 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
852 ctf_integer(int, datasync
, datasync
)
853 ctf_integer(u64
, root_objectid
,
854 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
859 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
860 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
861 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
862 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
863 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
864 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
865 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
866 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
867 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
869 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
871 TP_ARGS(fs_info
, wait
),
874 ctf_integer(int, wait
, wait
)
877 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
878 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
880 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
882 TP_ARGS(fs_info
, wait
),
885 ctf_integer(int, wait
, wait
)
889 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
896 ctf_integer(int, wait
, wait
)
901 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
902 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
904 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
905 const struct btrfs_block_group
*block_group
, int create
),
907 TP_ARGS(fs_info
, block_group
, create
),
910 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
911 ctf_integer(u64
, offset
, block_group
->start
)
912 ctf_integer(u64
, size
, block_group
->length
)
913 ctf_integer(u64
, flags
, block_group
->flags
)
914 ctf_integer(u64
, bytes_used
, block_group
->used
)
915 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
916 ctf_integer(int, create
, create
)
919 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
920 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
921 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
922 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
923 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
924 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
926 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
927 const struct btrfs_block_group_cache
*block_group
, int create
),
929 TP_ARGS(fs_info
, block_group
, create
),
932 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
933 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
934 ctf_integer(u64
, size
, block_group
->key
.offset
)
935 ctf_integer(u64
, flags
, block_group
->flags
)
936 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
937 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
938 ctf_integer(int, create
, create
)
942 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
944 TP_PROTO(struct btrfs_fs_info
*fs_info
,
945 struct btrfs_block_group_cache
*block_group
, int create
),
947 TP_ARGS(fs_info
, block_group
, create
),
950 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
951 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
952 ctf_integer(u64
, size
, block_group
->key
.offset
)
953 ctf_integer(u64
, flags
, block_group
->flags
)
954 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
955 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
956 ctf_integer(int, create
, create
)
961 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
962 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
963 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
964 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
965 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
966 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
967 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
968 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
969 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
971 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
972 const struct btrfs_delayed_ref_node
*ref
,
973 const struct btrfs_delayed_tree_ref
*full_ref
,
976 TP_ARGS(fs_info
, ref
, full_ref
, action
),
979 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
980 ctf_integer(u64
, bytenr
, ref
->bytenr
)
981 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
982 ctf_integer(int, action
, action
)
983 ctf_integer(u64
, parent
, full_ref
->parent
)
984 ctf_integer(u64
, ref_root
, full_ref
->root
)
985 ctf_integer(int, level
, full_ref
->level
)
986 ctf_integer(int, type
, ref
->type
)
987 ctf_integer(u64
, seq
, ref
->seq
)
991 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
993 add_delayed_tree_ref
,
995 btrfs_add_delayed_tree_ref
,
997 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
998 const struct btrfs_delayed_ref_node
*ref
,
999 const struct btrfs_delayed_tree_ref
*full_ref
,
1002 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1005 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1007 run_delayed_tree_ref
,
1009 btrfs_run_delayed_tree_ref
,
1011 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1012 const struct btrfs_delayed_ref_node
*ref
,
1013 const struct btrfs_delayed_tree_ref
*full_ref
,
1016 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1018 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1019 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1021 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1022 struct btrfs_delayed_ref_node
*ref
,
1023 struct btrfs_delayed_tree_ref
*full_ref
,
1026 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1029 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1030 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1031 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1032 ctf_integer(int, action
, action
)
1033 ctf_integer(u64
, parent
, full_ref
->parent
)
1034 ctf_integer(u64
, ref_root
, full_ref
->root
)
1035 ctf_integer(int, level
, full_ref
->level
)
1036 ctf_integer(int, type
, ref
->type
)
1037 ctf_integer(u64
, seq
, ref
->seq
)
1041 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1043 add_delayed_tree_ref
,
1045 btrfs_add_delayed_tree_ref
,
1047 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1048 struct btrfs_delayed_ref_node
*ref
,
1049 struct btrfs_delayed_tree_ref
*full_ref
,
1052 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1055 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1057 run_delayed_tree_ref
,
1059 btrfs_run_delayed_tree_ref
,
1061 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1062 struct btrfs_delayed_ref_node
*ref
,
1063 struct btrfs_delayed_tree_ref
*full_ref
,
1066 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1068 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1069 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1071 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1072 const struct btrfs_delayed_tree_ref
*full_ref
,
1075 TP_ARGS(ref
, full_ref
, action
),
1078 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1079 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1080 ctf_integer(int, action
, action
)
1081 ctf_integer(u64
, parent
, full_ref
->parent
)
1082 ctf_integer(u64
, ref_root
, full_ref
->root
)
1083 ctf_integer(int, level
, full_ref
->level
)
1084 ctf_integer(int, type
, ref
->type
)
1085 ctf_integer(u64
, seq
, ref
->seq
)
1089 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1091 add_delayed_tree_ref
,
1093 btrfs_add_delayed_tree_ref
,
1095 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1096 const struct btrfs_delayed_tree_ref
*full_ref
,
1099 TP_ARGS(ref
, full_ref
, action
)
1102 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1104 run_delayed_tree_ref
,
1106 btrfs_run_delayed_tree_ref
,
1108 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1109 const struct btrfs_delayed_tree_ref
*full_ref
,
1112 TP_ARGS(ref
, full_ref
, action
)
1115 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
1117 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1118 struct btrfs_delayed_tree_ref
*full_ref
,
1121 TP_ARGS(ref
, full_ref
, action
),
1124 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1125 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1126 ctf_integer(int, action
, action
)
1127 ctf_integer(u64
, parent
, full_ref
->parent
)
1128 ctf_integer(u64
, ref_root
, full_ref
->root
)
1129 ctf_integer(int, level
, full_ref
->level
)
1130 ctf_integer(int, type
, ref
->type
)
1131 ctf_integer(u64
, seq
, ref
->seq
)
1135 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1137 add_delayed_tree_ref
,
1139 btrfs_add_delayed_tree_ref
,
1141 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1142 struct btrfs_delayed_tree_ref
*full_ref
,
1145 TP_ARGS(ref
, full_ref
, action
)
1148 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
1150 run_delayed_tree_ref
,
1152 btrfs_run_delayed_tree_ref
,
1154 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1155 struct btrfs_delayed_tree_ref
*full_ref
,
1158 TP_ARGS(ref
, full_ref
, action
)
1162 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1163 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1164 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1165 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1166 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1167 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1168 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1169 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1170 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1172 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1173 const struct btrfs_delayed_ref_node
*ref
,
1174 const struct btrfs_delayed_data_ref
*full_ref
,
1177 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1180 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1181 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1182 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1183 ctf_integer(int, action
, action
)
1184 ctf_integer(u64
, parent
, full_ref
->parent
)
1185 ctf_integer(u64
, ref_root
, full_ref
->root
)
1186 ctf_integer(u64
, owner
, full_ref
->objectid
)
1187 ctf_integer(u64
, offset
, full_ref
->offset
)
1188 ctf_integer(int, type
, ref
->type
)
1189 ctf_integer(u64
, seq
, ref
->seq
)
1193 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1195 add_delayed_data_ref
,
1197 btrfs_add_delayed_data_ref
,
1199 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1200 const struct btrfs_delayed_ref_node
*ref
,
1201 const struct btrfs_delayed_data_ref
*full_ref
,
1204 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1207 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1209 run_delayed_data_ref
,
1211 btrfs_run_delayed_data_ref
,
1213 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1214 const struct btrfs_delayed_ref_node
*ref
,
1215 const struct btrfs_delayed_data_ref
*full_ref
,
1218 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1220 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1221 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1223 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1224 struct btrfs_delayed_ref_node
*ref
,
1225 struct btrfs_delayed_data_ref
*full_ref
,
1228 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1231 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1232 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1233 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1234 ctf_integer(int, action
, action
)
1235 ctf_integer(u64
, parent
, full_ref
->parent
)
1236 ctf_integer(u64
, ref_root
, full_ref
->root
)
1237 ctf_integer(u64
, owner
, full_ref
->objectid
)
1238 ctf_integer(u64
, offset
, full_ref
->offset
)
1239 ctf_integer(int, type
, ref
->type
)
1240 ctf_integer(u64
, seq
, ref
->seq
)
1244 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1246 add_delayed_data_ref
,
1248 btrfs_add_delayed_data_ref
,
1250 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1251 struct btrfs_delayed_ref_node
*ref
,
1252 struct btrfs_delayed_data_ref
*full_ref
,
1255 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1258 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1260 run_delayed_data_ref
,
1262 btrfs_run_delayed_data_ref
,
1264 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1265 struct btrfs_delayed_ref_node
*ref
,
1266 struct btrfs_delayed_data_ref
*full_ref
,
1269 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1271 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1272 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1274 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1275 const struct btrfs_delayed_data_ref
*full_ref
,
1278 TP_ARGS(ref
, full_ref
, action
),
1281 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1282 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1283 ctf_integer(int, action
, action
)
1284 ctf_integer(u64
, parent
, full_ref
->parent
)
1285 ctf_integer(u64
, ref_root
, full_ref
->root
)
1286 ctf_integer(u64
, owner
, full_ref
->objectid
)
1287 ctf_integer(u64
, offset
, full_ref
->offset
)
1288 ctf_integer(int, type
, ref
->type
)
1289 ctf_integer(u64
, seq
, ref
->seq
)
1293 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1295 add_delayed_data_ref
,
1297 btrfs_add_delayed_data_ref
,
1299 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1300 const struct btrfs_delayed_data_ref
*full_ref
,
1303 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1306 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1308 run_delayed_data_ref
,
1310 btrfs_run_delayed_data_ref
,
1312 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1313 const struct btrfs_delayed_data_ref
*full_ref
,
1316 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1319 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1321 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1322 struct btrfs_delayed_data_ref
*full_ref
,
1325 TP_ARGS(ref
, full_ref
, action
),
1328 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1329 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1330 ctf_integer(int, action
, action
)
1331 ctf_integer(u64
, parent
, full_ref
->parent
)
1332 ctf_integer(u64
, ref_root
, full_ref
->root
)
1333 ctf_integer(u64
, owner
, full_ref
->objectid
)
1334 ctf_integer(u64
, offset
, full_ref
->offset
)
1335 ctf_integer(int, type
, ref
->type
)
1336 ctf_integer(u64
, seq
, ref
->seq
)
1340 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1342 add_delayed_data_ref
,
1344 btrfs_add_delayed_data_ref
,
1346 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1347 struct btrfs_delayed_data_ref
*full_ref
,
1350 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1353 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1355 run_delayed_data_ref
,
1357 btrfs_run_delayed_data_ref
,
1359 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1360 struct btrfs_delayed_data_ref
*full_ref
,
1363 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1367 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
1368 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1370 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1371 const struct btrfs_delayed_ref_head
*head_ref
,
1374 TP_ARGS(fs_info
, head_ref
, action
),
1377 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1378 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1379 ctf_integer(int, action
, action
)
1380 ctf_integer(int, is_data
, head_ref
->is_data
)
1384 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1386 add_delayed_ref_head
,
1388 btrfs_add_delayed_ref_head
,
1390 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1391 const struct btrfs_delayed_ref_head
*head_ref
,
1394 TP_ARGS(fs_info
, head_ref
, action
)
1397 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1399 run_delayed_ref_head
,
1401 btrfs_run_delayed_ref_head
,
1403 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1404 const struct btrfs_delayed_ref_head
*head_ref
,
1407 TP_ARGS(fs_info
, head_ref
, action
)
1410 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1411 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1412 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1413 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1414 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1415 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1416 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1417 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1419 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1421 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1422 const struct btrfs_delayed_ref_node
*ref
,
1423 const struct btrfs_delayed_ref_head
*head_ref
,
1426 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1429 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1430 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1431 ctf_integer(int, action
, action
)
1432 ctf_integer(int, is_data
, head_ref
->is_data
)
1436 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1438 add_delayed_ref_head
,
1440 btrfs_add_delayed_ref_head
,
1442 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1443 const struct btrfs_delayed_ref_node
*ref
,
1444 const struct btrfs_delayed_ref_head
*head_ref
,
1447 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1450 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1452 run_delayed_ref_head
,
1454 btrfs_run_delayed_ref_head
,
1456 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1457 const struct btrfs_delayed_ref_node
*ref
,
1458 const struct btrfs_delayed_ref_head
*head_ref
,
1461 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1464 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1465 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1467 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1468 struct btrfs_delayed_ref_node
*ref
,
1469 struct btrfs_delayed_ref_head
*head_ref
,
1472 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1475 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1476 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1477 ctf_integer(int, action
, action
)
1478 ctf_integer(int, is_data
, head_ref
->is_data
)
1482 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1484 add_delayed_ref_head
,
1486 btrfs_add_delayed_ref_head
,
1488 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1489 struct btrfs_delayed_ref_node
*ref
,
1490 struct btrfs_delayed_ref_head
*head_ref
,
1493 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1496 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1498 run_delayed_ref_head
,
1500 btrfs_run_delayed_ref_head
,
1502 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1503 struct btrfs_delayed_ref_node
*ref
,
1504 struct btrfs_delayed_ref_head
*head_ref
,
1507 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1510 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1511 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1513 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1514 const struct btrfs_delayed_ref_head
*head_ref
,
1517 TP_ARGS(ref
, head_ref
, action
),
1520 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1521 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1522 ctf_integer(int, action
, action
)
1523 ctf_integer(int, is_data
, head_ref
->is_data
)
1527 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1529 add_delayed_ref_head
,
1531 btrfs_add_delayed_ref_head
,
1533 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1534 const struct btrfs_delayed_ref_head
*head_ref
,
1537 TP_ARGS(ref
, head_ref
, action
)
1540 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1542 run_delayed_ref_head
,
1544 btrfs_run_delayed_ref_head
,
1546 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1547 const struct btrfs_delayed_ref_head
*head_ref
,
1550 TP_ARGS(ref
, head_ref
, action
)
1554 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1556 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1557 struct btrfs_delayed_ref_head
*head_ref
,
1560 TP_ARGS(ref
, head_ref
, action
),
1563 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1564 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1565 ctf_integer(int, action
, action
)
1566 ctf_integer(int, is_data
, head_ref
->is_data
)
1570 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1572 add_delayed_ref_head
,
1574 btrfs_add_delayed_ref_head
,
1576 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1577 struct btrfs_delayed_ref_head
*head_ref
,
1580 TP_ARGS(ref
, head_ref
, action
)
1583 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1585 run_delayed_ref_head
,
1587 btrfs_run_delayed_ref_head
,
1589 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1590 struct btrfs_delayed_ref_head
*head_ref
,
1593 TP_ARGS(ref
, head_ref
, action
)
1597 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
1599 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1601 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1602 u64 offset
, u64 size
),
1604 TP_ARGS(fs_info
, map
, offset
, size
),
1607 ctf_integer(int, num_stripes
, map
->num_stripes
)
1608 ctf_integer(u64
, type
, map
->type
)
1609 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1610 ctf_integer(u64
, offset
, offset
)
1611 ctf_integer(u64
, size
, size
)
1612 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1616 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1618 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1619 u64 offset
, u64 size
),
1621 TP_ARGS(fs_info
, map
, offset
, size
)
1624 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1626 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct btrfs_chunk_map
*map
,
1627 u64 offset
, u64 size
),
1629 TP_ARGS(fs_info
, map
, offset
, size
)
1632 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1634 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1636 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1637 u64 offset
, u64 size
),
1639 TP_ARGS(fs_info
, map
, offset
, size
),
1642 ctf_integer(int, num_stripes
, map
->num_stripes
)
1643 ctf_integer(u64
, type
, map
->type
)
1644 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1645 ctf_integer(u64
, offset
, offset
)
1646 ctf_integer(u64
, size
, size
)
1647 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1651 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1653 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1654 u64 offset
, u64 size
),
1656 TP_ARGS(fs_info
, map
, offset
, size
)
1659 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1661 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1662 u64 offset
, u64 size
),
1664 TP_ARGS(fs_info
, map
, offset
, size
)
1667 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1669 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1671 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1672 u64 offset
, u64 size
),
1674 TP_ARGS(fs_info
, map
, offset
, size
),
1677 ctf_integer(int, num_stripes
, map
->num_stripes
)
1678 ctf_integer(u64
, type
, map
->type
)
1679 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1680 ctf_integer(u64
, offset
, offset
)
1681 ctf_integer(u64
, size
, size
)
1682 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1686 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1688 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1689 u64 offset
, u64 size
),
1691 TP_ARGS(fs_info
, map
, offset
, size
)
1694 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1696 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1697 u64 offset
, u64 size
),
1699 TP_ARGS(fs_info
, map
, offset
, size
)
1702 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1703 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1704 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1705 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1707 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1709 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1710 u64 offset
, u64 size
),
1712 TP_ARGS(root
, map
, offset
, size
),
1715 ctf_integer(int, num_stripes
, map
->num_stripes
)
1716 ctf_integer(u64
, type
, map
->type
)
1717 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1718 ctf_integer(u64
, offset
, offset
)
1719 ctf_integer(u64
, size
, size
)
1720 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1724 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1726 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1727 u64 offset
, u64 size
),
1729 TP_ARGS(root
, map
, offset
, size
)
1732 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1734 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1735 u64 offset
, u64 size
),
1737 TP_ARGS(root
, map
, offset
, size
)
1740 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1742 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1744 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1745 u64 offset
, u64 size
),
1747 TP_ARGS(root
, map
, offset
, size
),
1750 ctf_integer(int, num_stripes
, map
->num_stripes
)
1751 ctf_integer(u64
, type
, map
->type
)
1752 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1753 ctf_integer(u64
, offset
, offset
)
1754 ctf_integer(u64
, size
, size
)
1755 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1759 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1761 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1762 u64 offset
, u64 size
),
1764 TP_ARGS(root
, map
, offset
, size
)
1767 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1769 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1770 u64 offset
, u64 size
),
1772 TP_ARGS(root
, map
, offset
, size
)
1775 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1777 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1778 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1779 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1780 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1781 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1782 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1784 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1785 const struct extent_buffer
*cow
),
1787 TP_ARGS(root
, buf
, cow
),
1790 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1791 ctf_integer(u64
, buf_start
, buf
->start
)
1792 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1793 ctf_integer(u64
, cow_start
, cow
->start
)
1794 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1795 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1799 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1801 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1802 struct extent_buffer
*cow
),
1804 TP_ARGS(root
, buf
, cow
),
1807 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1808 ctf_integer(u64
, buf_start
, buf
->start
)
1809 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1810 ctf_integer(u64
, cow_start
, cow
->start
)
1811 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1812 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1817 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1818 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1820 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const char *type
, u64 val
,
1821 u64 bytes
, int reserve
),
1823 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1826 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1827 ctf_string(type
, type
)
1828 ctf_integer(u64
, val
, val
)
1829 ctf_integer(u64
, bytes
, bytes
)
1830 ctf_integer(int, reserve
, reserve
)
1833 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1834 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1835 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1836 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1837 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1838 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1840 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1841 u64 bytes
, int reserve
),
1843 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1846 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1847 ctf_string(type
, type
)
1848 ctf_integer(u64
, val
, val
)
1849 ctf_integer(u64
, bytes
, bytes
)
1850 ctf_integer(int, reserve
, reserve
)
1854 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1856 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1857 u64 bytes
, int reserve
),
1859 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1862 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1863 ctf_string(type
, type
)
1864 ctf_integer(u64
, val
, val
)
1865 ctf_integer(u64
, bytes
, bytes
)
1866 ctf_integer(int, reserve
, reserve
)
1871 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1873 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1875 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1877 TP_ARGS(fs_info
, start
, len
),
1880 ctf_integer(u64
, start
, start
)
1881 ctf_integer(u64
, len
, len
)
1885 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1887 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1889 TP_ARGS(fs_info
, start
, len
)
1892 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1894 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1896 TP_ARGS(fs_info
, start
, len
)
1899 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1901 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1903 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1905 TP_ARGS(fs_info
, start
, len
),
1908 ctf_integer(u64
, start
, start
)
1909 ctf_integer(u64
, len
, len
)
1913 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1915 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1917 TP_ARGS(fs_info
, start
, len
)
1920 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1922 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1924 TP_ARGS(fs_info
, start
, len
)
1927 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1928 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1929 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1930 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1932 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1934 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1936 TP_ARGS(root
, start
, len
),
1939 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1940 ctf_integer(u64
, start
, start
)
1941 ctf_integer(u64
, len
, len
)
1945 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1947 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1949 TP_ARGS(root
, start
, len
)
1952 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1954 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1956 TP_ARGS(root
, start
, len
)
1959 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1961 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1963 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1965 TP_ARGS(root
, start
, len
),
1968 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1969 ctf_integer(u64
, start
, start
)
1970 ctf_integer(u64
, len
, len
)
1974 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1976 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1978 TP_ARGS(root
, start
, len
)
1981 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1983 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1985 TP_ARGS(root
, start
, len
)
1988 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1990 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
1991 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1993 btrfs_find_free_extent
,
1995 TP_PROTO(const struct btrfs_root
*root
,
1996 const struct find_free_extent_ctl
*ffe_ctl
),
1998 TP_ARGS(root
, ffe_ctl
),
2001 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2002 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2003 ctf_integer(u64
, num_bytes
, ffe_ctl
->num_bytes
)
2004 ctf_integer(u64
, empty_size
, ffe_ctl
->empty_size
)
2005 ctf_integer(u64
, flags
, ffe_ctl
->flags
)
2009 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
2010 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
2011 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
2012 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
2013 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2015 btrfs_find_free_extent
,
2017 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2020 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2023 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2024 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2025 ctf_integer(u64
, num_bytes
, num_bytes
)
2026 ctf_integer(u64
, empty_size
, empty_size
)
2027 ctf_integer(u64
, data
, data
)
2031 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2033 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2035 btrfs_find_free_extent
,
2037 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2040 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2043 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2044 ctf_integer(u64
, num_bytes
, num_bytes
)
2045 ctf_integer(u64
, empty_size
, empty_size
)
2046 ctf_integer(u64
, data
, data
)
2050 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2052 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2054 btrfs_find_free_extent
,
2056 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2059 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2062 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2063 ctf_integer(u64
, num_bytes
, num_bytes
)
2064 ctf_integer(u64
, empty_size
, empty_size
)
2065 ctf_integer(u64
, data
, data
)
2069 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2071 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2073 btrfs_find_free_extent
,
2075 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2078 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2081 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2082 ctf_integer(u64
, num_bytes
, num_bytes
)
2083 ctf_integer(u64
, empty_size
, empty_size
)
2084 ctf_integer(u64
, data
, data
)
2088 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2090 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2092 btrfs_find_free_extent
,
2094 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
2097 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
2100 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2101 ctf_integer(u64
, num_bytes
, num_bytes
)
2102 ctf_integer(u64
, empty_size
, empty_size
)
2103 ctf_integer(u64
, data
, data
)
2107 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2108 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2109 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2110 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2112 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2114 btrfs_find_free_extent
,
2116 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2119 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2122 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2123 ctf_integer(u64
, num_bytes
, num_bytes
)
2124 ctf_integer(u64
, empty_size
, empty_size
)
2125 ctf_integer(u64
, data
, data
)
2130 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2132 btrfs_find_free_extent
,
2134 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2137 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2140 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2141 ctf_integer(u64
, num_bytes
, num_bytes
)
2142 ctf_integer(u64
, empty_size
, empty_size
)
2143 ctf_integer(u64
, data
, data
)
2148 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2149 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2151 TP_PROTO(const struct btrfs_block_group
*block_group
,
2152 const struct find_free_extent_ctl
*ffe_ctl
),
2154 TP_ARGS(block_group
, ffe_ctl
),
2157 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2158 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2159 ctf_integer(u64
, flags
, block_group
->flags
)
2160 ctf_integer(u64
, start
, ffe_ctl
->search_start
)
2161 ctf_integer(u64
, len
, ffe_ctl
->num_bytes
)
2165 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2167 TP_PROTO(const struct btrfs_block_group
*block_group
,
2168 const struct find_free_extent_ctl
*ffe_ctl
),
2170 TP_ARGS(block_group
, ffe_ctl
)
2173 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2175 TP_PROTO(const struct btrfs_block_group
*block_group
,
2176 const struct find_free_extent_ctl
*ffe_ctl
),
2178 TP_ARGS(block_group
, ffe_ctl
)
2181 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2182 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2184 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2187 TP_ARGS(block_group
, start
, len
),
2190 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2191 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2192 ctf_integer(u64
, flags
, block_group
->flags
)
2193 ctf_integer(u64
, start
, start
)
2194 ctf_integer(u64
, len
, len
)
2198 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2200 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2203 TP_ARGS(block_group
, start
, len
)
2206 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2208 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2211 TP_ARGS(block_group
, start
, len
)
2214 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2216 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2218 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2221 TP_ARGS(block_group
, start
, len
),
2224 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2225 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2226 ctf_integer(u64
, flags
, block_group
->flags
)
2227 ctf_integer(u64
, start
, start
)
2228 ctf_integer(u64
, len
, len
)
2232 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2234 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2237 TP_ARGS(block_group
, start
, len
)
2240 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2242 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2245 TP_ARGS(block_group
, start
, len
)
2248 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2250 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2252 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2253 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2256 TP_ARGS(fs_info
, block_group
, start
, len
),
2259 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2260 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2261 ctf_integer(u64
, flags
, block_group
->flags
)
2262 ctf_integer(u64
, start
, start
)
2263 ctf_integer(u64
, len
, len
)
2267 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2269 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2270 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2273 TP_ARGS(fs_info
, block_group
, start
, len
)
2276 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2278 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2279 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2282 TP_ARGS(fs_info
, block_group
, start
, len
)
2285 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2287 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2289 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2290 struct btrfs_block_group_cache
*block_group
, u64 start
,
2293 TP_ARGS(fs_info
, block_group
, start
, len
),
2296 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2297 ctf_integer(u64
, flags
, block_group
->flags
)
2298 ctf_integer(u64
, start
, start
)
2299 ctf_integer(u64
, len
, len
)
2303 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2305 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2306 struct btrfs_block_group_cache
*block_group
, u64 start
,
2309 TP_ARGS(fs_info
, block_group
, start
, len
)
2312 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2314 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2315 struct btrfs_block_group_cache
*block_group
, u64 start
,
2318 TP_ARGS(fs_info
, block_group
, start
, len
)
2320 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2321 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2322 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2323 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2325 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2327 TP_PROTO(const struct btrfs_root
*root
,
2328 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2331 TP_ARGS(root
, block_group
, start
, len
),
2334 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2335 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2336 ctf_integer(u64
, flags
, block_group
->flags
)
2337 ctf_integer(u64
, start
, start
)
2338 ctf_integer(u64
, len
, len
)
2342 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2344 TP_PROTO(const struct btrfs_root
*root
,
2345 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2348 TP_ARGS(root
, block_group
, start
, len
)
2351 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2353 TP_PROTO(const struct btrfs_root
*root
,
2354 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2357 TP_ARGS(root
, block_group
, start
, len
)
2362 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2364 TP_PROTO(struct btrfs_root
*root
,
2365 struct btrfs_block_group_cache
*block_group
, u64 start
,
2368 TP_ARGS(root
, block_group
, start
, len
),
2371 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2372 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2373 ctf_integer(u64
, flags
, block_group
->flags
)
2374 ctf_integer(u64
, start
, start
)
2375 ctf_integer(u64
, len
, len
)
2379 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2381 TP_PROTO(struct btrfs_root
*root
,
2382 struct btrfs_block_group_cache
*block_group
, u64 start
,
2385 TP_ARGS(root
, block_group
, start
, len
)
2388 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2390 TP_PROTO(struct btrfs_root
*root
,
2391 struct btrfs_block_group_cache
*block_group
, u64 start
,
2394 TP_ARGS(root
, block_group
, start
, len
)
2397 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2399 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2400 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2402 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2403 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2405 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2408 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2409 ctf_integer(u64
, flags
, block_group
->flags
)
2410 ctf_integer(u64
, start
, start
)
2411 ctf_integer(u64
, bytes
, bytes
)
2412 ctf_integer(u64
, empty_size
, empty_size
)
2413 ctf_integer(u64
, min_bytes
, min_bytes
)
2417 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2419 TP_PROTO(const struct btrfs_block_group
*block_group
),
2421 TP_ARGS(block_group
),
2424 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2428 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2430 TP_PROTO(const struct btrfs_block_group
*block_group
,
2431 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2433 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2436 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2437 ctf_integer(u64
, flags
, block_group
->flags
)
2438 ctf_integer(u64
, start
, cluster
->window_start
)
2439 ctf_integer(u64
, max_size
, cluster
->max_size
)
2440 ctf_integer(u64
, size
, size
)
2441 ctf_integer(int, bitmap
, bitmap
)
2444 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2445 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2446 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2447 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2448 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2449 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2451 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2452 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2454 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2457 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2458 ctf_integer(u64
, flags
, block_group
->flags
)
2459 ctf_integer(u64
, start
, start
)
2460 ctf_integer(u64
, bytes
, bytes
)
2461 ctf_integer(u64
, empty_size
, empty_size
)
2462 ctf_integer(u64
, min_bytes
, min_bytes
)
2466 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2468 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2470 TP_ARGS(block_group
),
2473 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2477 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2479 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2480 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2482 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2485 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2486 ctf_integer(u64
, flags
, block_group
->flags
)
2487 ctf_integer(u64
, start
, cluster
->window_start
)
2488 ctf_integer(u64
, max_size
, cluster
->max_size
)
2489 ctf_integer(u64
, size
, size
)
2490 ctf_integer(int, bitmap
, bitmap
)
2494 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2496 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2497 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2499 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2502 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2503 ctf_integer(u64
, flags
, block_group
->flags
)
2504 ctf_integer(u64
, start
, start
)
2505 ctf_integer(u64
, bytes
, bytes
)
2506 ctf_integer(u64
, empty_size
, empty_size
)
2507 ctf_integer(u64
, min_bytes
, min_bytes
)
2511 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2513 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2515 TP_ARGS(block_group
),
2518 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2522 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2524 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2525 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2527 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2530 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2531 ctf_integer(u64
, flags
, block_group
->flags
)
2532 ctf_integer(u64
, start
, cluster
->window_start
)
2533 ctf_integer(u64
, max_size
, cluster
->max_size
)
2534 ctf_integer(u64
, size
, size
)
2535 ctf_integer(int, bitmap
, bitmap
)
2540 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2541 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2542 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2543 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2544 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2545 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2547 btrfs_alloc_extent_state
,
2549 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2551 TP_ARGS(state
, mask
, IP
),
2554 ctf_integer_hex(const struct extent_state
*, state
, state
)
2555 ctf_integer(gfp_t
, mask
, mask
)
2556 ctf_integer_hex(unsigned long, ip
, IP
)
2560 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2562 btrfs_free_extent_state
,
2564 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2569 ctf_integer_hex(const struct extent_state
*, state
, state
)
2570 ctf_integer_hex(unsigned long, ip
, IP
)
2574 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2576 btrfs_alloc_extent_state
,
2578 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2580 TP_ARGS(state
, mask
, IP
),
2583 ctf_integer_hex(struct extent_state
*, state
, state
)
2584 ctf_integer(gfp_t
, mask
, mask
)
2585 ctf_integer_hex(unsigned long, ip
, IP
)
2589 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2591 btrfs_free_extent_state
,
2593 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2598 ctf_integer_hex(struct extent_state
*, state
, state
)
2599 ctf_integer_hex(unsigned long, ip
, IP
)
2604 #endif /* LTTNG_TRACE_BTRFS_H */
2606 /* This part must be outside protection */
2607 #include <lttng/define_trace.h>