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 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
88 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
89 struct extent_map
*map
),
91 TP_ARGS(root
, inode
, map
),
94 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
95 ctf_integer(u64
, ino
, btrfs_ino(inode
))
96 ctf_integer(u64
, start
, map
->start
)
97 ctf_integer(u64
, len
, map
->len
)
98 ctf_integer(u64
, orig_start
, map
->orig_start
)
99 ctf_integer(u64
, block_start
, map
->block_start
)
100 ctf_integer(u64
, block_len
, map
->block_len
)
101 ctf_integer(unsigned long, flags
, map
->flags
)
102 ctf_integer(int, refs
, atomic_read(&map
->refs
))
103 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
107 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
109 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
111 TP_ARGS(inode
, ordered
),
114 ctf_integer(ino_t
, ino
, inode
->i_ino
)
115 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
116 ctf_integer(u64
, start
, ordered
->start
)
117 ctf_integer(u64
, len
, ordered
->len
)
118 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
119 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
120 ctf_integer(unsigned long, flags
, ordered
->flags
)
121 ctf_integer(int, compress_type
, ordered
->compress_type
)
122 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
123 ctf_integer(u64
, root_objectid
,
124 BTRFS_I(inode
)->root
->root_key
.objectid
)
128 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
130 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
132 TP_ARGS(inode
, ordered
)
135 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
137 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
139 TP_ARGS(inode
, ordered
)
142 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
144 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
146 TP_ARGS(inode
, ordered
)
149 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
151 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
153 TP_ARGS(inode
, ordered
)
156 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
158 TP_PROTO(struct page
*page
, struct inode
*inode
,
159 struct writeback_control
*wbc
),
161 TP_ARGS(page
, inode
, wbc
),
164 ctf_integer(ino_t
, ino
, inode
->i_ino
)
165 ctf_integer(pgoff_t
, index
, page
->index
)
166 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
167 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
168 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
169 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
170 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
171 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
173 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
174 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
175 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
176 ctf_integer(pgoff_t
, writeback_index
,
177 inode
->i_mapping
->writeback_index
)
178 ctf_integer(u64
, root_objectid
,
179 BTRFS_I(inode
)->root
->root_key
.objectid
)
183 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
187 btrfs__extent_writepage
,
189 TP_PROTO(struct page
*page
, struct inode
*inode
,
190 struct writeback_control
*wbc
),
192 TP_ARGS(page
, inode
, wbc
)
195 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
197 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
199 TP_ARGS(page
, start
, end
, uptodate
),
202 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
203 ctf_integer(pgoff_t
, index
, page
->index
)
204 ctf_integer(u64
, start
, start
)
205 ctf_integer(u64
, end
, end
)
206 ctf_integer(int, uptodate
, uptodate
)
207 ctf_integer(u64
, root_objectid
,
208 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
212 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
214 TP_PROTO(struct file
*file
, int datasync
),
216 TP_ARGS(file
, datasync
),
219 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
220 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
221 ctf_integer(int, datasync
, datasync
)
222 ctf_integer(u64
, root_objectid
,
223 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
227 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
228 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
230 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
232 TP_ARGS(fs_info
, wait
),
235 ctf_integer(int, wait
, wait
)
239 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
246 ctf_integer(int, wait
, wait
)
251 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
253 TP_PROTO(struct btrfs_fs_info
*fs_info
,
254 struct btrfs_block_group_cache
*block_group
, int create
),
256 TP_ARGS(fs_info
, block_group
, create
),
259 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
260 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
261 ctf_integer(u64
, size
, block_group
->key
.offset
)
262 ctf_integer(u64
, flags
, block_group
->flags
)
263 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
264 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
265 ctf_integer(int, create
, create
)
269 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
270 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
272 TP_PROTO(struct btrfs_fs_info
*fs_info
,
273 struct btrfs_delayed_ref_node
*ref
,
274 struct btrfs_delayed_tree_ref
*full_ref
,
277 TP_ARGS(fs_info
, ref
, full_ref
, action
),
280 ctf_integer(u64
, bytenr
, ref
->bytenr
)
281 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
282 ctf_integer(int, action
, action
)
283 ctf_integer(u64
, parent
, full_ref
->parent
)
284 ctf_integer(u64
, ref_root
, full_ref
->root
)
285 ctf_integer(int, level
, full_ref
->level
)
286 ctf_integer(int, type
, ref
->type
)
287 ctf_integer(u64
, seq
, ref
->seq
)
291 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
293 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
294 struct btrfs_delayed_tree_ref
*full_ref
,
297 TP_ARGS(ref
, full_ref
, action
),
300 ctf_integer(u64
, bytenr
, ref
->bytenr
)
301 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
302 ctf_integer(int, action
, action
)
303 ctf_integer(u64
, parent
, full_ref
->parent
)
304 ctf_integer(u64
, ref_root
, full_ref
->root
)
305 ctf_integer(int, level
, full_ref
->level
)
306 ctf_integer(int, type
, ref
->type
)
307 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
308 ctf_integer(u64
, seq
, ref
->seq
)
314 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
316 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
317 struct btrfs_delayed_data_ref
*full_ref
,
320 TP_ARGS(ref
, full_ref
, action
),
323 ctf_integer(u64
, bytenr
, ref
->bytenr
)
324 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
325 ctf_integer(int, action
, action
)
326 ctf_integer(u64
, parent
, full_ref
->parent
)
327 ctf_integer(u64
, ref_root
, full_ref
->root
)
328 ctf_integer(u64
, owner
, full_ref
->objectid
)
329 ctf_integer(u64
, offset
, full_ref
->offset
)
330 ctf_integer(int, type
, ref
->type
)
331 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
332 ctf_integer(u64
, seq
, ref
->seq
)
337 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
338 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
340 TP_PROTO(struct btrfs_fs_info
*fs_info
,
341 struct btrfs_delayed_ref_node
*ref
,
342 struct btrfs_delayed_ref_head
*head_ref
,
345 TP_ARGS(fs_info
, ref
, head_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(int, is_data
, head_ref
->is_data
)
356 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
358 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
359 struct btrfs_delayed_ref_head
*head_ref
,
362 TP_ARGS(ref
, head_ref
, action
),
365 ctf_integer(u64
, bytenr
, ref
->bytenr
)
366 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
367 ctf_integer(int, action
, action
)
368 ctf_integer(int, is_data
, head_ref
->is_data
)
373 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
375 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
377 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
378 u64 offset
, u64 size
),
380 TP_ARGS(fs_info
, map
, offset
, size
),
383 ctf_integer(int, num_stripes
, map
->num_stripes
)
384 ctf_integer(u64
, type
, map
->type
)
385 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
386 ctf_integer(u64
, offset
, offset
)
387 ctf_integer(u64
, size
, size
)
388 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
392 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
394 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
395 u64 offset
, u64 size
),
397 TP_ARGS(info
, map
, offset
, size
)
400 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
402 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
403 u64 offset
, u64 size
),
405 TP_ARGS(info
, map
, offset
, size
)
408 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
410 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
412 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
413 u64 offset
, u64 size
),
415 TP_ARGS(root
, map
, offset
, size
),
418 ctf_integer(int, num_stripes
, map
->num_stripes
)
419 ctf_integer(u64
, type
, map
->type
)
420 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
421 ctf_integer(u64
, offset
, offset
)
422 ctf_integer(u64
, size
, size
)
423 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
427 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
429 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
430 u64 offset
, u64 size
),
432 TP_ARGS(root
, map
, offset
, size
)
435 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
437 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
438 u64 offset
, u64 size
),
440 TP_ARGS(root
, map
, offset
, size
)
443 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
445 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
447 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
448 struct extent_buffer
*cow
),
450 TP_ARGS(root
, buf
, cow
),
453 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
454 ctf_integer(u64
, buf_start
, buf
->start
)
455 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
456 ctf_integer(u64
, cow_start
, cow
->start
)
457 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
458 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
462 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
463 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
465 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
466 u64 bytes
, int reserve
),
468 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
471 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
472 ctf_string(type
, type
)
473 ctf_integer(u64
, val
, val
)
474 ctf_integer(u64
, bytes
, bytes
)
475 ctf_integer(int, reserve
, reserve
)
480 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
482 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
484 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
486 TP_ARGS(info
, start
, len
),
489 ctf_integer(u64
, start
, start
)
490 ctf_integer(u64
, len
, len
)
494 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
496 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
498 TP_ARGS(info
, start
, len
)
501 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
503 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
505 TP_ARGS(info
, start
, len
)
508 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
510 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
512 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
514 TP_ARGS(root
, start
, len
),
517 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
518 ctf_integer(u64
, start
, start
)
519 ctf_integer(u64
, len
, len
)
523 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
525 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
527 TP_ARGS(root
, start
, len
)
530 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
532 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
534 TP_ARGS(root
, start
, len
)
537 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
539 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
541 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
543 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
545 btrfs_find_free_extent
,
547 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
550 TP_ARGS(info
, num_bytes
, empty_size
, data
),
553 ctf_integer(u64
, num_bytes
, num_bytes
)
554 ctf_integer(u64
, empty_size
, empty_size
)
555 ctf_integer(u64
, data
, data
)
559 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
561 TP_PROTO(struct btrfs_fs_info
*info
,
562 struct btrfs_block_group_cache
*block_group
, u64 start
,
565 TP_ARGS(info
, block_group
, start
, len
),
568 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
569 ctf_integer(u64
, flags
, block_group
->flags
)
570 ctf_integer(u64
, start
, start
)
571 ctf_integer(u64
, len
, len
)
575 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
577 TP_PROTO(struct btrfs_fs_info
*info
,
578 struct btrfs_block_group_cache
*block_group
, u64 start
,
581 TP_ARGS(info
, block_group
, start
, len
)
584 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
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 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
595 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
597 btrfs_find_free_extent
,
599 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
602 TP_ARGS(root
, num_bytes
, empty_size
, data
),
605 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
606 ctf_integer(u64
, num_bytes
, num_bytes
)
607 ctf_integer(u64
, empty_size
, empty_size
)
608 ctf_integer(u64
, data
, data
)
612 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
614 TP_PROTO(struct btrfs_root
*root
,
615 struct btrfs_block_group_cache
*block_group
, u64 start
,
618 TP_ARGS(root
, block_group
, start
, len
),
621 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
622 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
623 ctf_integer(u64
, flags
, block_group
->flags
)
624 ctf_integer(u64
, start
, start
)
625 ctf_integer(u64
, len
, len
)
629 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
631 TP_PROTO(struct btrfs_root
*root
,
632 struct btrfs_block_group_cache
*block_group
, u64 start
,
635 TP_ARGS(root
, block_group
, start
, len
)
638 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
640 TP_PROTO(struct btrfs_root
*root
,
641 struct btrfs_block_group_cache
*block_group
, u64 start
,
644 TP_ARGS(root
, block_group
, start
, len
)
647 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
649 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
651 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
652 u64 bytes
, u64 empty_size
, u64 min_bytes
),
654 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
657 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
658 ctf_integer(u64
, flags
, block_group
->flags
)
659 ctf_integer(u64
, start
, start
)
660 ctf_integer(u64
, bytes
, bytes
)
661 ctf_integer(u64
, empty_size
, empty_size
)
662 ctf_integer(u64
, min_bytes
, min_bytes
)
666 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
668 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
670 TP_ARGS(block_group
),
673 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
677 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
679 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
680 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
682 TP_ARGS(block_group
, cluster
, size
, bitmap
),
685 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
686 ctf_integer(u64
, flags
, block_group
->flags
)
687 ctf_integer(u64
, start
, cluster
->window_start
)
688 ctf_integer(u64
, max_size
, cluster
->max_size
)
689 ctf_integer(u64
, size
, size
)
690 ctf_integer(int, bitmap
, bitmap
)
695 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
696 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
698 btrfs_alloc_extent_state
,
700 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
702 TP_ARGS(state
, mask
, IP
),
705 ctf_integer_hex(struct extent_state
*, state
, state
)
706 ctf_integer(gfp_t
, mask
, mask
)
707 ctf_integer(unsigned long, ip
, IP
)
711 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
713 btrfs_free_extent_state
,
715 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
720 ctf_integer_hex(struct extent_state
*, state
, state
)
721 ctf_integer(unsigned long, ip
, IP
)
726 #endif /* LTTNG_TRACE_BTRFS_H */
728 /* This part must be outside protection */
729 #include <probes/define_trace.h>