1 /* SPDX-License-Identifier: GPL-2.0 */
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 <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
12 #ifndef _TRACE_BTRFS_DEF_
13 #define _TRACE_BTRFS_DEF_
18 struct btrfs_ordered_extent
;
19 struct btrfs_delayed_ref_node
;
20 struct btrfs_delayed_tree_ref
;
21 struct btrfs_delayed_data_ref
;
22 struct btrfs_delayed_ref_head
;
23 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
24 struct btrfs_block_group_cache
;
25 struct btrfs_free_cluster
;
29 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
34 #define BTRFS_UUID_SIZE 16
36 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
37 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
39 #define lttng_fs_info_fsid fs_info->fsid
42 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
43 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
44 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
45 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
46 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
47 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
49 TP_PROTO(const struct btrfs_root
*root
),
54 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
55 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
59 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
61 TP_PROTO(const struct inode
*inode
),
66 ctf_integer(ino_t
, ino
, inode
->i_ino
)
67 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
68 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
69 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
70 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
71 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
72 ctf_integer(u64
, root_objectid
,
73 BTRFS_I(inode
)->root
->root_key
.objectid
)
77 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
79 TP_PROTO(const struct inode
*inode
),
84 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
86 TP_PROTO(const struct inode
*inode
),
91 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
93 TP_PROTO(const struct inode
*inode
),
98 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
100 TP_PROTO(struct btrfs_root
*root
),
105 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
106 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
110 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
112 TP_PROTO(struct inode
*inode
),
117 ctf_integer(ino_t
, ino
, inode
->i_ino
)
118 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
119 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
120 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
121 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
122 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
123 ctf_integer(u64
, root_objectid
,
124 BTRFS_I(inode
)->root
->root_key
.objectid
)
128 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
130 TP_PROTO(struct inode
*inode
),
135 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
137 TP_PROTO(struct inode
*inode
),
142 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
144 TP_PROTO(struct inode
*inode
),
150 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
152 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
154 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
155 const struct extent_map
*map
),
157 TP_ARGS(root
, inode
, map
),
160 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
161 ctf_integer(u64
, ino
, btrfs_ino(inode
))
162 ctf_integer(u64
, start
, map
->start
)
163 ctf_integer(u64
, len
, map
->len
)
164 ctf_integer(u64
, orig_start
, map
->orig_start
)
165 ctf_integer(u64
, block_start
, map
->block_start
)
166 ctf_integer(u64
, block_len
, map
->block_len
)
167 ctf_integer(unsigned long, flags
, map
->flags
)
168 ctf_integer(int, refs
, refcount_read(&map
->refs
))
169 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
173 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
175 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
177 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
178 struct extent_map
*map
),
180 TP_ARGS(root
, inode
, map
),
183 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
184 ctf_integer(u64
, ino
, btrfs_ino(inode
))
185 ctf_integer(u64
, start
, map
->start
)
186 ctf_integer(u64
, len
, map
->len
)
187 ctf_integer(u64
, orig_start
, map
->orig_start
)
188 ctf_integer(u64
, block_start
, map
->block_start
)
189 ctf_integer(u64
, block_len
, map
->block_len
)
190 ctf_integer(unsigned long, flags
, map
->flags
)
191 ctf_integer(int, refs
, refcount_read(&map
->refs
))
192 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
196 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
198 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
200 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
201 struct extent_map
*map
),
203 TP_ARGS(root
, inode
, map
),
206 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
207 ctf_integer(u64
, ino
, btrfs_ino(inode
))
208 ctf_integer(u64
, start
, map
->start
)
209 ctf_integer(u64
, len
, map
->len
)
210 ctf_integer(u64
, orig_start
, map
->orig_start
)
211 ctf_integer(u64
, block_start
, map
->block_start
)
212 ctf_integer(u64
, block_len
, map
->block_len
)
213 ctf_integer(unsigned long, flags
, map
->flags
)
214 ctf_integer(int, refs
, atomic_read(&map
->refs
))
215 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
219 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
221 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
223 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
224 struct extent_map
*map
),
226 TP_ARGS(root
, inode
, map
),
229 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
230 ctf_integer(u64
, ino
, btrfs_ino(inode
))
231 ctf_integer(u64
, start
, map
->start
)
232 ctf_integer(u64
, len
, map
->len
)
233 ctf_integer(u64
, orig_start
, map
->orig_start
)
234 ctf_integer(u64
, block_start
, map
->block_start
)
235 ctf_integer(u64
, block_len
, map
->block_len
)
236 ctf_integer(unsigned long, flags
, map
->flags
)
237 ctf_integer(int, refs
, atomic_read(&map
->refs
))
238 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
242 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
243 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
244 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
245 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
247 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
249 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
254 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
255 ctf_integer(u64
, start
, map
->start
)
256 ctf_integer(u64
, len
, map
->len
)
257 ctf_integer(u64
, orig_start
, map
->orig_start
)
258 ctf_integer(u64
, block_start
, map
->block_start
)
259 ctf_integer(u64
, block_len
, map
->block_len
)
260 ctf_integer(unsigned long, flags
, map
->flags
)
261 ctf_integer(int, refs
, atomic_read(&map
->refs
))
262 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
266 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
268 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
270 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
275 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
276 ctf_integer(u64
, start
, map
->start
)
277 ctf_integer(u64
, len
, map
->len
)
278 ctf_integer(u64
, orig_start
, map
->orig_start
)
279 ctf_integer(u64
, block_start
, map
->block_start
)
280 ctf_integer(u64
, block_len
, map
->block_len
)
281 ctf_integer(unsigned long, flags
, map
->flags
)
282 ctf_integer(int, refs
, atomic_read(&map
->refs
))
283 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
287 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
289 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
290 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
292 TP_PROTO(struct btrfs_fs_info
*fs_info
,
293 const struct extent_map
*existing
, const struct extent_map
*map
,
296 TP_ARGS(fs_info
, existing
, map
, start
, len
),
299 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
300 ctf_integer(u64
, e_start
, existing
->start
)
301 ctf_integer(u64
, e_len
, existing
->len
)
302 ctf_integer(u64
, map_start
, map
->start
)
303 ctf_integer(u64
, map_len
, map
->len
)
304 ctf_integer(u64
, start
, start
)
305 ctf_integer(u64
, len
, len
)
308 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
309 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
311 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
313 TP_ARGS(existing
, map
, start
, len
),
316 ctf_integer(u64
, e_start
, existing
->start
)
317 ctf_integer(u64
, e_len
, existing
->len
)
318 ctf_integer(u64
, map_start
, map
->start
)
319 ctf_integer(u64
, map_len
, map
->len
)
320 ctf_integer(u64
, start
, start
)
321 ctf_integer(u64
, len
, len
)
326 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
327 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
329 TP_PROTO(const struct inode
*inode
,
330 const struct btrfs_ordered_extent
*ordered
),
332 TP_ARGS(inode
, ordered
),
335 ctf_integer(ino_t
, ino
, inode
->i_ino
)
336 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
337 ctf_integer(u64
, start
, ordered
->start
)
338 ctf_integer(u64
, len
, ordered
->len
)
339 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
340 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
341 ctf_integer(unsigned long, flags
, ordered
->flags
)
342 ctf_integer(int, compress_type
, ordered
->compress_type
)
343 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
344 ctf_integer(u64
, root_objectid
,
345 BTRFS_I(inode
)->root
->root_key
.objectid
)
348 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
349 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
351 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
353 TP_ARGS(inode
, ordered
),
356 ctf_integer(ino_t
, ino
, inode
->i_ino
)
357 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
358 ctf_integer(u64
, start
, ordered
->start
)
359 ctf_integer(u64
, len
, ordered
->len
)
360 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
361 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
362 ctf_integer(unsigned long, flags
, ordered
->flags
)
363 ctf_integer(int, compress_type
, ordered
->compress_type
)
364 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
365 ctf_integer(u64
, root_objectid
,
366 BTRFS_I(inode
)->root
->root_key
.objectid
)
369 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
370 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
371 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
372 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
373 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
375 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
377 TP_ARGS(inode
, ordered
),
380 ctf_integer(ino_t
, ino
, inode
->i_ino
)
381 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
382 ctf_integer(u64
, start
, ordered
->start
)
383 ctf_integer(u64
, len
, ordered
->len
)
384 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
385 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
386 ctf_integer(unsigned long, flags
, ordered
->flags
)
387 ctf_integer(int, compress_type
, ordered
->compress_type
)
388 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
389 ctf_integer(u64
, root_objectid
,
390 BTRFS_I(inode
)->root
->root_key
.objectid
)
394 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
396 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
398 TP_ARGS(inode
, ordered
),
401 ctf_integer(ino_t
, ino
, inode
->i_ino
)
402 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
403 ctf_integer(u64
, start
, ordered
->start
)
404 ctf_integer(u64
, len
, ordered
->len
)
405 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
406 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
407 ctf_integer(unsigned long, flags
, ordered
->flags
)
408 ctf_integer(int, compress_type
, ordered
->compress_type
)
409 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
410 ctf_integer(u64
, root_objectid
,
411 BTRFS_I(inode
)->root
->root_key
.objectid
)
416 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
417 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
418 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
419 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
420 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
421 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
423 TP_PROTO(const struct inode
*inode
,
424 const struct btrfs_ordered_extent
*ordered
),
426 TP_ARGS(inode
, ordered
)
429 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
431 TP_PROTO(const struct inode
*inode
,
432 const struct btrfs_ordered_extent
*ordered
),
434 TP_ARGS(inode
, ordered
)
437 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
439 TP_PROTO(const struct inode
*inode
,
440 const struct btrfs_ordered_extent
*ordered
),
442 TP_ARGS(inode
, ordered
)
445 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
447 TP_PROTO(const struct inode
*inode
,
448 const struct btrfs_ordered_extent
*ordered
),
450 TP_ARGS(inode
, ordered
)
453 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
455 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
456 const struct writeback_control
*wbc
),
458 TP_ARGS(page
, inode
, wbc
),
461 ctf_integer(ino_t
, ino
, inode
->i_ino
)
462 ctf_integer(pgoff_t
, index
, page
->index
)
463 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
464 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
465 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
466 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
467 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
468 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
469 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
470 ctf_integer(pgoff_t
, writeback_index
,
471 inode
->i_mapping
->writeback_index
)
472 ctf_integer(u64
, root_objectid
,
473 BTRFS_I(inode
)->root
->root_key
.objectid
)
477 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
481 btrfs__extent_writepage
,
483 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
484 const struct writeback_control
*wbc
),
486 TP_ARGS(page
, inode
, wbc
)
489 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
491 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
493 TP_ARGS(page
, start
, end
, uptodate
),
496 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
497 ctf_integer(pgoff_t
, index
, page
->index
)
498 ctf_integer(u64
, start
, start
)
499 ctf_integer(u64
, end
, end
)
500 ctf_integer(int, uptodate
, uptodate
)
501 ctf_integer(u64
, root_objectid
,
502 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
506 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
508 TP_PROTO(const struct file
*file
, int datasync
),
510 TP_ARGS(file
, datasync
),
513 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
514 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
515 ctf_integer(int, datasync
, datasync
)
516 ctf_integer(u64
, root_objectid
,
517 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
521 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
523 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
525 TP_ARGS(inode
, ordered
)
528 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
530 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
532 TP_ARGS(inode
, ordered
)
535 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
537 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
539 TP_ARGS(inode
, ordered
)
542 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
544 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
546 TP_ARGS(inode
, ordered
)
549 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
551 TP_PROTO(struct page
*page
, struct inode
*inode
,
552 struct writeback_control
*wbc
),
554 TP_ARGS(page
, inode
, wbc
),
557 ctf_integer(ino_t
, ino
, inode
->i_ino
)
558 ctf_integer(pgoff_t
, index
, page
->index
)
559 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
560 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
561 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
562 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
563 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
564 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
566 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
567 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
568 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
569 ctf_integer(pgoff_t
, writeback_index
,
570 inode
->i_mapping
->writeback_index
)
571 ctf_integer(u64
, root_objectid
,
572 BTRFS_I(inode
)->root
->root_key
.objectid
)
576 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
580 btrfs__extent_writepage
,
582 TP_PROTO(struct page
*page
, struct inode
*inode
,
583 struct writeback_control
*wbc
),
585 TP_ARGS(page
, inode
, wbc
)
588 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
590 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
592 TP_ARGS(page
, start
, end
, uptodate
),
595 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
596 ctf_integer(pgoff_t
, index
, page
->index
)
597 ctf_integer(u64
, start
, start
)
598 ctf_integer(u64
, end
, end
)
599 ctf_integer(int, uptodate
, uptodate
)
600 ctf_integer(u64
, root_objectid
,
601 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
605 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
607 TP_PROTO(struct file
*file
, int datasync
),
609 TP_ARGS(file
, datasync
),
612 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
613 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
614 ctf_integer(int, datasync
, datasync
)
615 ctf_integer(u64
, root_objectid
,
616 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
621 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
622 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
623 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
624 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
625 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
626 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
627 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
628 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
629 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
631 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
633 TP_ARGS(fs_info
, wait
),
636 ctf_integer(int, wait
, wait
)
639 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
640 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
642 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
644 TP_ARGS(fs_info
, wait
),
647 ctf_integer(int, wait
, wait
)
651 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
658 ctf_integer(int, wait
, wait
)
663 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
664 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
665 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
666 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
667 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
668 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
670 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
671 const struct btrfs_block_group_cache
*block_group
, int create
),
673 TP_ARGS(fs_info
, block_group
, create
),
676 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
677 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
678 ctf_integer(u64
, size
, block_group
->key
.offset
)
679 ctf_integer(u64
, flags
, block_group
->flags
)
680 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
681 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
682 ctf_integer(int, create
, create
)
686 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
688 TP_PROTO(struct btrfs_fs_info
*fs_info
,
689 struct btrfs_block_group_cache
*block_group
, int create
),
691 TP_ARGS(fs_info
, block_group
, create
),
694 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
695 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
696 ctf_integer(u64
, size
, block_group
->key
.offset
)
697 ctf_integer(u64
, flags
, block_group
->flags
)
698 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
699 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
700 ctf_integer(int, create
, create
)
705 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
706 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
707 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
708 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
709 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
710 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
711 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
712 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
713 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
715 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
716 const struct btrfs_delayed_ref_node
*ref
,
717 const struct btrfs_delayed_tree_ref
*full_ref
,
720 TP_ARGS(fs_info
, ref
, full_ref
, action
),
723 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
724 ctf_integer(u64
, bytenr
, ref
->bytenr
)
725 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
726 ctf_integer(int, action
, action
)
727 ctf_integer(u64
, parent
, full_ref
->parent
)
728 ctf_integer(u64
, ref_root
, full_ref
->root
)
729 ctf_integer(int, level
, full_ref
->level
)
730 ctf_integer(int, type
, ref
->type
)
731 ctf_integer(u64
, seq
, ref
->seq
)
735 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
737 add_delayed_tree_ref
,
739 btrfs_add_delayed_tree_ref
,
741 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
742 const struct btrfs_delayed_ref_node
*ref
,
743 const struct btrfs_delayed_tree_ref
*full_ref
,
746 TP_ARGS(fs_info
, ref
, full_ref
, action
)
749 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
751 run_delayed_tree_ref
,
753 btrfs_run_delayed_tree_ref
,
755 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
756 const struct btrfs_delayed_ref_node
*ref
,
757 const struct btrfs_delayed_tree_ref
*full_ref
,
760 TP_ARGS(fs_info
, ref
, full_ref
, action
)
762 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
763 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
765 TP_PROTO(struct btrfs_fs_info
*fs_info
,
766 struct btrfs_delayed_ref_node
*ref
,
767 struct btrfs_delayed_tree_ref
*full_ref
,
770 TP_ARGS(fs_info
, ref
, full_ref
, action
),
773 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
774 ctf_integer(u64
, bytenr
, ref
->bytenr
)
775 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
776 ctf_integer(int, action
, action
)
777 ctf_integer(u64
, parent
, full_ref
->parent
)
778 ctf_integer(u64
, ref_root
, full_ref
->root
)
779 ctf_integer(int, level
, full_ref
->level
)
780 ctf_integer(int, type
, ref
->type
)
781 ctf_integer(u64
, seq
, ref
->seq
)
785 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
787 add_delayed_tree_ref
,
789 btrfs_add_delayed_tree_ref
,
791 TP_PROTO(struct btrfs_fs_info
*fs_info
,
792 struct btrfs_delayed_ref_node
*ref
,
793 struct btrfs_delayed_tree_ref
*full_ref
,
796 TP_ARGS(fs_info
, ref
, full_ref
, action
)
799 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
801 run_delayed_tree_ref
,
803 btrfs_run_delayed_tree_ref
,
805 TP_PROTO(struct btrfs_fs_info
*fs_info
,
806 struct btrfs_delayed_ref_node
*ref
,
807 struct btrfs_delayed_tree_ref
*full_ref
,
810 TP_ARGS(fs_info
, ref
, full_ref
, action
)
812 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
813 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
815 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
816 const struct btrfs_delayed_tree_ref
*full_ref
,
819 TP_ARGS(ref
, full_ref
, action
),
822 ctf_integer(u64
, bytenr
, ref
->bytenr
)
823 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
824 ctf_integer(int, action
, action
)
825 ctf_integer(u64
, parent
, full_ref
->parent
)
826 ctf_integer(u64
, ref_root
, full_ref
->root
)
827 ctf_integer(int, level
, full_ref
->level
)
828 ctf_integer(int, type
, ref
->type
)
829 ctf_integer(u64
, seq
, ref
->seq
)
833 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
835 add_delayed_tree_ref
,
837 btrfs_add_delayed_tree_ref
,
839 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
840 const struct btrfs_delayed_tree_ref
*full_ref
,
843 TP_ARGS(ref
, full_ref
, action
)
846 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
848 run_delayed_tree_ref
,
850 btrfs_run_delayed_tree_ref
,
852 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
853 const struct btrfs_delayed_tree_ref
*full_ref
,
856 TP_ARGS(ref
, full_ref
, action
)
858 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
859 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
861 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
862 struct btrfs_delayed_tree_ref
*full_ref
,
865 TP_ARGS(ref
, full_ref
, action
),
868 ctf_integer(u64
, bytenr
, ref
->bytenr
)
869 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
870 ctf_integer(int, action
, action
)
871 ctf_integer(u64
, parent
, full_ref
->parent
)
872 ctf_integer(u64
, ref_root
, full_ref
->root
)
873 ctf_integer(int, level
, full_ref
->level
)
874 ctf_integer(int, type
, ref
->type
)
875 ctf_integer(u64
, seq
, ref
->seq
)
879 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
881 add_delayed_tree_ref
,
883 btrfs_add_delayed_tree_ref
,
885 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
886 struct btrfs_delayed_tree_ref
*full_ref
,
889 TP_ARGS(ref
, full_ref
, action
)
892 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
894 run_delayed_tree_ref
,
896 btrfs_run_delayed_tree_ref
,
898 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
899 struct btrfs_delayed_tree_ref
*full_ref
,
902 TP_ARGS(ref
, full_ref
, action
)
904 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
905 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
907 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
908 struct btrfs_delayed_tree_ref
*full_ref
,
911 TP_ARGS(ref
, full_ref
, action
),
914 ctf_integer(u64
, bytenr
, ref
->bytenr
)
915 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
916 ctf_integer(int, action
, action
)
917 ctf_integer(u64
, parent
, full_ref
->parent
)
918 ctf_integer(u64
, ref_root
, full_ref
->root
)
919 ctf_integer(int, level
, full_ref
->level
)
920 ctf_integer(int, type
, ref
->type
)
921 ctf_integer(u64
, seq
, ref
->seq
)
925 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
927 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
928 struct btrfs_delayed_tree_ref
*full_ref
,
931 TP_ARGS(ref
, full_ref
, action
),
934 ctf_integer(u64
, bytenr
, ref
->bytenr
)
935 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
936 ctf_integer(int, action
, action
)
937 ctf_integer(u64
, parent
, full_ref
->parent
)
938 ctf_integer(u64
, ref_root
, full_ref
->root
)
939 ctf_integer(int, level
, full_ref
->level
)
940 ctf_integer(int, type
, ref
->type
)
945 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
946 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
947 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
948 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
949 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
950 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
951 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
952 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
953 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
955 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
956 const struct btrfs_delayed_ref_node
*ref
,
957 const struct btrfs_delayed_data_ref
*full_ref
,
960 TP_ARGS(fs_info
, ref
, full_ref
, action
),
963 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
964 ctf_integer(u64
, bytenr
, ref
->bytenr
)
965 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
966 ctf_integer(int, action
, action
)
967 ctf_integer(u64
, parent
, full_ref
->parent
)
968 ctf_integer(u64
, ref_root
, full_ref
->root
)
969 ctf_integer(u64
, owner
, full_ref
->objectid
)
970 ctf_integer(u64
, offset
, full_ref
->offset
)
971 ctf_integer(int, type
, ref
->type
)
972 ctf_integer(u64
, seq
, ref
->seq
)
976 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
978 add_delayed_data_ref
,
980 btrfs_add_delayed_data_ref
,
982 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
983 const struct btrfs_delayed_ref_node
*ref
,
984 const struct btrfs_delayed_data_ref
*full_ref
,
987 TP_ARGS(fs_info
, ref
, full_ref
, action
)
990 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
992 run_delayed_data_ref
,
994 btrfs_run_delayed_data_ref
,
996 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
997 const struct btrfs_delayed_ref_node
*ref
,
998 const struct btrfs_delayed_data_ref
*full_ref
,
1001 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1003 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1004 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1006 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1007 struct btrfs_delayed_ref_node
*ref
,
1008 struct btrfs_delayed_data_ref
*full_ref
,
1011 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1014 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1015 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1016 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1017 ctf_integer(int, action
, action
)
1018 ctf_integer(u64
, parent
, full_ref
->parent
)
1019 ctf_integer(u64
, ref_root
, full_ref
->root
)
1020 ctf_integer(u64
, owner
, full_ref
->objectid
)
1021 ctf_integer(u64
, offset
, full_ref
->offset
)
1022 ctf_integer(int, type
, ref
->type
)
1023 ctf_integer(u64
, seq
, ref
->seq
)
1027 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1029 add_delayed_data_ref
,
1031 btrfs_add_delayed_data_ref
,
1033 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1034 struct btrfs_delayed_ref_node
*ref
,
1035 struct btrfs_delayed_data_ref
*full_ref
,
1038 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1041 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1043 run_delayed_data_ref
,
1045 btrfs_run_delayed_data_ref
,
1047 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1048 struct btrfs_delayed_ref_node
*ref
,
1049 struct btrfs_delayed_data_ref
*full_ref
,
1052 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1054 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1055 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1057 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1058 const struct btrfs_delayed_data_ref
*full_ref
,
1061 TP_ARGS(ref
, full_ref
, action
),
1064 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1065 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1066 ctf_integer(int, action
, action
)
1067 ctf_integer(u64
, parent
, full_ref
->parent
)
1068 ctf_integer(u64
, ref_root
, full_ref
->root
)
1069 ctf_integer(u64
, owner
, full_ref
->objectid
)
1070 ctf_integer(u64
, offset
, full_ref
->offset
)
1071 ctf_integer(int, type
, ref
->type
)
1072 ctf_integer(u64
, seq
, ref
->seq
)
1076 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1078 add_delayed_data_ref
,
1080 btrfs_add_delayed_data_ref
,
1082 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1083 const struct btrfs_delayed_data_ref
*full_ref
,
1086 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1089 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1091 run_delayed_data_ref
,
1093 btrfs_run_delayed_data_ref
,
1095 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1096 const struct btrfs_delayed_data_ref
*full_ref
,
1099 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1101 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1102 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1104 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1105 struct btrfs_delayed_data_ref
*full_ref
,
1108 TP_ARGS(ref
, full_ref
, action
),
1111 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1112 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1113 ctf_integer(int, action
, action
)
1114 ctf_integer(u64
, parent
, full_ref
->parent
)
1115 ctf_integer(u64
, ref_root
, full_ref
->root
)
1116 ctf_integer(u64
, owner
, full_ref
->objectid
)
1117 ctf_integer(u64
, offset
, full_ref
->offset
)
1118 ctf_integer(int, type
, ref
->type
)
1119 ctf_integer(u64
, seq
, ref
->seq
)
1123 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1125 add_delayed_data_ref
,
1127 btrfs_add_delayed_data_ref
,
1129 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1130 struct btrfs_delayed_data_ref
*full_ref
,
1133 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1136 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1138 run_delayed_data_ref
,
1140 btrfs_run_delayed_data_ref
,
1142 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1143 struct btrfs_delayed_data_ref
*full_ref
,
1146 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1148 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1149 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1151 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1152 struct btrfs_delayed_data_ref
*full_ref
,
1155 TP_ARGS(ref
, full_ref
, action
),
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(btrfs_delayed_data_ref
,
1172 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1173 struct btrfs_delayed_data_ref
*full_ref
,
1176 TP_ARGS(ref
, full_ref
, action
),
1179 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1180 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1181 ctf_integer(int, action
, action
)
1182 ctf_integer(u64
, parent
, full_ref
->parent
)
1183 ctf_integer(u64
, ref_root
, full_ref
->root
)
1184 ctf_integer(u64
, owner
, full_ref
->objectid
)
1185 ctf_integer(u64
, offset
, full_ref
->offset
)
1186 ctf_integer(int, type
, ref
->type
)
1191 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1192 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1194 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1195 const struct btrfs_delayed_ref_head
*head_ref
,
1198 TP_ARGS(fs_info
, head_ref
, action
),
1201 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1202 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1203 ctf_integer(int, action
, action
)
1204 ctf_integer(int, is_data
, head_ref
->is_data
)
1208 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1210 add_delayed_ref_head
,
1212 btrfs_add_delayed_ref_head
,
1214 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1215 const struct btrfs_delayed_ref_head
*head_ref
,
1218 TP_ARGS(fs_info
, head_ref
, action
)
1221 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1223 run_delayed_ref_head
,
1225 btrfs_run_delayed_ref_head
,
1227 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1228 const struct btrfs_delayed_ref_head
*head_ref
,
1231 TP_ARGS(fs_info
, head_ref
, action
)
1234 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1235 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1236 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1237 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1238 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1239 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1240 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1241 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1243 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1245 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1246 const struct btrfs_delayed_ref_node
*ref
,
1247 const struct btrfs_delayed_ref_head
*head_ref
,
1250 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1253 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1254 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1255 ctf_integer(int, action
, action
)
1256 ctf_integer(int, is_data
, head_ref
->is_data
)
1260 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1262 add_delayed_ref_head
,
1264 btrfs_add_delayed_ref_head
,
1266 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1267 const struct btrfs_delayed_ref_node
*ref
,
1268 const struct btrfs_delayed_ref_head
*head_ref
,
1271 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1274 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1276 run_delayed_ref_head
,
1278 btrfs_run_delayed_ref_head
,
1280 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1281 const struct btrfs_delayed_ref_node
*ref
,
1282 const struct btrfs_delayed_ref_head
*head_ref
,
1285 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1288 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1289 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1291 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1292 struct btrfs_delayed_ref_node
*ref
,
1293 struct btrfs_delayed_ref_head
*head_ref
,
1296 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1299 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1300 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1301 ctf_integer(int, action
, action
)
1302 ctf_integer(int, is_data
, head_ref
->is_data
)
1306 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1308 add_delayed_ref_head
,
1310 btrfs_add_delayed_ref_head
,
1312 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1313 struct btrfs_delayed_ref_node
*ref
,
1314 struct btrfs_delayed_ref_head
*head_ref
,
1317 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1320 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1322 run_delayed_ref_head
,
1324 btrfs_run_delayed_ref_head
,
1326 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1327 struct btrfs_delayed_ref_node
*ref
,
1328 struct btrfs_delayed_ref_head
*head_ref
,
1331 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1334 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1335 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1337 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1338 const struct btrfs_delayed_ref_head
*head_ref
,
1341 TP_ARGS(ref
, head_ref
, action
),
1344 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1345 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1346 ctf_integer(int, action
, action
)
1347 ctf_integer(int, is_data
, head_ref
->is_data
)
1351 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1353 add_delayed_ref_head
,
1355 btrfs_add_delayed_ref_head
,
1357 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1358 const struct btrfs_delayed_ref_head
*head_ref
,
1361 TP_ARGS(ref
, head_ref
, action
)
1364 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1366 run_delayed_ref_head
,
1368 btrfs_run_delayed_ref_head
,
1370 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1371 const struct btrfs_delayed_ref_head
*head_ref
,
1374 TP_ARGS(ref
, head_ref
, action
)
1377 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1378 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1380 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1381 struct btrfs_delayed_ref_head
*head_ref
,
1384 TP_ARGS(ref
, head_ref
, action
),
1387 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1388 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1389 ctf_integer(int, action
, action
)
1390 ctf_integer(int, is_data
, head_ref
->is_data
)
1394 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1396 add_delayed_ref_head
,
1398 btrfs_add_delayed_ref_head
,
1400 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1401 struct btrfs_delayed_ref_head
*head_ref
,
1404 TP_ARGS(ref
, head_ref
, action
)
1407 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1409 run_delayed_ref_head
,
1411 btrfs_run_delayed_ref_head
,
1413 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1414 struct btrfs_delayed_ref_head
*head_ref
,
1417 TP_ARGS(ref
, head_ref
, action
)
1421 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1423 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1424 struct btrfs_delayed_ref_head
*head_ref
,
1427 TP_ARGS(ref
, head_ref
, action
),
1430 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1431 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1432 ctf_integer(int, action
, action
)
1433 ctf_integer(int, is_data
, head_ref
->is_data
)
1438 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1440 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1442 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1443 u64 offset
, u64 size
),
1445 TP_ARGS(fs_info
, map
, offset
, size
),
1448 ctf_integer(int, num_stripes
, map
->num_stripes
)
1449 ctf_integer(u64
, type
, map
->type
)
1450 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1451 ctf_integer(u64
, offset
, offset
)
1452 ctf_integer(u64
, size
, size
)
1453 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1457 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1459 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1460 u64 offset
, u64 size
),
1462 TP_ARGS(fs_info
, map
, offset
, size
)
1465 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1467 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1468 u64 offset
, u64 size
),
1470 TP_ARGS(fs_info
, map
, offset
, size
)
1473 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1475 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1477 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1478 u64 offset
, u64 size
),
1480 TP_ARGS(fs_info
, map
, offset
, size
),
1483 ctf_integer(int, num_stripes
, map
->num_stripes
)
1484 ctf_integer(u64
, type
, map
->type
)
1485 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1486 ctf_integer(u64
, offset
, offset
)
1487 ctf_integer(u64
, size
, size
)
1488 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1492 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1494 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1495 u64 offset
, u64 size
),
1497 TP_ARGS(fs_info
, map
, offset
, size
)
1500 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1502 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1503 u64 offset
, u64 size
),
1505 TP_ARGS(fs_info
, map
, offset
, size
)
1508 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1509 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1510 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1511 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1513 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1515 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1516 u64 offset
, u64 size
),
1518 TP_ARGS(root
, map
, offset
, size
),
1521 ctf_integer(int, num_stripes
, map
->num_stripes
)
1522 ctf_integer(u64
, type
, map
->type
)
1523 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1524 ctf_integer(u64
, offset
, offset
)
1525 ctf_integer(u64
, size
, size
)
1526 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1530 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1532 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1533 u64 offset
, u64 size
),
1535 TP_ARGS(root
, map
, offset
, size
)
1538 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1540 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1541 u64 offset
, u64 size
),
1543 TP_ARGS(root
, map
, offset
, size
)
1546 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1548 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1550 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1551 u64 offset
, u64 size
),
1553 TP_ARGS(root
, map
, offset
, size
),
1556 ctf_integer(int, num_stripes
, map
->num_stripes
)
1557 ctf_integer(u64
, type
, map
->type
)
1558 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1559 ctf_integer(u64
, offset
, offset
)
1560 ctf_integer(u64
, size
, size
)
1561 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1565 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1567 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1568 u64 offset
, u64 size
),
1570 TP_ARGS(root
, map
, offset
, size
)
1573 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1575 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1576 u64 offset
, u64 size
),
1578 TP_ARGS(root
, map
, offset
, size
)
1581 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1583 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1584 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1585 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1586 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1587 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1588 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1590 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1591 const struct extent_buffer
*cow
),
1593 TP_ARGS(root
, buf
, cow
),
1596 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1597 ctf_integer(u64
, buf_start
, buf
->start
)
1598 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1599 ctf_integer(u64
, cow_start
, cow
->start
)
1600 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1601 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1605 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1607 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1608 struct extent_buffer
*cow
),
1610 TP_ARGS(root
, buf
, cow
),
1613 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1614 ctf_integer(u64
, buf_start
, buf
->start
)
1615 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1616 ctf_integer(u64
, cow_start
, cow
->start
)
1617 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1618 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1623 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1624 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1625 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1626 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1627 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1628 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1630 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1631 u64 bytes
, int reserve
),
1633 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1636 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1637 ctf_string(type
, type
)
1638 ctf_integer(u64
, val
, val
)
1639 ctf_integer(u64
, bytes
, bytes
)
1640 ctf_integer(int, reserve
, reserve
)
1643 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1644 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1646 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1647 u64 bytes
, int reserve
),
1649 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1652 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1653 ctf_string(type
, type
)
1654 ctf_integer(u64
, val
, val
)
1655 ctf_integer(u64
, bytes
, bytes
)
1656 ctf_integer(int, reserve
, reserve
)
1661 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1663 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1665 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1667 TP_ARGS(fs_info
, start
, len
),
1670 ctf_integer(u64
, start
, start
)
1671 ctf_integer(u64
, len
, len
)
1675 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1677 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1679 TP_ARGS(fs_info
, start
, len
)
1682 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1684 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1686 TP_ARGS(fs_info
, start
, len
)
1689 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1691 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1693 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1695 TP_ARGS(fs_info
, start
, len
),
1698 ctf_integer(u64
, start
, start
)
1699 ctf_integer(u64
, len
, len
)
1703 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1705 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1707 TP_ARGS(fs_info
, start
, len
)
1710 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1712 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1714 TP_ARGS(fs_info
, start
, len
)
1717 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1718 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1719 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1720 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1722 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1724 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1726 TP_ARGS(root
, start
, len
),
1729 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1730 ctf_integer(u64
, start
, start
)
1731 ctf_integer(u64
, len
, len
)
1735 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1737 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1739 TP_ARGS(root
, start
, len
)
1742 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1744 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1746 TP_ARGS(root
, start
, len
)
1749 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1751 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1753 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1755 TP_ARGS(root
, start
, len
),
1758 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1759 ctf_integer(u64
, start
, start
)
1760 ctf_integer(u64
, len
, len
)
1764 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1766 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1768 TP_ARGS(root
, start
, len
)
1771 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1773 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1775 TP_ARGS(root
, start
, len
)
1778 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1780 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1781 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1783 btrfs_find_free_extent
,
1785 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1788 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1791 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1792 ctf_integer(u64
, num_bytes
, num_bytes
)
1793 ctf_integer(u64
, empty_size
, empty_size
)
1794 ctf_integer(u64
, data
, data
)
1798 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1800 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1803 TP_ARGS(block_group
, start
, len
),
1806 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1807 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1808 ctf_integer(u64
, flags
, block_group
->flags
)
1809 ctf_integer(u64
, start
, start
)
1810 ctf_integer(u64
, len
, len
)
1814 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1816 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1819 TP_ARGS(block_group
, start
, len
)
1822 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1824 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1827 TP_ARGS(block_group
, start
, len
)
1830 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1831 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1833 btrfs_find_free_extent
,
1835 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1838 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1841 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1842 ctf_integer(u64
, num_bytes
, num_bytes
)
1843 ctf_integer(u64
, empty_size
, empty_size
)
1844 ctf_integer(u64
, data
, data
)
1848 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1850 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1851 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1854 TP_ARGS(fs_info
, block_group
, start
, len
),
1857 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1858 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1859 ctf_integer(u64
, flags
, block_group
->flags
)
1860 ctf_integer(u64
, start
, start
)
1861 ctf_integer(u64
, len
, len
)
1865 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1867 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1868 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1871 TP_ARGS(fs_info
, block_group
, start
, len
)
1874 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1876 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1877 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1880 TP_ARGS(fs_info
, block_group
, start
, len
)
1883 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1885 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1887 btrfs_find_free_extent
,
1889 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1892 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1895 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1896 ctf_integer(u64
, num_bytes
, num_bytes
)
1897 ctf_integer(u64
, empty_size
, empty_size
)
1898 ctf_integer(u64
, data
, data
)
1902 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1904 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1905 struct btrfs_block_group_cache
*block_group
, u64 start
,
1908 TP_ARGS(fs_info
, block_group
, start
, len
),
1911 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1912 ctf_integer(u64
, flags
, block_group
->flags
)
1913 ctf_integer(u64
, start
, start
)
1914 ctf_integer(u64
, len
, len
)
1918 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1920 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1921 struct btrfs_block_group_cache
*block_group
, u64 start
,
1924 TP_ARGS(fs_info
, block_group
, start
, len
)
1927 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1929 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1930 struct btrfs_block_group_cache
*block_group
, u64 start
,
1933 TP_ARGS(fs_info
, block_group
, start
, len
)
1935 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1936 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1937 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1938 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1940 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1942 btrfs_find_free_extent
,
1944 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1947 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1950 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1951 ctf_integer(u64
, num_bytes
, num_bytes
)
1952 ctf_integer(u64
, empty_size
, empty_size
)
1953 ctf_integer(u64
, data
, data
)
1957 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1959 TP_PROTO(const struct btrfs_root
*root
,
1960 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1963 TP_ARGS(root
, block_group
, start
, len
),
1966 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1967 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1968 ctf_integer(u64
, flags
, block_group
->flags
)
1969 ctf_integer(u64
, start
, start
)
1970 ctf_integer(u64
, len
, len
)
1974 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1976 TP_PROTO(const struct btrfs_root
*root
,
1977 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1980 TP_ARGS(root
, block_group
, start
, len
)
1983 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1985 TP_PROTO(const struct btrfs_root
*root
,
1986 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1989 TP_ARGS(root
, block_group
, start
, len
)
1992 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1994 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1996 btrfs_find_free_extent
,
1998 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2001 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2004 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2005 ctf_integer(u64
, num_bytes
, num_bytes
)
2006 ctf_integer(u64
, empty_size
, empty_size
)
2007 ctf_integer(u64
, data
, data
)
2011 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2013 TP_PROTO(struct btrfs_root
*root
,
2014 struct btrfs_block_group_cache
*block_group
, u64 start
,
2017 TP_ARGS(root
, block_group
, start
, len
),
2020 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2021 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2022 ctf_integer(u64
, flags
, block_group
->flags
)
2023 ctf_integer(u64
, start
, start
)
2024 ctf_integer(u64
, len
, len
)
2028 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2030 TP_PROTO(struct btrfs_root
*root
,
2031 struct btrfs_block_group_cache
*block_group
, u64 start
,
2034 TP_ARGS(root
, block_group
, start
, len
)
2037 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2039 TP_PROTO(struct btrfs_root
*root
,
2040 struct btrfs_block_group_cache
*block_group
, u64 start
,
2043 TP_ARGS(root
, block_group
, start
, len
)
2046 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
2048 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2049 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))
2053 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2055 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2056 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2058 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2061 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2062 ctf_integer(u64
, flags
, block_group
->flags
)
2063 ctf_integer(u64
, start
, start
)
2064 ctf_integer(u64
, bytes
, bytes
)
2065 ctf_integer(u64
, empty_size
, empty_size
)
2066 ctf_integer(u64
, min_bytes
, min_bytes
)
2070 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2072 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2074 TP_ARGS(block_group
),
2077 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2081 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2083 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2084 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2086 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2089 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2090 ctf_integer(u64
, flags
, block_group
->flags
)
2091 ctf_integer(u64
, start
, cluster
->window_start
)
2092 ctf_integer(u64
, max_size
, cluster
->max_size
)
2093 ctf_integer(u64
, size
, size
)
2094 ctf_integer(int, bitmap
, bitmap
)
2097 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2098 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2100 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2101 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2103 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2106 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2107 ctf_integer(u64
, flags
, block_group
->flags
)
2108 ctf_integer(u64
, start
, start
)
2109 ctf_integer(u64
, bytes
, bytes
)
2110 ctf_integer(u64
, empty_size
, empty_size
)
2111 ctf_integer(u64
, min_bytes
, min_bytes
)
2115 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2117 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2119 TP_ARGS(block_group
),
2122 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2126 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2128 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2129 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2131 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2134 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2135 ctf_integer(u64
, flags
, block_group
->flags
)
2136 ctf_integer(u64
, start
, cluster
->window_start
)
2137 ctf_integer(u64
, max_size
, cluster
->max_size
)
2138 ctf_integer(u64
, size
, size
)
2139 ctf_integer(int, bitmap
, bitmap
)
2144 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2145 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2146 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2147 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2148 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2149 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2151 btrfs_alloc_extent_state
,
2153 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2155 TP_ARGS(state
, mask
, IP
),
2158 ctf_integer_hex(const struct extent_state
*, state
, state
)
2159 ctf_integer(gfp_t
, mask
, mask
)
2160 ctf_integer(unsigned long, ip
, IP
)
2164 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2166 btrfs_free_extent_state
,
2168 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2173 ctf_integer_hex(const struct extent_state
*, state
, state
)
2174 ctf_integer(unsigned long, ip
, IP
)
2177 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
2178 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2180 btrfs_alloc_extent_state
,
2182 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2184 TP_ARGS(state
, mask
, IP
),
2187 ctf_integer_hex(struct extent_state
*, state
, state
)
2188 ctf_integer(gfp_t
, mask
, mask
)
2189 ctf_integer(unsigned long, ip
, IP
)
2193 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2195 btrfs_free_extent_state
,
2197 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2202 ctf_integer_hex(struct extent_state
*, state
, state
)
2203 ctf_integer(unsigned long, ip
, IP
)
2208 #endif /* LTTNG_TRACE_BTRFS_H */
2210 /* This part must be outside protection */
2211 #include <probes/define_trace.h>