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 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
36 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
37 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
39 TP_PROTO(const struct btrfs_root
*root
),
44 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
45 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
49 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
51 TP_PROTO(const struct inode
*inode
),
56 ctf_integer(ino_t
, ino
, inode
->i_ino
)
57 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
58 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
59 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
60 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
61 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
62 ctf_integer(u64
, root_objectid
,
63 BTRFS_I(inode
)->root
->root_key
.objectid
)
67 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
69 TP_PROTO(const struct inode
*inode
),
74 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
76 TP_PROTO(const struct inode
*inode
),
81 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
83 TP_PROTO(const struct inode
*inode
),
88 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
90 TP_PROTO(struct btrfs_root
*root
),
95 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
96 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
100 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
102 TP_PROTO(struct inode
*inode
),
107 ctf_integer(ino_t
, ino
, inode
->i_ino
)
108 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
109 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
110 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
111 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
112 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
113 ctf_integer(u64
, root_objectid
,
114 BTRFS_I(inode
)->root
->root_key
.objectid
)
118 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
120 TP_PROTO(struct inode
*inode
),
125 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
127 TP_PROTO(struct inode
*inode
),
132 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
134 TP_PROTO(struct inode
*inode
),
140 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
142 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
144 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
145 const struct extent_map
*map
),
147 TP_ARGS(root
, inode
, map
),
150 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
151 ctf_integer(u64
, ino
, btrfs_ino(inode
))
152 ctf_integer(u64
, start
, map
->start
)
153 ctf_integer(u64
, len
, map
->len
)
154 ctf_integer(u64
, orig_start
, map
->orig_start
)
155 ctf_integer(u64
, block_start
, map
->block_start
)
156 ctf_integer(u64
, block_len
, map
->block_len
)
157 ctf_integer(unsigned long, flags
, map
->flags
)
158 ctf_integer(int, refs
, refcount_read(&map
->refs
))
159 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
163 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
165 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
167 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
168 struct extent_map
*map
),
170 TP_ARGS(root
, inode
, map
),
173 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
174 ctf_integer(u64
, ino
, btrfs_ino(inode
))
175 ctf_integer(u64
, start
, map
->start
)
176 ctf_integer(u64
, len
, map
->len
)
177 ctf_integer(u64
, orig_start
, map
->orig_start
)
178 ctf_integer(u64
, block_start
, map
->block_start
)
179 ctf_integer(u64
, block_len
, map
->block_len
)
180 ctf_integer(unsigned long, flags
, map
->flags
)
181 ctf_integer(int, refs
, refcount_read(&map
->refs
))
182 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
186 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
188 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
190 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
191 struct extent_map
*map
),
193 TP_ARGS(root
, inode
, map
),
196 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
197 ctf_integer(u64
, ino
, btrfs_ino(inode
))
198 ctf_integer(u64
, start
, map
->start
)
199 ctf_integer(u64
, len
, map
->len
)
200 ctf_integer(u64
, orig_start
, map
->orig_start
)
201 ctf_integer(u64
, block_start
, map
->block_start
)
202 ctf_integer(u64
, block_len
, map
->block_len
)
203 ctf_integer(unsigned long, flags
, map
->flags
)
204 ctf_integer(int, refs
, atomic_read(&map
->refs
))
205 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
209 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
211 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
213 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
214 struct extent_map
*map
),
216 TP_ARGS(root
, inode
, map
),
219 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
220 ctf_integer(u64
, ino
, btrfs_ino(inode
))
221 ctf_integer(u64
, start
, map
->start
)
222 ctf_integer(u64
, len
, map
->len
)
223 ctf_integer(u64
, orig_start
, map
->orig_start
)
224 ctf_integer(u64
, block_start
, map
->block_start
)
225 ctf_integer(u64
, block_len
, map
->block_len
)
226 ctf_integer(unsigned long, flags
, map
->flags
)
227 ctf_integer(int, refs
, atomic_read(&map
->refs
))
228 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
232 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
234 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
236 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
241 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
242 ctf_integer(u64
, start
, map
->start
)
243 ctf_integer(u64
, len
, map
->len
)
244 ctf_integer(u64
, orig_start
, map
->orig_start
)
245 ctf_integer(u64
, block_start
, map
->block_start
)
246 ctf_integer(u64
, block_len
, map
->block_len
)
247 ctf_integer(unsigned long, flags
, map
->flags
)
248 ctf_integer(int, refs
, atomic_read(&map
->refs
))
249 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
253 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
255 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
257 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
262 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
263 ctf_integer(u64
, start
, map
->start
)
264 ctf_integer(u64
, len
, map
->len
)
265 ctf_integer(u64
, orig_start
, map
->orig_start
)
266 ctf_integer(u64
, block_start
, map
->block_start
)
267 ctf_integer(u64
, block_len
, map
->block_len
)
268 ctf_integer(unsigned long, flags
, map
->flags
)
269 ctf_integer(int, refs
, atomic_read(&map
->refs
))
270 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
274 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
276 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
277 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
279 TP_PROTO(const struct inode
*inode
,
280 const struct btrfs_ordered_extent
*ordered
),
282 TP_ARGS(inode
, ordered
),
285 ctf_integer(ino_t
, ino
, inode
->i_ino
)
286 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
287 ctf_integer(u64
, start
, ordered
->start
)
288 ctf_integer(u64
, len
, ordered
->len
)
289 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
290 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
291 ctf_integer(unsigned long, flags
, ordered
->flags
)
292 ctf_integer(int, compress_type
, ordered
->compress_type
)
293 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
294 ctf_integer(u64
, root_objectid
,
295 BTRFS_I(inode
)->root
->root_key
.objectid
)
298 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
299 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
301 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
303 TP_ARGS(inode
, ordered
),
306 ctf_integer(ino_t
, ino
, inode
->i_ino
)
307 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
308 ctf_integer(u64
, start
, ordered
->start
)
309 ctf_integer(u64
, len
, ordered
->len
)
310 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
311 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
312 ctf_integer(unsigned long, flags
, ordered
->flags
)
313 ctf_integer(int, compress_type
, ordered
->compress_type
)
314 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
315 ctf_integer(u64
, root_objectid
,
316 BTRFS_I(inode
)->root
->root_key
.objectid
)
319 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
320 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
322 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
324 TP_ARGS(inode
, ordered
),
327 ctf_integer(ino_t
, ino
, inode
->i_ino
)
328 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
329 ctf_integer(u64
, start
, ordered
->start
)
330 ctf_integer(u64
, len
, ordered
->len
)
331 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
332 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
333 ctf_integer(unsigned long, flags
, ordered
->flags
)
334 ctf_integer(int, compress_type
, ordered
->compress_type
)
335 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
336 ctf_integer(u64
, root_objectid
,
337 BTRFS_I(inode
)->root
->root_key
.objectid
)
341 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
343 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
345 TP_ARGS(inode
, ordered
),
348 ctf_integer(ino_t
, ino
, inode
->i_ino
)
349 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
350 ctf_integer(u64
, start
, ordered
->start
)
351 ctf_integer(u64
, len
, ordered
->len
)
352 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
353 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
354 ctf_integer(unsigned long, flags
, ordered
->flags
)
355 ctf_integer(int, compress_type
, ordered
->compress_type
)
356 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
357 ctf_integer(u64
, root_objectid
,
358 BTRFS_I(inode
)->root
->root_key
.objectid
)
363 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
364 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
365 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
367 TP_PROTO(const struct inode
*inode
,
368 const struct btrfs_ordered_extent
*ordered
),
370 TP_ARGS(inode
, ordered
)
373 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
375 TP_PROTO(const struct inode
*inode
,
376 const struct btrfs_ordered_extent
*ordered
),
378 TP_ARGS(inode
, ordered
)
381 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
383 TP_PROTO(const struct inode
*inode
,
384 const struct btrfs_ordered_extent
*ordered
),
386 TP_ARGS(inode
, ordered
)
389 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
391 TP_PROTO(const struct inode
*inode
,
392 const struct btrfs_ordered_extent
*ordered
),
394 TP_ARGS(inode
, ordered
)
397 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
399 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
400 const struct writeback_control
*wbc
),
402 TP_ARGS(page
, inode
, wbc
),
405 ctf_integer(ino_t
, ino
, inode
->i_ino
)
406 ctf_integer(pgoff_t
, index
, page
->index
)
407 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
408 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
409 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
410 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
411 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
412 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
413 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
414 ctf_integer(pgoff_t
, writeback_index
,
415 inode
->i_mapping
->writeback_index
)
416 ctf_integer(u64
, root_objectid
,
417 BTRFS_I(inode
)->root
->root_key
.objectid
)
421 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
425 btrfs__extent_writepage
,
427 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
428 const struct writeback_control
*wbc
),
430 TP_ARGS(page
, inode
, wbc
)
433 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
435 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
437 TP_ARGS(page
, start
, end
, uptodate
),
440 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
441 ctf_integer(pgoff_t
, index
, page
->index
)
442 ctf_integer(u64
, start
, start
)
443 ctf_integer(u64
, end
, end
)
444 ctf_integer(int, uptodate
, uptodate
)
445 ctf_integer(u64
, root_objectid
,
446 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
450 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
452 TP_PROTO(const struct file
*file
, int datasync
),
454 TP_ARGS(file
, datasync
),
457 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
458 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
459 ctf_integer(int, datasync
, datasync
)
460 ctf_integer(u64
, root_objectid
,
461 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
465 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
467 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
469 TP_ARGS(inode
, ordered
)
472 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
474 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
476 TP_ARGS(inode
, ordered
)
479 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
481 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
483 TP_ARGS(inode
, ordered
)
486 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
488 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
490 TP_ARGS(inode
, ordered
)
493 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
495 TP_PROTO(struct page
*page
, struct inode
*inode
,
496 struct writeback_control
*wbc
),
498 TP_ARGS(page
, inode
, wbc
),
501 ctf_integer(ino_t
, ino
, inode
->i_ino
)
502 ctf_integer(pgoff_t
, index
, page
->index
)
503 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
504 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
505 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
506 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
507 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
508 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
510 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
511 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
512 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
513 ctf_integer(pgoff_t
, writeback_index
,
514 inode
->i_mapping
->writeback_index
)
515 ctf_integer(u64
, root_objectid
,
516 BTRFS_I(inode
)->root
->root_key
.objectid
)
520 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
524 btrfs__extent_writepage
,
526 TP_PROTO(struct page
*page
, struct inode
*inode
,
527 struct writeback_control
*wbc
),
529 TP_ARGS(page
, inode
, wbc
)
532 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
534 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
536 TP_ARGS(page
, start
, end
, uptodate
),
539 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
540 ctf_integer(pgoff_t
, index
, page
->index
)
541 ctf_integer(u64
, start
, start
)
542 ctf_integer(u64
, end
, end
)
543 ctf_integer(int, uptodate
, uptodate
)
544 ctf_integer(u64
, root_objectid
,
545 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
549 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
551 TP_PROTO(struct file
*file
, int datasync
),
553 TP_ARGS(file
, datasync
),
556 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
557 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
558 ctf_integer(int, datasync
, datasync
)
559 ctf_integer(u64
, root_objectid
,
560 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
565 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
566 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
567 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
569 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
571 TP_ARGS(fs_info
, wait
),
574 ctf_integer(int, wait
, wait
)
577 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
578 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
580 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
582 TP_ARGS(fs_info
, wait
),
585 ctf_integer(int, wait
, wait
)
589 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
596 ctf_integer(int, wait
, wait
)
601 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
602 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
603 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
605 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
606 const struct btrfs_block_group_cache
*block_group
, int create
),
608 TP_ARGS(fs_info
, block_group
, create
),
611 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
612 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
613 ctf_integer(u64
, size
, block_group
->key
.offset
)
614 ctf_integer(u64
, flags
, block_group
->flags
)
615 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
616 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
617 ctf_integer(int, create
, create
)
621 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
623 TP_PROTO(struct btrfs_fs_info
*fs_info
,
624 struct btrfs_block_group_cache
*block_group
, int create
),
626 TP_ARGS(fs_info
, block_group
, create
),
629 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
630 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
631 ctf_integer(u64
, size
, block_group
->key
.offset
)
632 ctf_integer(u64
, flags
, block_group
->flags
)
633 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
634 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
635 ctf_integer(int, create
, create
)
640 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
641 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
643 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
644 const struct btrfs_delayed_ref_node
*ref
,
645 const struct btrfs_delayed_tree_ref
*full_ref
,
648 TP_ARGS(fs_info
, ref
, full_ref
, action
),
651 ctf_integer(u64
, bytenr
, ref
->bytenr
)
652 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
653 ctf_integer(int, action
, action
)
654 ctf_integer(u64
, parent
, full_ref
->parent
)
655 ctf_integer(u64
, ref_root
, full_ref
->root
)
656 ctf_integer(int, level
, full_ref
->level
)
657 ctf_integer(int, type
, ref
->type
)
658 ctf_integer(u64
, seq
, ref
->seq
)
661 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
662 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
664 TP_PROTO(struct btrfs_fs_info
*fs_info
,
665 struct btrfs_delayed_ref_node
*ref
,
666 struct btrfs_delayed_tree_ref
*full_ref
,
669 TP_ARGS(fs_info
, ref
, full_ref
, action
),
672 ctf_integer(u64
, bytenr
, ref
->bytenr
)
673 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
674 ctf_integer(int, action
, action
)
675 ctf_integer(u64
, parent
, full_ref
->parent
)
676 ctf_integer(u64
, ref_root
, full_ref
->root
)
677 ctf_integer(int, level
, full_ref
->level
)
678 ctf_integer(int, type
, ref
->type
)
679 ctf_integer(u64
, seq
, ref
->seq
)
683 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
685 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
686 struct btrfs_delayed_tree_ref
*full_ref
,
689 TP_ARGS(ref
, full_ref
, action
),
692 ctf_integer(u64
, bytenr
, ref
->bytenr
)
693 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
694 ctf_integer(int, action
, action
)
695 ctf_integer(u64
, parent
, full_ref
->parent
)
696 ctf_integer(u64
, ref_root
, full_ref
->root
)
697 ctf_integer(int, level
, full_ref
->level
)
698 ctf_integer(int, type
, ref
->type
)
699 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
700 ctf_integer(u64
, seq
, ref
->seq
)
706 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
708 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
709 struct btrfs_delayed_data_ref
*full_ref
,
712 TP_ARGS(ref
, full_ref
, action
),
715 ctf_integer(u64
, bytenr
, ref
->bytenr
)
716 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
717 ctf_integer(int, action
, action
)
718 ctf_integer(u64
, parent
, full_ref
->parent
)
719 ctf_integer(u64
, ref_root
, full_ref
->root
)
720 ctf_integer(u64
, owner
, full_ref
->objectid
)
721 ctf_integer(u64
, offset
, full_ref
->offset
)
722 ctf_integer(int, type
, ref
->type
)
723 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
724 ctf_integer(u64
, seq
, ref
->seq
)
729 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
730 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
732 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
733 const struct btrfs_delayed_ref_head
*head_ref
,
736 TP_ARGS(fs_info
, head_ref
, action
),
739 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
740 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
741 ctf_integer(int, action
, action
)
742 ctf_integer(int, is_data
, head_ref
->is_data
)
746 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
748 add_delayed_ref_head
,
750 btrfs_add_delayed_ref_head
,
752 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
753 const struct btrfs_delayed_ref_head
*head_ref
,
756 TP_ARGS(fs_info
, head_ref
, action
)
759 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
761 run_delayed_ref_head
,
763 btrfs_run_delayed_ref_head
,
765 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
766 const struct btrfs_delayed_ref_head
*head_ref
,
769 TP_ARGS(fs_info
, head_ref
, action
)
772 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
773 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
774 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
776 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
777 const struct btrfs_delayed_ref_node
*ref
,
778 const struct btrfs_delayed_ref_head
*head_ref
,
781 TP_ARGS(fs_info
, ref
, head_ref
, action
),
784 ctf_integer(u64
, bytenr
, ref
->bytenr
)
785 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
786 ctf_integer(int, action
, action
)
787 ctf_integer(int, is_data
, head_ref
->is_data
)
791 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
793 add_delayed_ref_head
,
795 btrfs_add_delayed_ref_head
,
797 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
798 const struct btrfs_delayed_ref_node
*ref
,
799 const struct btrfs_delayed_ref_head
*head_ref
,
802 TP_ARGS(fs_info
, ref
, head_ref
, action
)
805 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
807 run_delayed_ref_head
,
809 btrfs_run_delayed_ref_head
,
811 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
812 const struct btrfs_delayed_ref_node
*ref
,
813 const struct btrfs_delayed_ref_head
*head_ref
,
816 TP_ARGS(fs_info
, ref
, head_ref
, action
)
819 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
820 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
822 TP_PROTO(struct btrfs_fs_info
*fs_info
,
823 struct btrfs_delayed_ref_node
*ref
,
824 struct btrfs_delayed_ref_head
*head_ref
,
827 TP_ARGS(fs_info
, ref
, head_ref
, action
),
830 ctf_integer(u64
, bytenr
, ref
->bytenr
)
831 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
832 ctf_integer(int, action
, action
)
833 ctf_integer(int, is_data
, head_ref
->is_data
)
837 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
839 add_delayed_ref_head
,
841 btrfs_add_delayed_ref_head
,
843 TP_PROTO(struct btrfs_fs_info
*fs_info
,
844 struct btrfs_delayed_ref_node
*ref
,
845 struct btrfs_delayed_ref_head
*head_ref
,
848 TP_ARGS(fs_info
, ref
, head_ref
, action
)
851 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
853 run_delayed_ref_head
,
855 btrfs_run_delayed_ref_head
,
857 TP_PROTO(struct btrfs_fs_info
*fs_info
,
858 struct btrfs_delayed_ref_node
*ref
,
859 struct btrfs_delayed_ref_head
*head_ref
,
862 TP_ARGS(fs_info
, ref
, head_ref
, action
)
865 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
866 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
868 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
869 const struct btrfs_delayed_ref_head
*head_ref
,
872 TP_ARGS(ref
, head_ref
, action
),
875 ctf_integer(u64
, bytenr
, ref
->bytenr
)
876 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
877 ctf_integer(int, action
, action
)
878 ctf_integer(int, is_data
, head_ref
->is_data
)
882 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
884 add_delayed_ref_head
,
886 btrfs_add_delayed_ref_head
,
888 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
889 const struct btrfs_delayed_ref_head
*head_ref
,
892 TP_ARGS(ref
, head_ref
, action
)
895 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
897 run_delayed_ref_head
,
899 btrfs_run_delayed_ref_head
,
901 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
902 const struct btrfs_delayed_ref_head
*head_ref
,
905 TP_ARGS(ref
, head_ref
, action
)
908 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
909 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
911 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
912 struct btrfs_delayed_ref_head
*head_ref
,
915 TP_ARGS(ref
, head_ref
, action
),
918 ctf_integer(u64
, bytenr
, ref
->bytenr
)
919 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
920 ctf_integer(int, action
, action
)
921 ctf_integer(int, is_data
, head_ref
->is_data
)
925 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
927 add_delayed_ref_head
,
929 btrfs_add_delayed_ref_head
,
931 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
932 struct btrfs_delayed_ref_head
*head_ref
,
935 TP_ARGS(ref
, head_ref
, action
)
938 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
940 run_delayed_ref_head
,
942 btrfs_run_delayed_ref_head
,
944 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
945 struct btrfs_delayed_ref_head
*head_ref
,
948 TP_ARGS(ref
, head_ref
, action
)
952 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
954 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
955 struct btrfs_delayed_ref_head
*head_ref
,
958 TP_ARGS(ref
, head_ref
, action
),
961 ctf_integer(u64
, bytenr
, ref
->bytenr
)
962 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
963 ctf_integer(int, action
, action
)
964 ctf_integer(int, is_data
, head_ref
->is_data
)
969 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
971 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
973 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
974 u64 offset
, u64 size
),
976 TP_ARGS(fs_info
, map
, offset
, size
),
979 ctf_integer(int, num_stripes
, map
->num_stripes
)
980 ctf_integer(u64
, type
, map
->type
)
981 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
982 ctf_integer(u64
, offset
, offset
)
983 ctf_integer(u64
, size
, size
)
984 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
988 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
990 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
991 u64 offset
, u64 size
),
993 TP_ARGS(info
, map
, offset
, size
)
996 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
998 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
999 u64 offset
, u64 size
),
1001 TP_ARGS(info
, map
, offset
, size
)
1004 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1006 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1008 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1009 u64 offset
, u64 size
),
1011 TP_ARGS(fs_info
, map
, offset
, size
),
1014 ctf_integer(int, num_stripes
, map
->num_stripes
)
1015 ctf_integer(u64
, type
, map
->type
)
1016 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1017 ctf_integer(u64
, offset
, offset
)
1018 ctf_integer(u64
, size
, size
)
1019 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1023 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1025 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1026 u64 offset
, u64 size
),
1028 TP_ARGS(info
, map
, offset
, size
)
1031 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1033 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1034 u64 offset
, u64 size
),
1036 TP_ARGS(info
, map
, offset
, size
)
1039 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1041 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1043 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1044 u64 offset
, u64 size
),
1046 TP_ARGS(root
, map
, offset
, size
),
1049 ctf_integer(int, num_stripes
, map
->num_stripes
)
1050 ctf_integer(u64
, type
, map
->type
)
1051 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1052 ctf_integer(u64
, offset
, offset
)
1053 ctf_integer(u64
, size
, size
)
1054 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1058 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1060 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1061 u64 offset
, u64 size
),
1063 TP_ARGS(root
, map
, offset
, size
)
1066 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1068 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1069 u64 offset
, u64 size
),
1071 TP_ARGS(root
, map
, offset
, size
)
1074 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1076 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1078 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1079 u64 offset
, u64 size
),
1081 TP_ARGS(root
, map
, offset
, size
),
1084 ctf_integer(int, num_stripes
, map
->num_stripes
)
1085 ctf_integer(u64
, type
, map
->type
)
1086 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1087 ctf_integer(u64
, offset
, offset
)
1088 ctf_integer(u64
, size
, size
)
1089 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1093 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1095 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1096 u64 offset
, u64 size
),
1098 TP_ARGS(root
, map
, offset
, size
)
1101 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1103 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1104 u64 offset
, u64 size
),
1106 TP_ARGS(root
, map
, offset
, size
)
1109 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1111 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1112 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1113 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1115 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1116 const struct extent_buffer
*cow
),
1118 TP_ARGS(root
, buf
, cow
),
1121 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1122 ctf_integer(u64
, buf_start
, buf
->start
)
1123 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1124 ctf_integer(u64
, cow_start
, cow
->start
)
1125 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1126 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1130 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1132 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1133 struct extent_buffer
*cow
),
1135 TP_ARGS(root
, buf
, cow
),
1138 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1139 ctf_integer(u64
, buf_start
, buf
->start
)
1140 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1141 ctf_integer(u64
, cow_start
, cow
->start
)
1142 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1143 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1148 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1149 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1150 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1152 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1153 u64 bytes
, int reserve
),
1155 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1158 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1159 ctf_string(type
, type
)
1160 ctf_integer(u64
, val
, val
)
1161 ctf_integer(u64
, bytes
, bytes
)
1162 ctf_integer(int, reserve
, reserve
)
1165 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1166 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1168 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1169 u64 bytes
, int reserve
),
1171 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1174 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1175 ctf_string(type
, type
)
1176 ctf_integer(u64
, val
, val
)
1177 ctf_integer(u64
, bytes
, bytes
)
1178 ctf_integer(int, reserve
, reserve
)
1183 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1185 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1187 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1189 TP_ARGS(info
, start
, len
),
1192 ctf_integer(u64
, start
, start
)
1193 ctf_integer(u64
, len
, len
)
1197 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1199 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1201 TP_ARGS(info
, start
, len
)
1204 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1206 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1208 TP_ARGS(info
, start
, len
)
1211 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1213 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1215 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1217 TP_ARGS(info
, start
, len
),
1220 ctf_integer(u64
, start
, start
)
1221 ctf_integer(u64
, len
, len
)
1225 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1227 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1229 TP_ARGS(info
, start
, len
)
1232 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1234 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1236 TP_ARGS(info
, start
, len
)
1239 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1241 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1243 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1245 TP_ARGS(root
, start
, len
),
1248 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1249 ctf_integer(u64
, start
, start
)
1250 ctf_integer(u64
, len
, len
)
1254 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1256 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1258 TP_ARGS(root
, start
, len
)
1261 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1263 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1265 TP_ARGS(root
, start
, len
)
1268 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1270 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1272 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1274 TP_ARGS(root
, start
, len
),
1277 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1278 ctf_integer(u64
, start
, start
)
1279 ctf_integer(u64
, len
, len
)
1283 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1285 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1287 TP_ARGS(root
, start
, len
)
1290 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1292 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1294 TP_ARGS(root
, start
, len
)
1297 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1299 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1300 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1302 btrfs_find_free_extent
,
1304 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1307 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1310 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1311 ctf_integer(u64
, num_bytes
, num_bytes
)
1312 ctf_integer(u64
, empty_size
, empty_size
)
1313 ctf_integer(u64
, data
, data
)
1317 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1319 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1322 TP_ARGS(block_group
, start
, len
),
1325 ctf_array(u8
, fsid
, block_group
->fs_info
->fsid
, BTRFS_UUID_SIZE
)
1326 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1327 ctf_integer(u64
, flags
, block_group
->flags
)
1328 ctf_integer(u64
, start
, start
)
1329 ctf_integer(u64
, len
, len
)
1333 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1335 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1338 TP_ARGS(block_group
, start
, len
)
1341 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1343 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1346 TP_ARGS(block_group
, start
, len
)
1349 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1350 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1352 btrfs_find_free_extent
,
1354 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1357 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1360 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1361 ctf_integer(u64
, num_bytes
, num_bytes
)
1362 ctf_integer(u64
, empty_size
, empty_size
)
1363 ctf_integer(u64
, data
, data
)
1367 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1369 TP_PROTO(const struct btrfs_fs_info
*info
,
1370 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1373 TP_ARGS(info
, block_group
, start
, len
),
1376 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1377 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1378 ctf_integer(u64
, flags
, block_group
->flags
)
1379 ctf_integer(u64
, start
, start
)
1380 ctf_integer(u64
, len
, len
)
1384 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1386 TP_PROTO(const struct btrfs_fs_info
*info
,
1387 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1390 TP_ARGS(info
, block_group
, start
, len
)
1393 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1395 TP_PROTO(const struct btrfs_fs_info
*info
,
1396 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1399 TP_ARGS(info
, block_group
, start
, len
)
1402 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1404 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1406 btrfs_find_free_extent
,
1408 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1411 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1414 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1415 ctf_integer(u64
, num_bytes
, num_bytes
)
1416 ctf_integer(u64
, empty_size
, empty_size
)
1417 ctf_integer(u64
, data
, data
)
1421 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1423 TP_PROTO(struct btrfs_fs_info
*info
,
1424 struct btrfs_block_group_cache
*block_group
, u64 start
,
1427 TP_ARGS(info
, block_group
, start
, len
),
1430 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1431 ctf_integer(u64
, flags
, block_group
->flags
)
1432 ctf_integer(u64
, start
, start
)
1433 ctf_integer(u64
, len
, len
)
1437 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1439 TP_PROTO(struct btrfs_fs_info
*info
,
1440 struct btrfs_block_group_cache
*block_group
, u64 start
,
1443 TP_ARGS(info
, block_group
, start
, len
)
1446 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1448 TP_PROTO(struct btrfs_fs_info
*info
,
1449 struct btrfs_block_group_cache
*block_group
, u64 start
,
1452 TP_ARGS(info
, block_group
, start
, len
)
1454 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1456 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1458 btrfs_find_free_extent
,
1460 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1463 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1466 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1467 ctf_integer(u64
, num_bytes
, num_bytes
)
1468 ctf_integer(u64
, empty_size
, empty_size
)
1469 ctf_integer(u64
, data
, data
)
1473 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1475 TP_PROTO(const struct btrfs_root
*root
,
1476 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1479 TP_ARGS(root
, block_group
, start
, len
),
1482 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1483 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1484 ctf_integer(u64
, flags
, block_group
->flags
)
1485 ctf_integer(u64
, start
, start
)
1486 ctf_integer(u64
, len
, len
)
1490 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1492 TP_PROTO(const struct btrfs_root
*root
,
1493 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1496 TP_ARGS(root
, block_group
, start
, len
)
1499 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1501 TP_PROTO(const struct btrfs_root
*root
,
1502 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1505 TP_ARGS(root
, block_group
, start
, len
)
1508 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1510 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1512 btrfs_find_free_extent
,
1514 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1517 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1520 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1521 ctf_integer(u64
, num_bytes
, num_bytes
)
1522 ctf_integer(u64
, empty_size
, empty_size
)
1523 ctf_integer(u64
, data
, data
)
1527 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1529 TP_PROTO(struct btrfs_root
*root
,
1530 struct btrfs_block_group_cache
*block_group
, u64 start
,
1533 TP_ARGS(root
, block_group
, start
, len
),
1536 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1537 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1538 ctf_integer(u64
, flags
, block_group
->flags
)
1539 ctf_integer(u64
, start
, start
)
1540 ctf_integer(u64
, len
, len
)
1544 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1546 TP_PROTO(struct btrfs_root
*root
,
1547 struct btrfs_block_group_cache
*block_group
, u64 start
,
1550 TP_ARGS(root
, block_group
, start
, len
)
1553 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1555 TP_PROTO(struct btrfs_root
*root
,
1556 struct btrfs_block_group_cache
*block_group
, u64 start
,
1559 TP_ARGS(root
, block_group
, start
, len
)
1562 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1564 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1565 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1566 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1568 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1569 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1571 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1574 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1575 ctf_integer(u64
, flags
, block_group
->flags
)
1576 ctf_integer(u64
, start
, start
)
1577 ctf_integer(u64
, bytes
, bytes
)
1578 ctf_integer(u64
, empty_size
, empty_size
)
1579 ctf_integer(u64
, min_bytes
, min_bytes
)
1583 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1585 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1587 TP_ARGS(block_group
),
1590 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1594 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1596 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1597 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1599 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1602 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1603 ctf_integer(u64
, flags
, block_group
->flags
)
1604 ctf_integer(u64
, start
, cluster
->window_start
)
1605 ctf_integer(u64
, max_size
, cluster
->max_size
)
1606 ctf_integer(u64
, size
, size
)
1607 ctf_integer(int, bitmap
, bitmap
)
1610 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1611 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1613 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1614 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1616 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1619 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1620 ctf_integer(u64
, flags
, block_group
->flags
)
1621 ctf_integer(u64
, start
, start
)
1622 ctf_integer(u64
, bytes
, bytes
)
1623 ctf_integer(u64
, empty_size
, empty_size
)
1624 ctf_integer(u64
, min_bytes
, min_bytes
)
1628 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1630 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1632 TP_ARGS(block_group
),
1635 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1639 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1641 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1642 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1644 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1647 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1648 ctf_integer(u64
, flags
, block_group
->flags
)
1649 ctf_integer(u64
, start
, cluster
->window_start
)
1650 ctf_integer(u64
, max_size
, cluster
->max_size
)
1651 ctf_integer(u64
, size
, size
)
1652 ctf_integer(int, bitmap
, bitmap
)
1657 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1658 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1659 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1661 btrfs_alloc_extent_state
,
1663 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1665 TP_ARGS(state
, mask
, IP
),
1668 ctf_integer_hex(const struct extent_state
*, state
, state
)
1669 ctf_integer(gfp_t
, mask
, mask
)
1670 ctf_integer(unsigned long, ip
, IP
)
1674 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1676 btrfs_free_extent_state
,
1678 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1683 ctf_integer_hex(const struct extent_state
*, state
, state
)
1684 ctf_integer(unsigned long, ip
, IP
)
1687 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1688 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1690 btrfs_alloc_extent_state
,
1692 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1694 TP_ARGS(state
, mask
, IP
),
1697 ctf_integer_hex(struct extent_state
*, state
, state
)
1698 ctf_integer(gfp_t
, mask
, mask
)
1699 ctf_integer(unsigned long, ip
, IP
)
1703 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1705 btrfs_free_extent_state
,
1707 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
1712 ctf_integer_hex(struct extent_state
*, state
, state
)
1713 ctf_integer(unsigned long, ip
, IP
)
1718 #endif /* LTTNG_TRACE_BTRFS_H */
1720 /* This part must be outside protection */
1721 #include <probes/define_trace.h>