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,18,0))
277 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
279 TP_PROTO(struct btrfs_fs_info
*fs_info
,
280 const struct extent_map
*existing
, const struct extent_map
*map
,
283 TP_ARGS(fs_info
, existing
, map
, start
, len
),
286 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
287 ctf_integer(u64
, e_start
, existing
->start
)
288 ctf_integer(u64
, e_len
, existing
->len
)
289 ctf_integer(u64
, map_start
, map
->start
)
290 ctf_integer(u64
, map_len
, map
->len
)
291 ctf_integer(u64
, start
, start
)
292 ctf_integer(u64
, len
, len
)
295 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
296 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
298 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
300 TP_ARGS(existing
, map
, start
, len
),
303 ctf_integer(u64
, e_start
, existing
->start
)
304 ctf_integer(u64
, e_len
, existing
->len
)
305 ctf_integer(u64
, map_start
, map
->start
)
306 ctf_integer(u64
, map_len
, map
->len
)
307 ctf_integer(u64
, start
, start
)
308 ctf_integer(u64
, len
, len
)
313 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
314 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__file_extent_item_regular
,
316 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
317 struct btrfs_file_extent_item
*fi
, u64 start
),
319 TP_ARGS(bi
, l
, fi
, start
),
322 ctf_array(u8
, fsid
, bi
->root
->fs_info
, BTRFS_FSID_SIZE
)
323 ctf_integer(u64
, root_obj
, bi
->root
->objectid
)
324 ctf_integer(u64
, ino
, btrfs_ino(bi
))
325 ctf_integer(loff_t
, isize
, bi
->vfs_inode
.i_size
)
326 ctf_integer(u64
, disk_isize
, bi
->disk_i_size
)
327 ctf_integer(u64
, num_bytes
, btrfs_file_extent_num_bytes(l
, fi
))
328 ctf_integer(u64
, ram_bytes
, btrfs_file_extent_ram_bytes(l
, fi
))
329 ctf_integer(u64
, disk_bytenr
, btrfs_file_extent_disk_bytenr(l
, fi
))
330 ctf_integer(u64
, disk_num_bytes
, btrfs_file_extent_disk_num_bytes(l
, fi
))
331 ctf_integer(u64
, extent_offset
, btrfs_file_extent_offset(l
, fi
))
332 ctf_integer(u8
, extent_type
, btrfs_file_extent_type(l
, fi
))
333 ctf_integer(u8
, compression
, btrfs_file_extent_compression(l
, fi
))
334 ctf_integer(u64
, extent_start
, start
)
335 ctf_integer(u64
, extent_end
, (start
+ btrfs_file_extent_num_bytes(l
, fi
)))
339 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__file_extent_item_inline
,
341 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
342 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
344 TP_ARGS(bi
, l
, fi
, slot
, start
),
347 ctf_array(u8
, fsid
, bi
->root
->fs_info
, BTRFS_FSID_SIZE
)
348 ctf_integer(u64
, root_obj
, bi
->root
->objectid
)
349 ctf_integer(u64
, ino
, btrfs_ino(bi
))
350 ctf_integer(loff_t
, isize
, bi
->vfs_inode
.i_size
)
351 ctf_integer(u64
, disk_isize
, bi
->disk_i_size
)
352 ctf_integer(u8
, extent_type
, btrfs_file_extent_type(l
, fi
))
353 ctf_integer(u8
, compression
, btrfs_file_extent_compression(l
, fi
))
354 ctf_integer(u64
, extent_start
, start
)
355 ctf_integer(u64
, extent_end
, (start
+ btrfs_file_extent_inline_len(l
, slot
, fi
)))
359 LTTNG_TRACEPOINT_EVENT_INSTANCE(
360 btrfs__file_extent_item_regular
, btrfs_get_extent_show_fi_regular
,
362 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
363 struct btrfs_file_extent_item
*fi
, u64 start
),
365 TP_ARGS(bi
, l
, fi
, start
)
368 LTTNG_TRACEPOINT_EVENT_INSTANCE(
369 btrfs__file_extent_item_regular
, btrfs_truncate_show_fi_regular
,
371 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
372 struct btrfs_file_extent_item
*fi
, u64 start
),
374 TP_ARGS(bi
, l
, fi
, start
)
377 LTTNG_TRACEPOINT_EVENT_INSTANCE(
378 btrfs__file_extent_item_inline
, btrfs_get_extent_show_fi_inline
,
380 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
381 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
383 TP_ARGS(bi
, l
, fi
, slot
, start
)
386 LTTNG_TRACEPOINT_EVENT_INSTANCE(
387 btrfs__file_extent_item_inline
, btrfs_truncate_show_fi_inline
,
389 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
390 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
392 TP_ARGS(bi
, l
, fi
, slot
, start
)
396 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
397 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
399 TP_PROTO(const struct inode
*inode
,
400 const 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
, refcount_read(&ordered
->refs
))
414 ctf_integer(u64
, root_objectid
,
415 BTRFS_I(inode
)->root
->root_key
.objectid
)
418 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
419 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
421 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
423 TP_ARGS(inode
, ordered
),
426 ctf_integer(ino_t
, ino
, inode
->i_ino
)
427 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
428 ctf_integer(u64
, start
, ordered
->start
)
429 ctf_integer(u64
, len
, ordered
->len
)
430 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
431 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
432 ctf_integer(unsigned long, flags
, ordered
->flags
)
433 ctf_integer(int, compress_type
, ordered
->compress_type
)
434 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
435 ctf_integer(u64
, root_objectid
,
436 BTRFS_I(inode
)->root
->root_key
.objectid
)
439 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
440 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
442 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
444 TP_ARGS(inode
, ordered
),
447 ctf_integer(ino_t
, ino
, inode
->i_ino
)
448 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
449 ctf_integer(u64
, start
, ordered
->start
)
450 ctf_integer(u64
, len
, ordered
->len
)
451 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
452 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
453 ctf_integer(unsigned long, flags
, ordered
->flags
)
454 ctf_integer(int, compress_type
, ordered
->compress_type
)
455 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
456 ctf_integer(u64
, root_objectid
,
457 BTRFS_I(inode
)->root
->root_key
.objectid
)
461 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
463 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
465 TP_ARGS(inode
, ordered
),
468 ctf_integer(ino_t
, ino
, inode
->i_ino
)
469 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
470 ctf_integer(u64
, start
, ordered
->start
)
471 ctf_integer(u64
, len
, ordered
->len
)
472 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
473 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
474 ctf_integer(unsigned long, flags
, ordered
->flags
)
475 ctf_integer(int, compress_type
, ordered
->compress_type
)
476 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
477 ctf_integer(u64
, root_objectid
,
478 BTRFS_I(inode
)->root
->root_key
.objectid
)
483 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
484 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
485 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
487 TP_PROTO(const struct inode
*inode
,
488 const struct btrfs_ordered_extent
*ordered
),
490 TP_ARGS(inode
, ordered
)
493 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
495 TP_PROTO(const struct inode
*inode
,
496 const struct btrfs_ordered_extent
*ordered
),
498 TP_ARGS(inode
, ordered
)
501 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
503 TP_PROTO(const struct inode
*inode
,
504 const struct btrfs_ordered_extent
*ordered
),
506 TP_ARGS(inode
, ordered
)
509 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
511 TP_PROTO(const struct inode
*inode
,
512 const struct btrfs_ordered_extent
*ordered
),
514 TP_ARGS(inode
, ordered
)
517 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
519 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
520 const struct writeback_control
*wbc
),
522 TP_ARGS(page
, inode
, wbc
),
525 ctf_integer(ino_t
, ino
, inode
->i_ino
)
526 ctf_integer(pgoff_t
, index
, page
->index
)
527 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
528 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
529 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
530 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
531 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
532 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
533 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
534 ctf_integer(pgoff_t
, writeback_index
,
535 inode
->i_mapping
->writeback_index
)
536 ctf_integer(u64
, root_objectid
,
537 BTRFS_I(inode
)->root
->root_key
.objectid
)
541 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
545 btrfs__extent_writepage
,
547 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
548 const struct writeback_control
*wbc
),
550 TP_ARGS(page
, inode
, wbc
)
553 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
555 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
557 TP_ARGS(page
, start
, end
, uptodate
),
560 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
561 ctf_integer(pgoff_t
, index
, page
->index
)
562 ctf_integer(u64
, start
, start
)
563 ctf_integer(u64
, end
, end
)
564 ctf_integer(int, uptodate
, uptodate
)
565 ctf_integer(u64
, root_objectid
,
566 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
570 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
572 TP_PROTO(const struct file
*file
, int datasync
),
574 TP_ARGS(file
, datasync
),
577 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
578 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
579 ctf_integer(int, datasync
, datasync
)
580 ctf_integer(u64
, root_objectid
,
581 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
585 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
587 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
589 TP_ARGS(inode
, ordered
)
592 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
594 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
596 TP_ARGS(inode
, ordered
)
599 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
601 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
603 TP_ARGS(inode
, ordered
)
606 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
608 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
610 TP_ARGS(inode
, ordered
)
613 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
615 TP_PROTO(struct page
*page
, struct inode
*inode
,
616 struct writeback_control
*wbc
),
618 TP_ARGS(page
, inode
, wbc
),
621 ctf_integer(ino_t
, ino
, inode
->i_ino
)
622 ctf_integer(pgoff_t
, index
, page
->index
)
623 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
624 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
625 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
626 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
627 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
628 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
630 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
631 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
632 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
633 ctf_integer(pgoff_t
, writeback_index
,
634 inode
->i_mapping
->writeback_index
)
635 ctf_integer(u64
, root_objectid
,
636 BTRFS_I(inode
)->root
->root_key
.objectid
)
640 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
644 btrfs__extent_writepage
,
646 TP_PROTO(struct page
*page
, struct inode
*inode
,
647 struct writeback_control
*wbc
),
649 TP_ARGS(page
, inode
, wbc
)
652 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
654 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
656 TP_ARGS(page
, start
, end
, uptodate
),
659 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
660 ctf_integer(pgoff_t
, index
, page
->index
)
661 ctf_integer(u64
, start
, start
)
662 ctf_integer(u64
, end
, end
)
663 ctf_integer(int, uptodate
, uptodate
)
664 ctf_integer(u64
, root_objectid
,
665 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
669 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
671 TP_PROTO(struct file
*file
, int datasync
),
673 TP_ARGS(file
, datasync
),
676 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
677 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
678 ctf_integer(int, datasync
, datasync
)
679 ctf_integer(u64
, root_objectid
,
680 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
685 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
686 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
687 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
689 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
691 TP_ARGS(fs_info
, wait
),
694 ctf_integer(int, wait
, wait
)
697 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
698 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
700 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
702 TP_ARGS(fs_info
, wait
),
705 ctf_integer(int, wait
, wait
)
709 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
716 ctf_integer(int, wait
, wait
)
721 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
722 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
723 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
725 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
726 const struct btrfs_block_group_cache
*block_group
, int create
),
728 TP_ARGS(fs_info
, block_group
, create
),
731 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
732 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
733 ctf_integer(u64
, size
, block_group
->key
.offset
)
734 ctf_integer(u64
, flags
, block_group
->flags
)
735 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
736 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
737 ctf_integer(int, create
, create
)
741 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
743 TP_PROTO(struct btrfs_fs_info
*fs_info
,
744 struct btrfs_block_group_cache
*block_group
, int create
),
746 TP_ARGS(fs_info
, block_group
, create
),
749 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
750 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
751 ctf_integer(u64
, size
, block_group
->key
.offset
)
752 ctf_integer(u64
, flags
, block_group
->flags
)
753 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
754 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
755 ctf_integer(int, create
, create
)
760 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
761 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_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 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
772 ctf_integer(u64
, bytenr
, ref
->bytenr
)
773 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
774 ctf_integer(int, action
, action
)
775 ctf_integer(u64
, parent
, full_ref
->parent
)
776 ctf_integer(u64
, ref_root
, full_ref
->root
)
777 ctf_integer(int, level
, full_ref
->level
)
778 ctf_integer(int, type
, ref
->type
)
779 ctf_integer(u64
, seq
, ref
->seq
)
783 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
785 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
786 const struct btrfs_delayed_ref_node
*ref
,
787 const struct btrfs_delayed_tree_ref
*full_ref
,
790 TP_ARGS(fs_info
, ref
, full_ref
, action
)
793 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
795 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
796 const struct btrfs_delayed_ref_node
*ref
,
797 const struct btrfs_delayed_tree_ref
*full_ref
,
800 TP_ARGS(fs_info
, ref
, full_ref
, action
)
802 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
803 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
805 TP_PROTO(struct btrfs_fs_info
*fs_info
,
806 struct btrfs_delayed_ref_node
*ref
,
807 struct btrfs_delayed_tree_ref
*full_ref
,
810 TP_ARGS(fs_info
, ref
, full_ref
, action
),
813 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
814 ctf_integer(u64
, bytenr
, ref
->bytenr
)
815 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
816 ctf_integer(int, action
, action
)
817 ctf_integer(u64
, parent
, full_ref
->parent
)
818 ctf_integer(u64
, ref_root
, full_ref
->root
)
819 ctf_integer(int, level
, full_ref
->level
)
820 ctf_integer(int, type
, ref
->type
)
821 ctf_integer(u64
, seq
, ref
->seq
)
825 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_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
)
835 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
837 TP_PROTO(struct btrfs_fs_info
*fs_info
,
838 struct btrfs_delayed_ref_node
*ref
,
839 struct btrfs_delayed_tree_ref
*full_ref
,
842 TP_ARGS(fs_info
, ref
, full_ref
, action
)
844 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
845 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
847 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
848 struct btrfs_delayed_tree_ref
*full_ref
,
851 TP_ARGS(ref
, full_ref
, action
),
854 ctf_integer(u64
, bytenr
, ref
->bytenr
)
855 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
856 ctf_integer(int, action
, action
)
857 ctf_integer(u64
, parent
, full_ref
->parent
)
858 ctf_integer(u64
, ref_root
, full_ref
->root
)
859 ctf_integer(int, level
, full_ref
->level
)
860 ctf_integer(int, type
, ref
->type
)
861 ctf_integer(u64
, seq
, ref
->seq
)
865 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
867 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
868 struct btrfs_delayed_tree_ref
*full_ref
,
871 TP_ARGS(ref
, full_ref
, action
)
874 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
876 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
877 struct btrfs_delayed_tree_ref
*full_ref
,
880 TP_ARGS(ref
, full_ref
, action
)
882 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
883 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
885 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
886 struct btrfs_delayed_tree_ref
*full_ref
,
889 TP_ARGS(ref
, full_ref
, action
),
892 ctf_integer(u64
, bytenr
, ref
->bytenr
)
893 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
894 ctf_integer(int, action
, action
)
895 ctf_integer(u64
, parent
, full_ref
->parent
)
896 ctf_integer(u64
, ref_root
, full_ref
->root
)
897 ctf_integer(int, level
, full_ref
->level
)
898 ctf_integer(int, type
, ref
->type
)
899 ctf_integer(u64
, seq
, ref
->seq
)
903 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
905 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
906 struct btrfs_delayed_tree_ref
*full_ref
,
909 TP_ARGS(ref
, full_ref
, action
),
912 ctf_integer(u64
, bytenr
, ref
->bytenr
)
913 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
914 ctf_integer(int, action
, action
)
915 ctf_integer(u64
, parent
, full_ref
->parent
)
916 ctf_integer(u64
, ref_root
, full_ref
->root
)
917 ctf_integer(int, level
, full_ref
->level
)
918 ctf_integer(int, type
, ref
->type
)
923 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
924 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
926 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
927 const struct btrfs_delayed_ref_node
*ref
,
928 const struct btrfs_delayed_data_ref
*full_ref
,
931 TP_ARGS(fs_info
, ref
, full_ref
, action
),
934 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
935 ctf_integer(u64
, bytenr
, ref
->bytenr
)
936 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
937 ctf_integer(int, action
, action
)
938 ctf_integer(u64
, parent
, full_ref
->parent
)
939 ctf_integer(u64
, ref_root
, full_ref
->root
)
940 ctf_integer(u64
, owner
, full_ref
->objectid
)
941 ctf_integer(u64
, offset
, full_ref
->offset
)
942 ctf_integer(int, type
, ref
->type
)
943 ctf_integer(u64
, seq
, ref
->seq
)
947 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
949 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
950 const struct btrfs_delayed_ref_node
*ref
,
951 const struct btrfs_delayed_data_ref
*full_ref
,
954 TP_ARGS(fs_info
, ref
, full_ref
, action
)
957 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
959 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
960 const struct btrfs_delayed_ref_node
*ref
,
961 const struct btrfs_delayed_data_ref
*full_ref
,
964 TP_ARGS(fs_info
, ref
, full_ref
, action
)
966 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
967 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
969 TP_PROTO(struct btrfs_fs_info
*fs_info
,
970 struct btrfs_delayed_ref_node
*ref
,
971 struct btrfs_delayed_data_ref
*full_ref
,
974 TP_ARGS(fs_info
, ref
, full_ref
, action
),
977 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
978 ctf_integer(u64
, bytenr
, ref
->bytenr
)
979 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
980 ctf_integer(int, action
, action
)
981 ctf_integer(u64
, parent
, full_ref
->parent
)
982 ctf_integer(u64
, ref_root
, full_ref
->root
)
983 ctf_integer(u64
, owner
, full_ref
->objectid
)
984 ctf_integer(u64
, offset
, full_ref
->offset
)
985 ctf_integer(int, type
, ref
->type
)
986 ctf_integer(u64
, seq
, ref
->seq
)
990 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
992 TP_PROTO(struct btrfs_fs_info
*fs_info
,
993 struct btrfs_delayed_ref_node
*ref
,
994 struct btrfs_delayed_data_ref
*full_ref
,
997 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1000 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
1002 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1003 struct btrfs_delayed_ref_node
*ref
,
1004 struct btrfs_delayed_data_ref
*full_ref
,
1007 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1009 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1010 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1012 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1013 struct btrfs_delayed_data_ref
*full_ref
,
1016 TP_ARGS(ref
, full_ref
, action
),
1019 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1020 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1021 ctf_integer(int, action
, action
)
1022 ctf_integer(u64
, parent
, full_ref
->parent
)
1023 ctf_integer(u64
, ref_root
, full_ref
->root
)
1024 ctf_integer(u64
, owner
, full_ref
->objectid
)
1025 ctf_integer(u64
, offset
, full_ref
->offset
)
1026 ctf_integer(int, type
, ref
->type
)
1027 ctf_integer(u64
, seq
, ref
->seq
)
1031 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
1033 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1034 struct btrfs_delayed_data_ref
*full_ref
,
1037 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1040 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
1042 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1043 struct btrfs_delayed_data_ref
*full_ref
,
1046 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1048 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1049 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1051 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1052 struct btrfs_delayed_data_ref
*full_ref
,
1055 TP_ARGS(ref
, full_ref
, action
),
1058 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1059 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1060 ctf_integer(int, action
, action
)
1061 ctf_integer(u64
, parent
, full_ref
->parent
)
1062 ctf_integer(u64
, ref_root
, full_ref
->root
)
1063 ctf_integer(u64
, owner
, full_ref
->objectid
)
1064 ctf_integer(u64
, offset
, full_ref
->offset
)
1065 ctf_integer(int, type
, ref
->type
)
1066 ctf_integer(u64
, seq
, ref
->seq
)
1070 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1072 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1073 struct btrfs_delayed_data_ref
*full_ref
,
1076 TP_ARGS(ref
, full_ref
, action
),
1079 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1080 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1081 ctf_integer(int, action
, action
)
1082 ctf_integer(u64
, parent
, full_ref
->parent
)
1083 ctf_integer(u64
, ref_root
, full_ref
->root
)
1084 ctf_integer(u64
, owner
, full_ref
->objectid
)
1085 ctf_integer(u64
, offset
, full_ref
->offset
)
1086 ctf_integer(int, type
, ref
->type
)
1091 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1092 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1094 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1095 const struct btrfs_delayed_ref_head
*head_ref
,
1098 TP_ARGS(fs_info
, head_ref
, action
),
1101 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1102 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1103 ctf_integer(int, action
, action
)
1104 ctf_integer(int, is_data
, head_ref
->is_data
)
1108 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1110 add_delayed_ref_head
,
1112 btrfs_add_delayed_ref_head
,
1114 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1115 const struct btrfs_delayed_ref_head
*head_ref
,
1118 TP_ARGS(fs_info
, head_ref
, action
)
1121 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1123 run_delayed_ref_head
,
1125 btrfs_run_delayed_ref_head
,
1127 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1128 const struct btrfs_delayed_ref_head
*head_ref
,
1131 TP_ARGS(fs_info
, head_ref
, action
)
1134 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1135 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
1136 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1138 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1139 const struct btrfs_delayed_ref_node
*ref
,
1140 const struct btrfs_delayed_ref_head
*head_ref
,
1143 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1146 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1147 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1148 ctf_integer(int, action
, action
)
1149 ctf_integer(int, is_data
, head_ref
->is_data
)
1153 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1155 add_delayed_ref_head
,
1157 btrfs_add_delayed_ref_head
,
1159 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1160 const struct btrfs_delayed_ref_node
*ref
,
1161 const struct btrfs_delayed_ref_head
*head_ref
,
1164 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1167 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1169 run_delayed_ref_head
,
1171 btrfs_run_delayed_ref_head
,
1173 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1174 const struct btrfs_delayed_ref_node
*ref
,
1175 const struct btrfs_delayed_ref_head
*head_ref
,
1178 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1181 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1182 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1184 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1185 struct btrfs_delayed_ref_node
*ref
,
1186 struct btrfs_delayed_ref_head
*head_ref
,
1189 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1192 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1193 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1194 ctf_integer(int, action
, action
)
1195 ctf_integer(int, is_data
, head_ref
->is_data
)
1199 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1201 add_delayed_ref_head
,
1203 btrfs_add_delayed_ref_head
,
1205 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1206 struct btrfs_delayed_ref_node
*ref
,
1207 struct btrfs_delayed_ref_head
*head_ref
,
1210 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1213 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1215 run_delayed_ref_head
,
1217 btrfs_run_delayed_ref_head
,
1219 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1220 struct btrfs_delayed_ref_node
*ref
,
1221 struct btrfs_delayed_ref_head
*head_ref
,
1224 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1227 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
1228 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1230 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1231 const struct btrfs_delayed_ref_head
*head_ref
,
1234 TP_ARGS(ref
, head_ref
, action
),
1237 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1238 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1239 ctf_integer(int, action
, action
)
1240 ctf_integer(int, is_data
, head_ref
->is_data
)
1244 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1246 add_delayed_ref_head
,
1248 btrfs_add_delayed_ref_head
,
1250 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1251 const struct btrfs_delayed_ref_head
*head_ref
,
1254 TP_ARGS(ref
, head_ref
, action
)
1257 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1259 run_delayed_ref_head
,
1261 btrfs_run_delayed_ref_head
,
1263 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1264 const struct btrfs_delayed_ref_head
*head_ref
,
1267 TP_ARGS(ref
, head_ref
, action
)
1270 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1271 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1273 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1274 struct btrfs_delayed_ref_head
*head_ref
,
1277 TP_ARGS(ref
, head_ref
, action
),
1280 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1281 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1282 ctf_integer(int, action
, action
)
1283 ctf_integer(int, is_data
, head_ref
->is_data
)
1287 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1289 add_delayed_ref_head
,
1291 btrfs_add_delayed_ref_head
,
1293 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1294 struct btrfs_delayed_ref_head
*head_ref
,
1297 TP_ARGS(ref
, head_ref
, action
)
1300 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1302 run_delayed_ref_head
,
1304 btrfs_run_delayed_ref_head
,
1306 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1307 struct btrfs_delayed_ref_head
*head_ref
,
1310 TP_ARGS(ref
, head_ref
, action
)
1314 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1316 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1317 struct btrfs_delayed_ref_head
*head_ref
,
1320 TP_ARGS(ref
, head_ref
, action
),
1323 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1324 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1325 ctf_integer(int, action
, action
)
1326 ctf_integer(int, is_data
, head_ref
->is_data
)
1331 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1333 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1335 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1336 u64 offset
, u64 size
),
1338 TP_ARGS(fs_info
, map
, offset
, size
),
1341 ctf_integer(int, num_stripes
, map
->num_stripes
)
1342 ctf_integer(u64
, type
, map
->type
)
1343 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1344 ctf_integer(u64
, offset
, offset
)
1345 ctf_integer(u64
, size
, size
)
1346 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1350 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1352 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1353 u64 offset
, u64 size
),
1355 TP_ARGS(info
, map
, offset
, size
)
1358 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1360 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1361 u64 offset
, u64 size
),
1363 TP_ARGS(info
, map
, offset
, size
)
1366 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1368 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1370 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1371 u64 offset
, u64 size
),
1373 TP_ARGS(fs_info
, map
, offset
, size
),
1376 ctf_integer(int, num_stripes
, map
->num_stripes
)
1377 ctf_integer(u64
, type
, map
->type
)
1378 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1379 ctf_integer(u64
, offset
, offset
)
1380 ctf_integer(u64
, size
, size
)
1381 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1385 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1387 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1388 u64 offset
, u64 size
),
1390 TP_ARGS(info
, map
, offset
, size
)
1393 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1395 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1396 u64 offset
, u64 size
),
1398 TP_ARGS(info
, map
, offset
, size
)
1401 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1403 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1405 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1406 u64 offset
, u64 size
),
1408 TP_ARGS(root
, map
, offset
, size
),
1411 ctf_integer(int, num_stripes
, map
->num_stripes
)
1412 ctf_integer(u64
, type
, map
->type
)
1413 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1414 ctf_integer(u64
, offset
, offset
)
1415 ctf_integer(u64
, size
, size
)
1416 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1420 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1422 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1423 u64 offset
, u64 size
),
1425 TP_ARGS(root
, map
, offset
, size
)
1428 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1430 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1431 u64 offset
, u64 size
),
1433 TP_ARGS(root
, map
, offset
, size
)
1436 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1438 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1440 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1441 u64 offset
, u64 size
),
1443 TP_ARGS(root
, map
, offset
, size
),
1446 ctf_integer(int, num_stripes
, map
->num_stripes
)
1447 ctf_integer(u64
, type
, map
->type
)
1448 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1449 ctf_integer(u64
, offset
, offset
)
1450 ctf_integer(u64
, size
, size
)
1451 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1455 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1457 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1458 u64 offset
, u64 size
),
1460 TP_ARGS(root
, map
, offset
, size
)
1463 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1465 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1466 u64 offset
, u64 size
),
1468 TP_ARGS(root
, map
, offset
, size
)
1471 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1473 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1474 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1475 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1477 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1478 const struct extent_buffer
*cow
),
1480 TP_ARGS(root
, buf
, cow
),
1483 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1484 ctf_integer(u64
, buf_start
, buf
->start
)
1485 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1486 ctf_integer(u64
, cow_start
, cow
->start
)
1487 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1488 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1492 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1494 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1495 struct extent_buffer
*cow
),
1497 TP_ARGS(root
, buf
, cow
),
1500 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1501 ctf_integer(u64
, buf_start
, buf
->start
)
1502 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1503 ctf_integer(u64
, cow_start
, cow
->start
)
1504 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1505 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1510 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1511 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1512 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1514 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1515 u64 bytes
, int reserve
),
1517 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1520 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1521 ctf_string(type
, type
)
1522 ctf_integer(u64
, val
, val
)
1523 ctf_integer(u64
, bytes
, bytes
)
1524 ctf_integer(int, reserve
, reserve
)
1527 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1528 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1530 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1531 u64 bytes
, int reserve
),
1533 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1536 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1537 ctf_string(type
, type
)
1538 ctf_integer(u64
, val
, val
)
1539 ctf_integer(u64
, bytes
, bytes
)
1540 ctf_integer(int, reserve
, reserve
)
1545 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1547 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1549 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1551 TP_ARGS(info
, start
, len
),
1554 ctf_integer(u64
, start
, start
)
1555 ctf_integer(u64
, len
, len
)
1559 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1561 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1563 TP_ARGS(info
, start
, len
)
1566 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1568 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1570 TP_ARGS(info
, start
, len
)
1573 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1575 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1577 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1579 TP_ARGS(info
, start
, len
),
1582 ctf_integer(u64
, start
, start
)
1583 ctf_integer(u64
, len
, len
)
1587 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1589 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1591 TP_ARGS(info
, start
, len
)
1594 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1596 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1598 TP_ARGS(info
, start
, len
)
1601 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1603 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1605 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1607 TP_ARGS(root
, start
, len
),
1610 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1611 ctf_integer(u64
, start
, start
)
1612 ctf_integer(u64
, len
, len
)
1616 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1618 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1620 TP_ARGS(root
, start
, len
)
1623 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1625 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1627 TP_ARGS(root
, start
, len
)
1630 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1632 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1634 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1636 TP_ARGS(root
, start
, len
),
1639 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1640 ctf_integer(u64
, start
, start
)
1641 ctf_integer(u64
, len
, len
)
1645 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1647 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1649 TP_ARGS(root
, start
, len
)
1652 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1654 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1656 TP_ARGS(root
, start
, len
)
1659 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1661 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1662 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1664 btrfs_find_free_extent
,
1666 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1669 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1672 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1673 ctf_integer(u64
, num_bytes
, num_bytes
)
1674 ctf_integer(u64
, empty_size
, empty_size
)
1675 ctf_integer(u64
, data
, data
)
1679 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1681 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1684 TP_ARGS(block_group
, start
, len
),
1687 ctf_array(u8
, fsid
, block_group
->fs_info
->fsid
, BTRFS_UUID_SIZE
)
1688 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1689 ctf_integer(u64
, flags
, block_group
->flags
)
1690 ctf_integer(u64
, start
, start
)
1691 ctf_integer(u64
, len
, len
)
1695 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1697 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1700 TP_ARGS(block_group
, start
, len
)
1703 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1705 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1708 TP_ARGS(block_group
, start
, len
)
1711 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1712 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1714 btrfs_find_free_extent
,
1716 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1719 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1722 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1723 ctf_integer(u64
, num_bytes
, num_bytes
)
1724 ctf_integer(u64
, empty_size
, empty_size
)
1725 ctf_integer(u64
, data
, data
)
1729 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1731 TP_PROTO(const struct btrfs_fs_info
*info
,
1732 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1735 TP_ARGS(info
, block_group
, start
, len
),
1738 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1739 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1740 ctf_integer(u64
, flags
, block_group
->flags
)
1741 ctf_integer(u64
, start
, start
)
1742 ctf_integer(u64
, len
, len
)
1746 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1748 TP_PROTO(const struct btrfs_fs_info
*info
,
1749 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1752 TP_ARGS(info
, block_group
, start
, len
)
1755 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1757 TP_PROTO(const struct btrfs_fs_info
*info
,
1758 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1761 TP_ARGS(info
, block_group
, start
, len
)
1764 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1766 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1768 btrfs_find_free_extent
,
1770 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1773 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1776 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1777 ctf_integer(u64
, num_bytes
, num_bytes
)
1778 ctf_integer(u64
, empty_size
, empty_size
)
1779 ctf_integer(u64
, data
, data
)
1783 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1785 TP_PROTO(struct btrfs_fs_info
*info
,
1786 struct btrfs_block_group_cache
*block_group
, u64 start
,
1789 TP_ARGS(info
, block_group
, start
, len
),
1792 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1793 ctf_integer(u64
, flags
, block_group
->flags
)
1794 ctf_integer(u64
, start
, start
)
1795 ctf_integer(u64
, len
, len
)
1799 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1801 TP_PROTO(struct btrfs_fs_info
*info
,
1802 struct btrfs_block_group_cache
*block_group
, u64 start
,
1805 TP_ARGS(info
, block_group
, start
, len
)
1808 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1810 TP_PROTO(struct btrfs_fs_info
*info
,
1811 struct btrfs_block_group_cache
*block_group
, u64 start
,
1814 TP_ARGS(info
, block_group
, start
, len
)
1816 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1818 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1820 btrfs_find_free_extent
,
1822 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1825 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1828 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1829 ctf_integer(u64
, num_bytes
, num_bytes
)
1830 ctf_integer(u64
, empty_size
, empty_size
)
1831 ctf_integer(u64
, data
, data
)
1835 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1837 TP_PROTO(const struct btrfs_root
*root
,
1838 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1841 TP_ARGS(root
, block_group
, start
, len
),
1844 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1845 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1846 ctf_integer(u64
, flags
, block_group
->flags
)
1847 ctf_integer(u64
, start
, start
)
1848 ctf_integer(u64
, len
, len
)
1852 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1854 TP_PROTO(const struct btrfs_root
*root
,
1855 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1858 TP_ARGS(root
, block_group
, start
, len
)
1861 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1863 TP_PROTO(const struct btrfs_root
*root
,
1864 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1867 TP_ARGS(root
, block_group
, start
, len
)
1870 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1872 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1874 btrfs_find_free_extent
,
1876 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1879 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1882 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1883 ctf_integer(u64
, num_bytes
, num_bytes
)
1884 ctf_integer(u64
, empty_size
, empty_size
)
1885 ctf_integer(u64
, data
, data
)
1889 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1891 TP_PROTO(struct btrfs_root
*root
,
1892 struct btrfs_block_group_cache
*block_group
, u64 start
,
1895 TP_ARGS(root
, block_group
, start
, len
),
1898 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1899 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1900 ctf_integer(u64
, flags
, block_group
->flags
)
1901 ctf_integer(u64
, start
, start
)
1902 ctf_integer(u64
, len
, len
)
1906 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1908 TP_PROTO(struct btrfs_root
*root
,
1909 struct btrfs_block_group_cache
*block_group
, u64 start
,
1912 TP_ARGS(root
, block_group
, start
, len
)
1915 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1917 TP_PROTO(struct btrfs_root
*root
,
1918 struct btrfs_block_group_cache
*block_group
, u64 start
,
1921 TP_ARGS(root
, block_group
, start
, len
)
1924 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1926 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1927 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1928 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1930 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1931 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1933 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1936 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1937 ctf_integer(u64
, flags
, block_group
->flags
)
1938 ctf_integer(u64
, start
, start
)
1939 ctf_integer(u64
, bytes
, bytes
)
1940 ctf_integer(u64
, empty_size
, empty_size
)
1941 ctf_integer(u64
, min_bytes
, min_bytes
)
1945 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1947 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1949 TP_ARGS(block_group
),
1952 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1956 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1958 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1959 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1961 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1964 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1965 ctf_integer(u64
, flags
, block_group
->flags
)
1966 ctf_integer(u64
, start
, cluster
->window_start
)
1967 ctf_integer(u64
, max_size
, cluster
->max_size
)
1968 ctf_integer(u64
, size
, size
)
1969 ctf_integer(int, bitmap
, bitmap
)
1972 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1973 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1975 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1976 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1978 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1981 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1982 ctf_integer(u64
, flags
, block_group
->flags
)
1983 ctf_integer(u64
, start
, start
)
1984 ctf_integer(u64
, bytes
, bytes
)
1985 ctf_integer(u64
, empty_size
, empty_size
)
1986 ctf_integer(u64
, min_bytes
, min_bytes
)
1990 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1992 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1994 TP_ARGS(block_group
),
1997 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2001 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2003 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2004 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2006 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2009 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2010 ctf_integer(u64
, flags
, block_group
->flags
)
2011 ctf_integer(u64
, start
, cluster
->window_start
)
2012 ctf_integer(u64
, max_size
, cluster
->max_size
)
2013 ctf_integer(u64
, size
, size
)
2014 ctf_integer(int, bitmap
, bitmap
)
2019 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2020 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2021 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2023 btrfs_alloc_extent_state
,
2025 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2027 TP_ARGS(state
, mask
, IP
),
2030 ctf_integer_hex(const struct extent_state
*, state
, state
)
2031 ctf_integer(gfp_t
, mask
, mask
)
2032 ctf_integer(unsigned long, ip
, IP
)
2036 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2038 btrfs_free_extent_state
,
2040 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2045 ctf_integer_hex(const struct extent_state
*, state
, state
)
2046 ctf_integer(unsigned long, ip
, IP
)
2049 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
2050 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2052 btrfs_alloc_extent_state
,
2054 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2056 TP_ARGS(state
, mask
, IP
),
2059 ctf_integer_hex(struct extent_state
*, state
, state
)
2060 ctf_integer(gfp_t
, mask
, mask
)
2061 ctf_integer(unsigned long, ip
, IP
)
2065 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2067 btrfs_free_extent_state
,
2069 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2074 ctf_integer_hex(struct extent_state
*, state
, state
)
2075 ctf_integer(unsigned long, ip
, IP
)
2080 #endif /* LTTNG_TRACE_BTRFS_H */
2082 /* This part must be outside protection */
2083 #include <probes/define_trace.h>