2 #define TRACE_SYSTEM btrfs
4 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_BTRFS_H
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/writeback.h>
9 #include <linux/version.h>
11 #ifndef _TRACE_BTRFS_DEF_
12 #define _TRACE_BTRFS_DEF_
17 struct btrfs_ordered_extent
;
18 struct btrfs_delayed_ref_node
;
19 struct btrfs_delayed_tree_ref
;
20 struct btrfs_delayed_data_ref
;
21 struct btrfs_delayed_ref_head
;
22 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
23 struct btrfs_block_group_cache
;
24 struct btrfs_free_cluster
;
28 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
33 #define BTRFS_UUID_SIZE 16
35 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
37 TP_PROTO(struct btrfs_root
*root
),
42 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
43 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
47 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
49 TP_PROTO(struct inode
*inode
),
54 ctf_integer(ino_t
, ino
, inode
->i_ino
)
55 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
56 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
57 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
58 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
59 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
60 ctf_integer(u64
, root_objectid
,
61 BTRFS_I(inode
)->root
->root_key
.objectid
)
65 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
67 TP_PROTO(struct inode
*inode
),
72 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
74 TP_PROTO(struct inode
*inode
),
79 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
81 TP_PROTO(struct inode
*inode
),
86 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
88 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
90 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
91 struct extent_map
*map
),
93 TP_ARGS(root
, inode
, map
),
96 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
97 ctf_integer(u64
, ino
, btrfs_ino(inode
))
98 ctf_integer(u64
, start
, map
->start
)
99 ctf_integer(u64
, len
, map
->len
)
100 ctf_integer(u64
, orig_start
, map
->orig_start
)
101 ctf_integer(u64
, block_start
, map
->block_start
)
102 ctf_integer(u64
, block_len
, map
->block_len
)
103 ctf_integer(unsigned long, flags
, map
->flags
)
104 ctf_integer(int, refs
, atomic_read(&map
->refs
))
105 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
109 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
111 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
113 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
118 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
119 ctf_integer(u64
, start
, map
->start
)
120 ctf_integer(u64
, len
, map
->len
)
121 ctf_integer(u64
, orig_start
, map
->orig_start
)
122 ctf_integer(u64
, block_start
, map
->block_start
)
123 ctf_integer(u64
, block_len
, map
->block_len
)
124 ctf_integer(unsigned long, flags
, map
->flags
)
125 ctf_integer(int, refs
, atomic_read(&map
->refs
))
126 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
130 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
132 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
134 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
136 TP_ARGS(inode
, ordered
),
139 ctf_integer(ino_t
, ino
, inode
->i_ino
)
140 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
141 ctf_integer(u64
, start
, ordered
->start
)
142 ctf_integer(u64
, len
, ordered
->len
)
143 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
144 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
145 ctf_integer(unsigned long, flags
, ordered
->flags
)
146 ctf_integer(int, compress_type
, ordered
->compress_type
)
147 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
148 ctf_integer(u64
, root_objectid
,
149 BTRFS_I(inode
)->root
->root_key
.objectid
)
153 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
155 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
157 TP_ARGS(inode
, ordered
)
160 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
162 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
164 TP_ARGS(inode
, ordered
)
167 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
169 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
171 TP_ARGS(inode
, ordered
)
174 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
176 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
178 TP_ARGS(inode
, ordered
)
181 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
183 TP_PROTO(struct page
*page
, struct inode
*inode
,
184 struct writeback_control
*wbc
),
186 TP_ARGS(page
, inode
, wbc
),
189 ctf_integer(ino_t
, ino
, inode
->i_ino
)
190 ctf_integer(pgoff_t
, index
, page
->index
)
191 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
192 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
193 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
194 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
195 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
196 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
198 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
199 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
200 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
201 ctf_integer(pgoff_t
, writeback_index
,
202 inode
->i_mapping
->writeback_index
)
203 ctf_integer(u64
, root_objectid
,
204 BTRFS_I(inode
)->root
->root_key
.objectid
)
208 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
212 btrfs__extent_writepage
,
214 TP_PROTO(struct page
*page
, struct inode
*inode
,
215 struct writeback_control
*wbc
),
217 TP_ARGS(page
, inode
, wbc
)
220 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
222 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
224 TP_ARGS(page
, start
, end
, uptodate
),
227 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
228 ctf_integer(pgoff_t
, index
, page
->index
)
229 ctf_integer(u64
, start
, start
)
230 ctf_integer(u64
, end
, end
)
231 ctf_integer(int, uptodate
, uptodate
)
232 ctf_integer(u64
, root_objectid
,
233 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
237 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
239 TP_PROTO(struct file
*file
, int datasync
),
241 TP_ARGS(file
, datasync
),
244 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
245 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
246 ctf_integer(int, datasync
, datasync
)
247 ctf_integer(u64
, root_objectid
,
248 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
252 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
253 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
255 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
257 TP_ARGS(fs_info
, wait
),
260 ctf_integer(int, wait
, wait
)
264 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
271 ctf_integer(int, wait
, wait
)
276 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
278 TP_PROTO(struct btrfs_fs_info
*fs_info
,
279 struct btrfs_block_group_cache
*block_group
, int create
),
281 TP_ARGS(fs_info
, block_group
, create
),
284 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
285 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
286 ctf_integer(u64
, size
, block_group
->key
.offset
)
287 ctf_integer(u64
, flags
, block_group
->flags
)
288 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
289 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
290 ctf_integer(int, create
, create
)
294 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
295 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
297 TP_PROTO(struct btrfs_fs_info
*fs_info
,
298 struct btrfs_delayed_ref_node
*ref
,
299 struct btrfs_delayed_tree_ref
*full_ref
,
302 TP_ARGS(fs_info
, ref
, full_ref
, action
),
305 ctf_integer(u64
, bytenr
, ref
->bytenr
)
306 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
307 ctf_integer(int, action
, action
)
308 ctf_integer(u64
, parent
, full_ref
->parent
)
309 ctf_integer(u64
, ref_root
, full_ref
->root
)
310 ctf_integer(int, level
, full_ref
->level
)
311 ctf_integer(int, type
, ref
->type
)
312 ctf_integer(u64
, seq
, ref
->seq
)
316 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
318 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
319 struct btrfs_delayed_tree_ref
*full_ref
,
322 TP_ARGS(ref
, full_ref
, action
),
325 ctf_integer(u64
, bytenr
, ref
->bytenr
)
326 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
327 ctf_integer(int, action
, action
)
328 ctf_integer(u64
, parent
, full_ref
->parent
)
329 ctf_integer(u64
, ref_root
, full_ref
->root
)
330 ctf_integer(int, level
, full_ref
->level
)
331 ctf_integer(int, type
, ref
->type
)
332 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
333 ctf_integer(u64
, seq
, ref
->seq
)
339 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
341 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
342 struct btrfs_delayed_data_ref
*full_ref
,
345 TP_ARGS(ref
, full_ref
, action
),
348 ctf_integer(u64
, bytenr
, ref
->bytenr
)
349 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
350 ctf_integer(int, action
, action
)
351 ctf_integer(u64
, parent
, full_ref
->parent
)
352 ctf_integer(u64
, ref_root
, full_ref
->root
)
353 ctf_integer(u64
, owner
, full_ref
->objectid
)
354 ctf_integer(u64
, offset
, full_ref
->offset
)
355 ctf_integer(int, type
, ref
->type
)
356 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
357 ctf_integer(u64
, seq
, ref
->seq
)
362 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
363 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
365 TP_PROTO(struct btrfs_fs_info
*fs_info
,
366 struct btrfs_delayed_ref_node
*ref
,
367 struct btrfs_delayed_ref_head
*head_ref
,
370 TP_ARGS(fs_info
, ref
, head_ref
, action
),
373 ctf_integer(u64
, bytenr
, ref
->bytenr
)
374 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
375 ctf_integer(int, action
, action
)
376 ctf_integer(int, is_data
, head_ref
->is_data
)
381 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
383 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
384 struct btrfs_delayed_ref_head
*head_ref
,
387 TP_ARGS(ref
, head_ref
, action
),
390 ctf_integer(u64
, bytenr
, ref
->bytenr
)
391 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
392 ctf_integer(int, action
, action
)
393 ctf_integer(int, is_data
, head_ref
->is_data
)
398 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
400 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
402 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
403 u64 offset
, u64 size
),
405 TP_ARGS(fs_info
, map
, offset
, size
),
408 ctf_integer(int, num_stripes
, map
->num_stripes
)
409 ctf_integer(u64
, type
, map
->type
)
410 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
411 ctf_integer(u64
, offset
, offset
)
412 ctf_integer(u64
, size
, size
)
413 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
417 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
419 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
420 u64 offset
, u64 size
),
422 TP_ARGS(info
, map
, offset
, size
)
425 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
427 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
428 u64 offset
, u64 size
),
430 TP_ARGS(info
, map
, offset
, size
)
433 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
435 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
437 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
438 u64 offset
, u64 size
),
440 TP_ARGS(root
, map
, offset
, size
),
443 ctf_integer(int, num_stripes
, map
->num_stripes
)
444 ctf_integer(u64
, type
, map
->type
)
445 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
446 ctf_integer(u64
, offset
, offset
)
447 ctf_integer(u64
, size
, size
)
448 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
452 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
454 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
455 u64 offset
, u64 size
),
457 TP_ARGS(root
, map
, offset
, size
)
460 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
462 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
463 u64 offset
, u64 size
),
465 TP_ARGS(root
, map
, offset
, size
)
468 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
470 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
472 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
473 struct extent_buffer
*cow
),
475 TP_ARGS(root
, buf
, cow
),
478 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
479 ctf_integer(u64
, buf_start
, buf
->start
)
480 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
481 ctf_integer(u64
, cow_start
, cow
->start
)
482 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
483 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
487 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
488 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
490 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
491 u64 bytes
, int reserve
),
493 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
496 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
497 ctf_string(type
, type
)
498 ctf_integer(u64
, val
, val
)
499 ctf_integer(u64
, bytes
, bytes
)
500 ctf_integer(int, reserve
, reserve
)
505 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
507 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
509 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
511 TP_ARGS(info
, start
, len
),
514 ctf_integer(u64
, start
, start
)
515 ctf_integer(u64
, len
, len
)
519 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
521 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
523 TP_ARGS(info
, start
, len
)
526 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
528 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
530 TP_ARGS(info
, start
, len
)
533 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
535 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
537 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
539 TP_ARGS(root
, start
, len
),
542 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
543 ctf_integer(u64
, start
, start
)
544 ctf_integer(u64
, len
, len
)
548 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
550 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
552 TP_ARGS(root
, start
, len
)
555 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
557 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
559 TP_ARGS(root
, start
, len
)
562 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
564 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
566 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
568 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
570 btrfs_find_free_extent
,
572 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
575 TP_ARGS(info
, num_bytes
, empty_size
, data
),
578 ctf_integer(u64
, num_bytes
, num_bytes
)
579 ctf_integer(u64
, empty_size
, empty_size
)
580 ctf_integer(u64
, data
, data
)
584 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
586 TP_PROTO(struct btrfs_fs_info
*info
,
587 struct btrfs_block_group_cache
*block_group
, u64 start
,
590 TP_ARGS(info
, block_group
, start
, len
),
593 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
594 ctf_integer(u64
, flags
, block_group
->flags
)
595 ctf_integer(u64
, start
, start
)
596 ctf_integer(u64
, len
, len
)
600 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
602 TP_PROTO(struct btrfs_fs_info
*info
,
603 struct btrfs_block_group_cache
*block_group
, u64 start
,
606 TP_ARGS(info
, block_group
, start
, len
)
609 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
611 TP_PROTO(struct btrfs_fs_info
*info
,
612 struct btrfs_block_group_cache
*block_group
, u64 start
,
615 TP_ARGS(info
, block_group
, start
, len
)
618 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
620 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
622 btrfs_find_free_extent
,
624 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
627 TP_ARGS(root
, num_bytes
, empty_size
, data
),
630 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
631 ctf_integer(u64
, num_bytes
, num_bytes
)
632 ctf_integer(u64
, empty_size
, empty_size
)
633 ctf_integer(u64
, data
, data
)
637 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
639 TP_PROTO(struct btrfs_root
*root
,
640 struct btrfs_block_group_cache
*block_group
, u64 start
,
643 TP_ARGS(root
, block_group
, start
, len
),
646 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
647 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
648 ctf_integer(u64
, flags
, block_group
->flags
)
649 ctf_integer(u64
, start
, start
)
650 ctf_integer(u64
, len
, len
)
654 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
656 TP_PROTO(struct btrfs_root
*root
,
657 struct btrfs_block_group_cache
*block_group
, u64 start
,
660 TP_ARGS(root
, block_group
, start
, len
)
663 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
665 TP_PROTO(struct btrfs_root
*root
,
666 struct btrfs_block_group_cache
*block_group
, u64 start
,
669 TP_ARGS(root
, block_group
, start
, len
)
672 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
674 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
676 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
677 u64 bytes
, u64 empty_size
, u64 min_bytes
),
679 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
682 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
683 ctf_integer(u64
, flags
, block_group
->flags
)
684 ctf_integer(u64
, start
, start
)
685 ctf_integer(u64
, bytes
, bytes
)
686 ctf_integer(u64
, empty_size
, empty_size
)
687 ctf_integer(u64
, min_bytes
, min_bytes
)
691 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
693 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
695 TP_ARGS(block_group
),
698 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
702 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
704 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
705 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
707 TP_ARGS(block_group
, cluster
, size
, bitmap
),
710 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
711 ctf_integer(u64
, flags
, block_group
->flags
)
712 ctf_integer(u64
, start
, cluster
->window_start
)
713 ctf_integer(u64
, max_size
, cluster
->max_size
)
714 ctf_integer(u64
, size
, size
)
715 ctf_integer(int, bitmap
, bitmap
)
720 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
721 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
723 btrfs_alloc_extent_state
,
725 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
727 TP_ARGS(state
, mask
, IP
),
730 ctf_integer_hex(struct extent_state
*, state
, state
)
731 ctf_integer(gfp_t
, mask
, mask
)
732 ctf_integer(unsigned long, ip
, IP
)
736 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
738 btrfs_free_extent_state
,
740 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
745 ctf_integer_hex(struct extent_state
*, state
, state
)
746 ctf_integer(unsigned long, ip
, IP
)
751 #endif /* LTTNG_TRACE_BTRFS_H */
753 /* This part must be outside protection */
754 #include <probes/define_trace.h>