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(5,5,0))
24 struct btrfs_block_group
;
25 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
26 struct btrfs_block_group_cache
;
28 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
29 struct btrfs_free_cluster
;
33 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
38 #define BTRFS_UUID_SIZE 16
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
41 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
43 #define lttng_fs_info_fsid fs_info->fsid
46 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
47 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
48 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
49 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
50 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
51 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
53 TP_PROTO(const struct btrfs_root
*root
),
58 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
59 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
63 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
65 TP_PROTO(const struct inode
*inode
),
70 ctf_integer(ino_t
, ino
, inode
->i_ino
)
71 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
72 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
73 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
74 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
75 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
76 ctf_integer(u64
, root_objectid
,
77 BTRFS_I(inode
)->root
->root_key
.objectid
)
81 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
83 TP_PROTO(const struct inode
*inode
),
88 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
90 TP_PROTO(const struct inode
*inode
),
95 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
97 TP_PROTO(const struct inode
*inode
),
102 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
104 TP_PROTO(struct btrfs_root
*root
),
109 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
110 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
114 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
116 TP_PROTO(struct inode
*inode
),
121 ctf_integer(ino_t
, ino
, inode
->i_ino
)
122 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
123 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
124 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
125 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
126 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
127 ctf_integer(u64
, root_objectid
,
128 BTRFS_I(inode
)->root
->root_key
.objectid
)
132 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
134 TP_PROTO(struct inode
*inode
),
139 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
141 TP_PROTO(struct inode
*inode
),
146 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
148 TP_PROTO(struct inode
*inode
),
154 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
156 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
158 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
159 const struct extent_map
*map
),
161 TP_ARGS(root
, inode
, map
),
164 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
165 ctf_integer(u64
, ino
, btrfs_ino(inode
))
166 ctf_integer(u64
, start
, map
->start
)
167 ctf_integer(u64
, len
, map
->len
)
168 ctf_integer(u64
, orig_start
, map
->orig_start
)
169 ctf_integer(u64
, block_start
, map
->block_start
)
170 ctf_integer(u64
, block_len
, map
->block_len
)
171 ctf_integer(unsigned long, flags
, map
->flags
)
172 ctf_integer(int, refs
, refcount_read(&map
->refs
))
173 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
177 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
179 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
181 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
182 struct extent_map
*map
),
184 TP_ARGS(root
, inode
, map
),
187 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
188 ctf_integer(u64
, ino
, btrfs_ino(inode
))
189 ctf_integer(u64
, start
, map
->start
)
190 ctf_integer(u64
, len
, map
->len
)
191 ctf_integer(u64
, orig_start
, map
->orig_start
)
192 ctf_integer(u64
, block_start
, map
->block_start
)
193 ctf_integer(u64
, block_len
, map
->block_len
)
194 ctf_integer(unsigned long, flags
, map
->flags
)
195 ctf_integer(int, refs
, refcount_read(&map
->refs
))
196 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
200 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
202 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
204 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
205 struct extent_map
*map
),
207 TP_ARGS(root
, inode
, map
),
210 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
211 ctf_integer(u64
, ino
, btrfs_ino(inode
))
212 ctf_integer(u64
, start
, map
->start
)
213 ctf_integer(u64
, len
, map
->len
)
214 ctf_integer(u64
, orig_start
, map
->orig_start
)
215 ctf_integer(u64
, block_start
, map
->block_start
)
216 ctf_integer(u64
, block_len
, map
->block_len
)
217 ctf_integer(unsigned long, flags
, map
->flags
)
218 ctf_integer(int, refs
, atomic_read(&map
->refs
))
219 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
223 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
225 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
227 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
228 struct extent_map
*map
),
230 TP_ARGS(root
, inode
, map
),
233 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
234 ctf_integer(u64
, ino
, btrfs_ino(inode
))
235 ctf_integer(u64
, start
, map
->start
)
236 ctf_integer(u64
, len
, map
->len
)
237 ctf_integer(u64
, orig_start
, map
->orig_start
)
238 ctf_integer(u64
, block_start
, map
->block_start
)
239 ctf_integer(u64
, block_len
, map
->block_len
)
240 ctf_integer(unsigned long, flags
, map
->flags
)
241 ctf_integer(int, refs
, atomic_read(&map
->refs
))
242 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
246 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
247 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
248 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
249 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
251 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
253 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
258 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
259 ctf_integer(u64
, start
, map
->start
)
260 ctf_integer(u64
, len
, map
->len
)
261 ctf_integer(u64
, orig_start
, map
->orig_start
)
262 ctf_integer(u64
, block_start
, map
->block_start
)
263 ctf_integer(u64
, block_len
, map
->block_len
)
264 ctf_integer(unsigned long, flags
, map
->flags
)
265 ctf_integer(int, refs
, atomic_read(&map
->refs
))
266 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
270 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
272 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
274 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
279 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
280 ctf_integer(u64
, start
, map
->start
)
281 ctf_integer(u64
, len
, map
->len
)
282 ctf_integer(u64
, orig_start
, map
->orig_start
)
283 ctf_integer(u64
, block_start
, map
->block_start
)
284 ctf_integer(u64
, block_len
, map
->block_len
)
285 ctf_integer(unsigned long, flags
, map
->flags
)
286 ctf_integer(int, refs
, atomic_read(&map
->refs
))
287 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
291 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
293 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
294 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
296 TP_PROTO(struct btrfs_fs_info
*fs_info
,
297 const struct extent_map
*existing
, const struct extent_map
*map
,
300 TP_ARGS(fs_info
, existing
, map
, start
, len
),
303 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
304 ctf_integer(u64
, e_start
, existing
->start
)
305 ctf_integer(u64
, e_len
, existing
->len
)
306 ctf_integer(u64
, map_start
, map
->start
)
307 ctf_integer(u64
, map_len
, map
->len
)
308 ctf_integer(u64
, start
, start
)
309 ctf_integer(u64
, len
, len
)
312 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
313 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
315 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
317 TP_ARGS(existing
, map
, start
, len
),
320 ctf_integer(u64
, e_start
, existing
->start
)
321 ctf_integer(u64
, e_len
, existing
->len
)
322 ctf_integer(u64
, map_start
, map
->start
)
323 ctf_integer(u64
, map_len
, map
->len
)
324 ctf_integer(u64
, start
, start
)
325 ctf_integer(u64
, len
, len
)
330 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
331 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
333 TP_PROTO(const struct inode
*inode
,
334 const struct btrfs_ordered_extent
*ordered
),
336 TP_ARGS(inode
, ordered
),
339 ctf_integer(ino_t
, ino
, inode
->i_ino
)
340 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
341 ctf_integer(u64
, start
, ordered
->start
)
342 ctf_integer(u64
, len
, ordered
->len
)
343 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
344 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
345 ctf_integer(unsigned long, flags
, ordered
->flags
)
346 ctf_integer(int, compress_type
, ordered
->compress_type
)
347 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
348 ctf_integer(u64
, root_objectid
,
349 BTRFS_I(inode
)->root
->root_key
.objectid
)
352 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
353 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
355 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
357 TP_ARGS(inode
, ordered
),
360 ctf_integer(ino_t
, ino
, inode
->i_ino
)
361 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
362 ctf_integer(u64
, start
, ordered
->start
)
363 ctf_integer(u64
, len
, ordered
->len
)
364 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
365 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
366 ctf_integer(unsigned long, flags
, ordered
->flags
)
367 ctf_integer(int, compress_type
, ordered
->compress_type
)
368 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
369 ctf_integer(u64
, root_objectid
,
370 BTRFS_I(inode
)->root
->root_key
.objectid
)
373 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
374 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
375 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
376 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
377 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
379 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
381 TP_ARGS(inode
, ordered
),
384 ctf_integer(ino_t
, ino
, inode
->i_ino
)
385 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
386 ctf_integer(u64
, start
, ordered
->start
)
387 ctf_integer(u64
, len
, ordered
->len
)
388 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
389 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
390 ctf_integer(unsigned long, flags
, ordered
->flags
)
391 ctf_integer(int, compress_type
, ordered
->compress_type
)
392 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
393 ctf_integer(u64
, root_objectid
,
394 BTRFS_I(inode
)->root
->root_key
.objectid
)
398 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
400 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
402 TP_ARGS(inode
, ordered
),
405 ctf_integer(ino_t
, ino
, inode
->i_ino
)
406 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
407 ctf_integer(u64
, start
, ordered
->start
)
408 ctf_integer(u64
, len
, ordered
->len
)
409 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
410 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
411 ctf_integer(unsigned long, flags
, ordered
->flags
)
412 ctf_integer(int, compress_type
, ordered
->compress_type
)
413 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
414 ctf_integer(u64
, root_objectid
,
415 BTRFS_I(inode
)->root
->root_key
.objectid
)
420 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
421 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
422 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
423 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
424 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
425 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
427 TP_PROTO(const struct inode
*inode
,
428 const struct btrfs_ordered_extent
*ordered
),
430 TP_ARGS(inode
, ordered
)
433 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
435 TP_PROTO(const struct inode
*inode
,
436 const struct btrfs_ordered_extent
*ordered
),
438 TP_ARGS(inode
, ordered
)
441 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
443 TP_PROTO(const struct inode
*inode
,
444 const struct btrfs_ordered_extent
*ordered
),
446 TP_ARGS(inode
, ordered
)
449 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
451 TP_PROTO(const struct inode
*inode
,
452 const struct btrfs_ordered_extent
*ordered
),
454 TP_ARGS(inode
, ordered
)
457 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
459 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
460 const struct writeback_control
*wbc
),
462 TP_ARGS(page
, inode
, wbc
),
465 ctf_integer(ino_t
, ino
, inode
->i_ino
)
466 ctf_integer(pgoff_t
, index
, page
->index
)
467 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
468 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
469 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
470 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
471 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
472 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
473 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
474 ctf_integer(pgoff_t
, writeback_index
,
475 inode
->i_mapping
->writeback_index
)
476 ctf_integer(u64
, root_objectid
,
477 BTRFS_I(inode
)->root
->root_key
.objectid
)
481 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
485 btrfs__extent_writepage
,
487 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
488 const struct writeback_control
*wbc
),
490 TP_ARGS(page
, inode
, wbc
)
493 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
495 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
497 TP_ARGS(page
, start
, end
, uptodate
),
500 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
501 ctf_integer(pgoff_t
, index
, page
->index
)
502 ctf_integer(u64
, start
, start
)
503 ctf_integer(u64
, end
, end
)
504 ctf_integer(int, uptodate
, uptodate
)
505 ctf_integer(u64
, root_objectid
,
506 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
510 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
512 TP_PROTO(const struct file
*file
, int datasync
),
514 TP_ARGS(file
, datasync
),
517 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
518 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
519 ctf_integer(int, datasync
, datasync
)
520 ctf_integer(u64
, root_objectid
,
521 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
525 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
527 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
529 TP_ARGS(inode
, ordered
)
532 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
534 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
536 TP_ARGS(inode
, ordered
)
539 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
541 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
543 TP_ARGS(inode
, ordered
)
546 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
548 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
550 TP_ARGS(inode
, ordered
)
553 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
555 TP_PROTO(struct page
*page
, struct inode
*inode
,
556 struct writeback_control
*wbc
),
558 TP_ARGS(page
, inode
, wbc
),
561 ctf_integer(ino_t
, ino
, inode
->i_ino
)
562 ctf_integer(pgoff_t
, index
, page
->index
)
563 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
564 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
565 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
566 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
567 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
568 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
570 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
571 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
572 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
573 ctf_integer(pgoff_t
, writeback_index
,
574 inode
->i_mapping
->writeback_index
)
575 ctf_integer(u64
, root_objectid
,
576 BTRFS_I(inode
)->root
->root_key
.objectid
)
580 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
584 btrfs__extent_writepage
,
586 TP_PROTO(struct page
*page
, struct inode
*inode
,
587 struct writeback_control
*wbc
),
589 TP_ARGS(page
, inode
, wbc
)
592 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
594 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
596 TP_ARGS(page
, start
, end
, uptodate
),
599 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
600 ctf_integer(pgoff_t
, index
, page
->index
)
601 ctf_integer(u64
, start
, start
)
602 ctf_integer(u64
, end
, end
)
603 ctf_integer(int, uptodate
, uptodate
)
604 ctf_integer(u64
, root_objectid
,
605 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
609 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
611 TP_PROTO(struct file
*file
, int datasync
),
613 TP_ARGS(file
, datasync
),
616 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
617 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
618 ctf_integer(int, datasync
, datasync
)
619 ctf_integer(u64
, root_objectid
,
620 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
625 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
626 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
627 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
628 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
629 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
630 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
631 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
632 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
633 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
635 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
637 TP_ARGS(fs_info
, wait
),
640 ctf_integer(int, wait
, wait
)
643 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
644 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
646 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
648 TP_ARGS(fs_info
, wait
),
651 ctf_integer(int, wait
, wait
)
655 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
662 ctf_integer(int, wait
, wait
)
667 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,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
*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
->start
)
678 ctf_integer(u64
, size
, block_group
->length
)
679 ctf_integer(u64
, flags
, block_group
->flags
)
680 ctf_integer(u64
, bytes_used
, block_group
->used
)
681 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
682 ctf_integer(int, create
, create
)
685 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
686 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
687 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
688 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
689 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
690 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
692 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
693 const struct btrfs_block_group_cache
*block_group
, int create
),
695 TP_ARGS(fs_info
, block_group
, create
),
698 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
699 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
700 ctf_integer(u64
, size
, block_group
->key
.offset
)
701 ctf_integer(u64
, flags
, block_group
->flags
)
702 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
703 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
704 ctf_integer(int, create
, create
)
708 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
710 TP_PROTO(struct btrfs_fs_info
*fs_info
,
711 struct btrfs_block_group_cache
*block_group
, int create
),
713 TP_ARGS(fs_info
, block_group
, create
),
716 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
717 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
718 ctf_integer(u64
, size
, block_group
->key
.offset
)
719 ctf_integer(u64
, flags
, block_group
->flags
)
720 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
721 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
722 ctf_integer(int, create
, create
)
727 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
728 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
729 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
730 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
731 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
732 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
733 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
734 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
735 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
737 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
738 const struct btrfs_delayed_ref_node
*ref
,
739 const struct btrfs_delayed_tree_ref
*full_ref
,
742 TP_ARGS(fs_info
, ref
, full_ref
, action
),
745 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
746 ctf_integer(u64
, bytenr
, ref
->bytenr
)
747 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
748 ctf_integer(int, action
, action
)
749 ctf_integer(u64
, parent
, full_ref
->parent
)
750 ctf_integer(u64
, ref_root
, full_ref
->root
)
751 ctf_integer(int, level
, full_ref
->level
)
752 ctf_integer(int, type
, ref
->type
)
753 ctf_integer(u64
, seq
, ref
->seq
)
757 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
759 add_delayed_tree_ref
,
761 btrfs_add_delayed_tree_ref
,
763 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
764 const struct btrfs_delayed_ref_node
*ref
,
765 const struct btrfs_delayed_tree_ref
*full_ref
,
768 TP_ARGS(fs_info
, ref
, full_ref
, action
)
771 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
773 run_delayed_tree_ref
,
775 btrfs_run_delayed_tree_ref
,
777 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
778 const struct btrfs_delayed_ref_node
*ref
,
779 const struct btrfs_delayed_tree_ref
*full_ref
,
782 TP_ARGS(fs_info
, ref
, full_ref
, action
)
784 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
785 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
787 TP_PROTO(struct btrfs_fs_info
*fs_info
,
788 struct btrfs_delayed_ref_node
*ref
,
789 struct btrfs_delayed_tree_ref
*full_ref
,
792 TP_ARGS(fs_info
, ref
, full_ref
, action
),
795 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
796 ctf_integer(u64
, bytenr
, ref
->bytenr
)
797 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
798 ctf_integer(int, action
, action
)
799 ctf_integer(u64
, parent
, full_ref
->parent
)
800 ctf_integer(u64
, ref_root
, full_ref
->root
)
801 ctf_integer(int, level
, full_ref
->level
)
802 ctf_integer(int, type
, ref
->type
)
803 ctf_integer(u64
, seq
, ref
->seq
)
807 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
809 add_delayed_tree_ref
,
811 btrfs_add_delayed_tree_ref
,
813 TP_PROTO(struct btrfs_fs_info
*fs_info
,
814 struct btrfs_delayed_ref_node
*ref
,
815 struct btrfs_delayed_tree_ref
*full_ref
,
818 TP_ARGS(fs_info
, ref
, full_ref
, action
)
821 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
823 run_delayed_tree_ref
,
825 btrfs_run_delayed_tree_ref
,
827 TP_PROTO(struct btrfs_fs_info
*fs_info
,
828 struct btrfs_delayed_ref_node
*ref
,
829 struct btrfs_delayed_tree_ref
*full_ref
,
832 TP_ARGS(fs_info
, ref
, full_ref
, action
)
834 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
835 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
837 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
838 const struct btrfs_delayed_tree_ref
*full_ref
,
841 TP_ARGS(ref
, full_ref
, action
),
844 ctf_integer(u64
, bytenr
, ref
->bytenr
)
845 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
846 ctf_integer(int, action
, action
)
847 ctf_integer(u64
, parent
, full_ref
->parent
)
848 ctf_integer(u64
, ref_root
, full_ref
->root
)
849 ctf_integer(int, level
, full_ref
->level
)
850 ctf_integer(int, type
, ref
->type
)
851 ctf_integer(u64
, seq
, ref
->seq
)
855 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
857 add_delayed_tree_ref
,
859 btrfs_add_delayed_tree_ref
,
861 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
862 const struct btrfs_delayed_tree_ref
*full_ref
,
865 TP_ARGS(ref
, full_ref
, action
)
868 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
870 run_delayed_tree_ref
,
872 btrfs_run_delayed_tree_ref
,
874 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
875 const struct btrfs_delayed_tree_ref
*full_ref
,
878 TP_ARGS(ref
, full_ref
, action
)
880 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
881 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
883 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
884 struct btrfs_delayed_tree_ref
*full_ref
,
887 TP_ARGS(ref
, full_ref
, action
),
890 ctf_integer(u64
, bytenr
, ref
->bytenr
)
891 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
892 ctf_integer(int, action
, action
)
893 ctf_integer(u64
, parent
, full_ref
->parent
)
894 ctf_integer(u64
, ref_root
, full_ref
->root
)
895 ctf_integer(int, level
, full_ref
->level
)
896 ctf_integer(int, type
, ref
->type
)
897 ctf_integer(u64
, seq
, ref
->seq
)
901 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
903 add_delayed_tree_ref
,
905 btrfs_add_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 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
916 run_delayed_tree_ref
,
918 btrfs_run_delayed_tree_ref
,
920 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
921 struct btrfs_delayed_tree_ref
*full_ref
,
924 TP_ARGS(ref
, full_ref
, action
)
926 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
927 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
929 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
930 struct btrfs_delayed_tree_ref
*full_ref
,
933 TP_ARGS(ref
, full_ref
, action
),
936 ctf_integer(u64
, bytenr
, ref
->bytenr
)
937 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
938 ctf_integer(int, action
, action
)
939 ctf_integer(u64
, parent
, full_ref
->parent
)
940 ctf_integer(u64
, ref_root
, full_ref
->root
)
941 ctf_integer(int, level
, full_ref
->level
)
942 ctf_integer(int, type
, ref
->type
)
943 ctf_integer(u64
, seq
, ref
->seq
)
947 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
949 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
950 struct btrfs_delayed_tree_ref
*full_ref
,
953 TP_ARGS(ref
, full_ref
, action
),
956 ctf_integer(u64
, bytenr
, ref
->bytenr
)
957 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
958 ctf_integer(int, action
, action
)
959 ctf_integer(u64
, parent
, full_ref
->parent
)
960 ctf_integer(u64
, ref_root
, full_ref
->root
)
961 ctf_integer(int, level
, full_ref
->level
)
962 ctf_integer(int, type
, ref
->type
)
967 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
968 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
969 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
970 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
971 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
972 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
973 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
974 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
975 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
977 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
978 const struct btrfs_delayed_ref_node
*ref
,
979 const struct btrfs_delayed_data_ref
*full_ref
,
982 TP_ARGS(fs_info
, ref
, full_ref
, action
),
985 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
986 ctf_integer(u64
, bytenr
, ref
->bytenr
)
987 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
988 ctf_integer(int, action
, action
)
989 ctf_integer(u64
, parent
, full_ref
->parent
)
990 ctf_integer(u64
, ref_root
, full_ref
->root
)
991 ctf_integer(u64
, owner
, full_ref
->objectid
)
992 ctf_integer(u64
, offset
, full_ref
->offset
)
993 ctf_integer(int, type
, ref
->type
)
994 ctf_integer(u64
, seq
, ref
->seq
)
998 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1000 add_delayed_data_ref
,
1002 btrfs_add_delayed_data_ref
,
1004 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1005 const struct btrfs_delayed_ref_node
*ref
,
1006 const struct btrfs_delayed_data_ref
*full_ref
,
1009 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1012 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1014 run_delayed_data_ref
,
1016 btrfs_run_delayed_data_ref
,
1018 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1019 const struct btrfs_delayed_ref_node
*ref
,
1020 const struct btrfs_delayed_data_ref
*full_ref
,
1023 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1025 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1026 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1028 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1029 struct btrfs_delayed_ref_node
*ref
,
1030 struct btrfs_delayed_data_ref
*full_ref
,
1033 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1036 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1037 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1038 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1039 ctf_integer(int, action
, action
)
1040 ctf_integer(u64
, parent
, full_ref
->parent
)
1041 ctf_integer(u64
, ref_root
, full_ref
->root
)
1042 ctf_integer(u64
, owner
, full_ref
->objectid
)
1043 ctf_integer(u64
, offset
, full_ref
->offset
)
1044 ctf_integer(int, type
, ref
->type
)
1045 ctf_integer(u64
, seq
, ref
->seq
)
1049 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1051 add_delayed_data_ref
,
1053 btrfs_add_delayed_data_ref
,
1055 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1056 struct btrfs_delayed_ref_node
*ref
,
1057 struct btrfs_delayed_data_ref
*full_ref
,
1060 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1063 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1065 run_delayed_data_ref
,
1067 btrfs_run_delayed_data_ref
,
1069 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1070 struct btrfs_delayed_ref_node
*ref
,
1071 struct btrfs_delayed_data_ref
*full_ref
,
1074 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1076 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1077 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1079 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1080 const struct btrfs_delayed_data_ref
*full_ref
,
1083 TP_ARGS(ref
, full_ref
, action
),
1086 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1087 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1088 ctf_integer(int, action
, action
)
1089 ctf_integer(u64
, parent
, full_ref
->parent
)
1090 ctf_integer(u64
, ref_root
, full_ref
->root
)
1091 ctf_integer(u64
, owner
, full_ref
->objectid
)
1092 ctf_integer(u64
, offset
, full_ref
->offset
)
1093 ctf_integer(int, type
, ref
->type
)
1094 ctf_integer(u64
, seq
, ref
->seq
)
1098 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1100 add_delayed_data_ref
,
1102 btrfs_add_delayed_data_ref
,
1104 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1105 const struct btrfs_delayed_data_ref
*full_ref
,
1108 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1111 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1113 run_delayed_data_ref
,
1115 btrfs_run_delayed_data_ref
,
1117 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1118 const struct btrfs_delayed_data_ref
*full_ref
,
1121 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1123 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1124 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1126 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1127 struct btrfs_delayed_data_ref
*full_ref
,
1130 TP_ARGS(ref
, full_ref
, action
),
1133 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1134 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1135 ctf_integer(int, action
, action
)
1136 ctf_integer(u64
, parent
, full_ref
->parent
)
1137 ctf_integer(u64
, ref_root
, full_ref
->root
)
1138 ctf_integer(u64
, owner
, full_ref
->objectid
)
1139 ctf_integer(u64
, offset
, full_ref
->offset
)
1140 ctf_integer(int, type
, ref
->type
)
1141 ctf_integer(u64
, seq
, ref
->seq
)
1145 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1147 add_delayed_data_ref
,
1149 btrfs_add_delayed_data_ref
,
1151 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1152 struct btrfs_delayed_data_ref
*full_ref
,
1155 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1158 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1160 run_delayed_data_ref
,
1162 btrfs_run_delayed_data_ref
,
1164 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1165 struct btrfs_delayed_data_ref
*full_ref
,
1168 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1170 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1171 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1173 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1174 struct btrfs_delayed_data_ref
*full_ref
,
1177 TP_ARGS(ref
, full_ref
, action
),
1180 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1181 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1182 ctf_integer(int, action
, action
)
1183 ctf_integer(u64
, parent
, full_ref
->parent
)
1184 ctf_integer(u64
, ref_root
, full_ref
->root
)
1185 ctf_integer(u64
, owner
, full_ref
->objectid
)
1186 ctf_integer(u64
, offset
, full_ref
->offset
)
1187 ctf_integer(int, type
, ref
->type
)
1188 ctf_integer(u64
, seq
, ref
->seq
)
1192 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1194 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1195 struct btrfs_delayed_data_ref
*full_ref
,
1198 TP_ARGS(ref
, full_ref
, action
),
1201 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1202 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1203 ctf_integer(int, action
, action
)
1204 ctf_integer(u64
, parent
, full_ref
->parent
)
1205 ctf_integer(u64
, ref_root
, full_ref
->root
)
1206 ctf_integer(u64
, owner
, full_ref
->objectid
)
1207 ctf_integer(u64
, offset
, full_ref
->offset
)
1208 ctf_integer(int, type
, ref
->type
)
1213 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1214 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1216 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1217 const struct btrfs_delayed_ref_head
*head_ref
,
1220 TP_ARGS(fs_info
, head_ref
, action
),
1223 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1224 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1225 ctf_integer(int, action
, action
)
1226 ctf_integer(int, is_data
, head_ref
->is_data
)
1230 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1232 add_delayed_ref_head
,
1234 btrfs_add_delayed_ref_head
,
1236 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1237 const struct btrfs_delayed_ref_head
*head_ref
,
1240 TP_ARGS(fs_info
, head_ref
, action
)
1243 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1245 run_delayed_ref_head
,
1247 btrfs_run_delayed_ref_head
,
1249 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1250 const struct btrfs_delayed_ref_head
*head_ref
,
1253 TP_ARGS(fs_info
, head_ref
, action
)
1256 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1257 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1258 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1259 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1260 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1261 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1262 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1263 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1265 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1267 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1268 const struct btrfs_delayed_ref_node
*ref
,
1269 const struct btrfs_delayed_ref_head
*head_ref
,
1272 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1275 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1276 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1277 ctf_integer(int, action
, action
)
1278 ctf_integer(int, is_data
, head_ref
->is_data
)
1282 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1284 add_delayed_ref_head
,
1286 btrfs_add_delayed_ref_head
,
1288 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1289 const struct btrfs_delayed_ref_node
*ref
,
1290 const struct btrfs_delayed_ref_head
*head_ref
,
1293 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1296 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1298 run_delayed_ref_head
,
1300 btrfs_run_delayed_ref_head
,
1302 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1303 const struct btrfs_delayed_ref_node
*ref
,
1304 const struct btrfs_delayed_ref_head
*head_ref
,
1307 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1310 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1311 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1313 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1314 struct btrfs_delayed_ref_node
*ref
,
1315 struct btrfs_delayed_ref_head
*head_ref
,
1318 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1321 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1322 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1323 ctf_integer(int, action
, action
)
1324 ctf_integer(int, is_data
, head_ref
->is_data
)
1328 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1330 add_delayed_ref_head
,
1332 btrfs_add_delayed_ref_head
,
1334 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1335 struct btrfs_delayed_ref_node
*ref
,
1336 struct btrfs_delayed_ref_head
*head_ref
,
1339 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1342 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1344 run_delayed_ref_head
,
1346 btrfs_run_delayed_ref_head
,
1348 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1349 struct btrfs_delayed_ref_node
*ref
,
1350 struct btrfs_delayed_ref_head
*head_ref
,
1353 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1356 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1357 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1359 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1360 const struct btrfs_delayed_ref_head
*head_ref
,
1363 TP_ARGS(ref
, head_ref
, action
),
1366 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1367 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1368 ctf_integer(int, action
, action
)
1369 ctf_integer(int, is_data
, head_ref
->is_data
)
1373 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1375 add_delayed_ref_head
,
1377 btrfs_add_delayed_ref_head
,
1379 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1380 const struct btrfs_delayed_ref_head
*head_ref
,
1383 TP_ARGS(ref
, head_ref
, action
)
1386 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1388 run_delayed_ref_head
,
1390 btrfs_run_delayed_ref_head
,
1392 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1393 const struct btrfs_delayed_ref_head
*head_ref
,
1396 TP_ARGS(ref
, head_ref
, action
)
1399 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1400 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1402 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1403 struct btrfs_delayed_ref_head
*head_ref
,
1406 TP_ARGS(ref
, head_ref
, action
),
1409 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1410 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1411 ctf_integer(int, action
, action
)
1412 ctf_integer(int, is_data
, head_ref
->is_data
)
1416 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1418 add_delayed_ref_head
,
1420 btrfs_add_delayed_ref_head
,
1422 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1423 struct btrfs_delayed_ref_head
*head_ref
,
1426 TP_ARGS(ref
, head_ref
, action
)
1429 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1431 run_delayed_ref_head
,
1433 btrfs_run_delayed_ref_head
,
1435 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1436 struct btrfs_delayed_ref_head
*head_ref
,
1439 TP_ARGS(ref
, head_ref
, action
)
1443 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1445 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1446 struct btrfs_delayed_ref_head
*head_ref
,
1449 TP_ARGS(ref
, head_ref
, action
),
1452 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1453 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1454 ctf_integer(int, action
, action
)
1455 ctf_integer(int, is_data
, head_ref
->is_data
)
1460 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1462 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1464 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1465 u64 offset
, u64 size
),
1467 TP_ARGS(fs_info
, map
, offset
, size
),
1470 ctf_integer(int, num_stripes
, map
->num_stripes
)
1471 ctf_integer(u64
, type
, map
->type
)
1472 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1473 ctf_integer(u64
, offset
, offset
)
1474 ctf_integer(u64
, size
, size
)
1475 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1479 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1481 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1482 u64 offset
, u64 size
),
1484 TP_ARGS(fs_info
, map
, offset
, size
)
1487 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1489 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1490 u64 offset
, u64 size
),
1492 TP_ARGS(fs_info
, map
, offset
, size
)
1495 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1497 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1499 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1500 u64 offset
, u64 size
),
1502 TP_ARGS(fs_info
, map
, offset
, size
),
1505 ctf_integer(int, num_stripes
, map
->num_stripes
)
1506 ctf_integer(u64
, type
, map
->type
)
1507 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1508 ctf_integer(u64
, offset
, offset
)
1509 ctf_integer(u64
, size
, size
)
1510 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1514 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1516 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1517 u64 offset
, u64 size
),
1519 TP_ARGS(fs_info
, map
, offset
, size
)
1522 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1524 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1525 u64 offset
, u64 size
),
1527 TP_ARGS(fs_info
, map
, offset
, size
)
1530 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1531 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1532 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1533 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1535 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1537 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1538 u64 offset
, u64 size
),
1540 TP_ARGS(root
, map
, offset
, size
),
1543 ctf_integer(int, num_stripes
, map
->num_stripes
)
1544 ctf_integer(u64
, type
, map
->type
)
1545 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1546 ctf_integer(u64
, offset
, offset
)
1547 ctf_integer(u64
, size
, size
)
1548 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1552 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1554 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1555 u64 offset
, u64 size
),
1557 TP_ARGS(root
, map
, offset
, size
)
1560 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1562 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1563 u64 offset
, u64 size
),
1565 TP_ARGS(root
, map
, offset
, size
)
1568 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1570 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1572 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1573 u64 offset
, u64 size
),
1575 TP_ARGS(root
, map
, offset
, size
),
1578 ctf_integer(int, num_stripes
, map
->num_stripes
)
1579 ctf_integer(u64
, type
, map
->type
)
1580 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1581 ctf_integer(u64
, offset
, offset
)
1582 ctf_integer(u64
, size
, size
)
1583 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1587 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1589 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1590 u64 offset
, u64 size
),
1592 TP_ARGS(root
, map
, offset
, size
)
1595 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1597 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1598 u64 offset
, u64 size
),
1600 TP_ARGS(root
, map
, offset
, size
)
1603 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1605 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1606 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1607 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1608 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1609 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1610 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1612 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1613 const struct extent_buffer
*cow
),
1615 TP_ARGS(root
, buf
, cow
),
1618 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1619 ctf_integer(u64
, buf_start
, buf
->start
)
1620 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1621 ctf_integer(u64
, cow_start
, cow
->start
)
1622 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1623 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1627 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1629 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1630 struct extent_buffer
*cow
),
1632 TP_ARGS(root
, buf
, cow
),
1635 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1636 ctf_integer(u64
, buf_start
, buf
->start
)
1637 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1638 ctf_integer(u64
, cow_start
, cow
->start
)
1639 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1640 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1645 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1646 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1647 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1648 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1649 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1650 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1652 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1653 u64 bytes
, int reserve
),
1655 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1658 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1659 ctf_string(type
, type
)
1660 ctf_integer(u64
, val
, val
)
1661 ctf_integer(u64
, bytes
, bytes
)
1662 ctf_integer(int, reserve
, reserve
)
1665 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1666 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1668 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1669 u64 bytes
, int reserve
),
1671 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1674 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1675 ctf_string(type
, type
)
1676 ctf_integer(u64
, val
, val
)
1677 ctf_integer(u64
, bytes
, bytes
)
1678 ctf_integer(int, reserve
, reserve
)
1683 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1685 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1687 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1689 TP_ARGS(fs_info
, start
, len
),
1692 ctf_integer(u64
, start
, start
)
1693 ctf_integer(u64
, len
, len
)
1697 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1699 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1701 TP_ARGS(fs_info
, start
, len
)
1704 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1706 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1708 TP_ARGS(fs_info
, start
, len
)
1711 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1713 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1715 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1717 TP_ARGS(fs_info
, start
, len
),
1720 ctf_integer(u64
, start
, start
)
1721 ctf_integer(u64
, len
, len
)
1725 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1727 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1729 TP_ARGS(fs_info
, start
, len
)
1732 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1734 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1736 TP_ARGS(fs_info
, start
, len
)
1739 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1740 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1741 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1742 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1744 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1746 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1748 TP_ARGS(root
, start
, len
),
1751 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1752 ctf_integer(u64
, start
, start
)
1753 ctf_integer(u64
, len
, len
)
1757 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1759 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1761 TP_ARGS(root
, start
, len
)
1764 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1766 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1768 TP_ARGS(root
, start
, len
)
1771 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1773 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1775 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1777 TP_ARGS(root
, start
, len
),
1780 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1781 ctf_integer(u64
, start
, start
)
1782 ctf_integer(u64
, len
, len
)
1786 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1788 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1790 TP_ARGS(root
, start
, len
)
1793 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1795 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1797 TP_ARGS(root
, start
, len
)
1800 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1802 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1803 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1805 btrfs_find_free_extent
,
1807 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1810 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1813 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1814 ctf_integer(u64
, num_bytes
, num_bytes
)
1815 ctf_integer(u64
, empty_size
, empty_size
)
1816 ctf_integer(u64
, data
, data
)
1820 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1822 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1825 TP_ARGS(block_group
, start
, len
),
1828 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1829 ctf_integer(u64
, bg_objectid
, block_group
->start
)
1830 ctf_integer(u64
, flags
, block_group
->flags
)
1831 ctf_integer(u64
, start
, start
)
1832 ctf_integer(u64
, len
, len
)
1836 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1838 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1841 TP_ARGS(block_group
, start
, len
)
1844 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1846 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1849 TP_ARGS(block_group
, start
, len
)
1852 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1853 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1855 btrfs_find_free_extent
,
1857 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1860 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1863 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1864 ctf_integer(u64
, num_bytes
, num_bytes
)
1865 ctf_integer(u64
, empty_size
, empty_size
)
1866 ctf_integer(u64
, data
, data
)
1870 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1872 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1875 TP_ARGS(block_group
, start
, len
),
1878 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1879 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1880 ctf_integer(u64
, flags
, block_group
->flags
)
1881 ctf_integer(u64
, start
, start
)
1882 ctf_integer(u64
, len
, len
)
1886 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1888 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1891 TP_ARGS(block_group
, start
, len
)
1894 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1896 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1899 TP_ARGS(block_group
, start
, len
)
1902 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1903 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1905 btrfs_find_free_extent
,
1907 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1910 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1913 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1914 ctf_integer(u64
, num_bytes
, num_bytes
)
1915 ctf_integer(u64
, empty_size
, empty_size
)
1916 ctf_integer(u64
, data
, data
)
1920 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1922 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1923 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1926 TP_ARGS(fs_info
, block_group
, start
, len
),
1929 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1930 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1931 ctf_integer(u64
, flags
, block_group
->flags
)
1932 ctf_integer(u64
, start
, start
)
1933 ctf_integer(u64
, len
, len
)
1937 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1939 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1940 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1943 TP_ARGS(fs_info
, block_group
, start
, len
)
1946 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1948 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1949 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1952 TP_ARGS(fs_info
, block_group
, start
, len
)
1955 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1957 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1959 btrfs_find_free_extent
,
1961 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1964 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1967 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1968 ctf_integer(u64
, num_bytes
, num_bytes
)
1969 ctf_integer(u64
, empty_size
, empty_size
)
1970 ctf_integer(u64
, data
, data
)
1974 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1976 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1977 struct btrfs_block_group_cache
*block_group
, u64 start
,
1980 TP_ARGS(fs_info
, block_group
, start
, len
),
1983 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1984 ctf_integer(u64
, flags
, block_group
->flags
)
1985 ctf_integer(u64
, start
, start
)
1986 ctf_integer(u64
, len
, len
)
1990 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1992 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1993 struct btrfs_block_group_cache
*block_group
, u64 start
,
1996 TP_ARGS(fs_info
, block_group
, start
, len
)
1999 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2001 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2002 struct btrfs_block_group_cache
*block_group
, u64 start
,
2005 TP_ARGS(fs_info
, block_group
, start
, len
)
2007 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2008 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2009 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2010 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2012 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2014 btrfs_find_free_extent
,
2016 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2019 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2022 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2023 ctf_integer(u64
, num_bytes
, num_bytes
)
2024 ctf_integer(u64
, empty_size
, empty_size
)
2025 ctf_integer(u64
, data
, data
)
2029 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2031 TP_PROTO(const struct btrfs_root
*root
,
2032 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2035 TP_ARGS(root
, block_group
, start
, len
),
2038 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2039 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2040 ctf_integer(u64
, flags
, block_group
->flags
)
2041 ctf_integer(u64
, start
, start
)
2042 ctf_integer(u64
, len
, len
)
2046 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2048 TP_PROTO(const struct btrfs_root
*root
,
2049 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2052 TP_ARGS(root
, block_group
, start
, len
)
2055 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2057 TP_PROTO(const struct btrfs_root
*root
,
2058 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2061 TP_ARGS(root
, block_group
, start
, len
)
2064 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2066 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
2068 btrfs_find_free_extent
,
2070 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
2073 TP_ARGS(root
, num_bytes
, empty_size
, data
),
2076 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2077 ctf_integer(u64
, num_bytes
, num_bytes
)
2078 ctf_integer(u64
, empty_size
, empty_size
)
2079 ctf_integer(u64
, data
, data
)
2083 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2085 TP_PROTO(struct btrfs_root
*root
,
2086 struct btrfs_block_group_cache
*block_group
, u64 start
,
2089 TP_ARGS(root
, block_group
, start
, len
),
2092 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2093 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2094 ctf_integer(u64
, flags
, block_group
->flags
)
2095 ctf_integer(u64
, start
, start
)
2096 ctf_integer(u64
, len
, len
)
2100 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2102 TP_PROTO(struct btrfs_root
*root
,
2103 struct btrfs_block_group_cache
*block_group
, u64 start
,
2106 TP_ARGS(root
, block_group
, start
, len
)
2109 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2111 TP_PROTO(struct btrfs_root
*root
,
2112 struct btrfs_block_group_cache
*block_group
, u64 start
,
2115 TP_ARGS(root
, block_group
, start
, len
)
2118 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
2120 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
2121 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2123 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2124 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2126 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2129 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2130 ctf_integer(u64
, flags
, block_group
->flags
)
2131 ctf_integer(u64
, start
, start
)
2132 ctf_integer(u64
, bytes
, bytes
)
2133 ctf_integer(u64
, empty_size
, empty_size
)
2134 ctf_integer(u64
, min_bytes
, min_bytes
)
2138 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2140 TP_PROTO(const struct btrfs_block_group
*block_group
),
2142 TP_ARGS(block_group
),
2145 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2149 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2151 TP_PROTO(const struct btrfs_block_group
*block_group
,
2152 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2154 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2157 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2158 ctf_integer(u64
, flags
, block_group
->flags
)
2159 ctf_integer(u64
, start
, cluster
->window_start
)
2160 ctf_integer(u64
, max_size
, cluster
->max_size
)
2161 ctf_integer(u64
, size
, size
)
2162 ctf_integer(int, bitmap
, bitmap
)
2165 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2166 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2167 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2168 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2169 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2170 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2172 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2173 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2175 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2178 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2179 ctf_integer(u64
, flags
, block_group
->flags
)
2180 ctf_integer(u64
, start
, start
)
2181 ctf_integer(u64
, bytes
, bytes
)
2182 ctf_integer(u64
, empty_size
, empty_size
)
2183 ctf_integer(u64
, min_bytes
, min_bytes
)
2187 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2189 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2191 TP_ARGS(block_group
),
2194 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2198 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2200 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2201 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2203 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2206 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2207 ctf_integer(u64
, flags
, block_group
->flags
)
2208 ctf_integer(u64
, start
, cluster
->window_start
)
2209 ctf_integer(u64
, max_size
, cluster
->max_size
)
2210 ctf_integer(u64
, size
, size
)
2211 ctf_integer(int, bitmap
, bitmap
)
2214 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2215 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2217 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2218 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2220 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2223 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2224 ctf_integer(u64
, flags
, block_group
->flags
)
2225 ctf_integer(u64
, start
, start
)
2226 ctf_integer(u64
, bytes
, bytes
)
2227 ctf_integer(u64
, empty_size
, empty_size
)
2228 ctf_integer(u64
, min_bytes
, min_bytes
)
2232 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2234 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2236 TP_ARGS(block_group
),
2239 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2243 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2245 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2246 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2248 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2251 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2252 ctf_integer(u64
, flags
, block_group
->flags
)
2253 ctf_integer(u64
, start
, cluster
->window_start
)
2254 ctf_integer(u64
, max_size
, cluster
->max_size
)
2255 ctf_integer(u64
, size
, size
)
2256 ctf_integer(int, bitmap
, bitmap
)
2261 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2262 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2263 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2264 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2265 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2266 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2268 btrfs_alloc_extent_state
,
2270 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2272 TP_ARGS(state
, mask
, IP
),
2275 ctf_integer_hex(const struct extent_state
*, state
, state
)
2276 ctf_integer(gfp_t
, mask
, mask
)
2277 ctf_integer(unsigned long, ip
, IP
)
2281 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2283 btrfs_free_extent_state
,
2285 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2290 ctf_integer_hex(const struct extent_state
*, state
, state
)
2291 ctf_integer(unsigned long, ip
, IP
)
2294 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
2295 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2297 btrfs_alloc_extent_state
,
2299 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2301 TP_ARGS(state
, mask
, IP
),
2304 ctf_integer_hex(struct extent_state
*, state
, state
)
2305 ctf_integer(gfp_t
, mask
, mask
)
2306 ctf_integer(unsigned long, ip
, IP
)
2310 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2312 btrfs_free_extent_state
,
2314 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2319 ctf_integer_hex(struct extent_state
*, state
, state
)
2320 ctf_integer(unsigned long, ip
, IP
)
2325 #endif /* LTTNG_TRACE_BTRFS_H */
2327 /* This part must be outside protection */
2328 #include <probes/define_trace.h>