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,14,0))
314 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
316 TP_PROTO(const struct inode
*inode
,
317 const struct btrfs_ordered_extent
*ordered
),
319 TP_ARGS(inode
, ordered
),
322 ctf_integer(ino_t
, ino
, inode
->i_ino
)
323 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
324 ctf_integer(u64
, start
, ordered
->start
)
325 ctf_integer(u64
, len
, ordered
->len
)
326 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
327 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
328 ctf_integer(unsigned long, flags
, ordered
->flags
)
329 ctf_integer(int, compress_type
, ordered
->compress_type
)
330 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
331 ctf_integer(u64
, root_objectid
,
332 BTRFS_I(inode
)->root
->root_key
.objectid
)
335 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
336 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
338 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
340 TP_ARGS(inode
, ordered
),
343 ctf_integer(ino_t
, ino
, inode
->i_ino
)
344 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
345 ctf_integer(u64
, start
, ordered
->start
)
346 ctf_integer(u64
, len
, ordered
->len
)
347 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
348 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
349 ctf_integer(unsigned long, flags
, ordered
->flags
)
350 ctf_integer(int, compress_type
, ordered
->compress_type
)
351 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
352 ctf_integer(u64
, root_objectid
,
353 BTRFS_I(inode
)->root
->root_key
.objectid
)
356 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
357 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
359 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
361 TP_ARGS(inode
, ordered
),
364 ctf_integer(ino_t
, ino
, inode
->i_ino
)
365 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
366 ctf_integer(u64
, start
, ordered
->start
)
367 ctf_integer(u64
, len
, ordered
->len
)
368 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
369 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
370 ctf_integer(unsigned long, flags
, ordered
->flags
)
371 ctf_integer(int, compress_type
, ordered
->compress_type
)
372 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
373 ctf_integer(u64
, root_objectid
,
374 BTRFS_I(inode
)->root
->root_key
.objectid
)
378 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
380 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
382 TP_ARGS(inode
, ordered
),
385 ctf_integer(ino_t
, ino
, inode
->i_ino
)
386 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
387 ctf_integer(u64
, start
, ordered
->start
)
388 ctf_integer(u64
, len
, ordered
->len
)
389 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
390 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
391 ctf_integer(unsigned long, flags
, ordered
->flags
)
392 ctf_integer(int, compress_type
, ordered
->compress_type
)
393 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
394 ctf_integer(u64
, root_objectid
,
395 BTRFS_I(inode
)->root
->root_key
.objectid
)
400 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
401 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
402 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
404 TP_PROTO(const struct inode
*inode
,
405 const struct btrfs_ordered_extent
*ordered
),
407 TP_ARGS(inode
, ordered
)
410 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
412 TP_PROTO(const struct inode
*inode
,
413 const struct btrfs_ordered_extent
*ordered
),
415 TP_ARGS(inode
, ordered
)
418 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
420 TP_PROTO(const struct inode
*inode
,
421 const struct btrfs_ordered_extent
*ordered
),
423 TP_ARGS(inode
, ordered
)
426 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
428 TP_PROTO(const struct inode
*inode
,
429 const struct btrfs_ordered_extent
*ordered
),
431 TP_ARGS(inode
, ordered
)
434 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
436 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
437 const struct writeback_control
*wbc
),
439 TP_ARGS(page
, inode
, wbc
),
442 ctf_integer(ino_t
, ino
, inode
->i_ino
)
443 ctf_integer(pgoff_t
, index
, page
->index
)
444 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
445 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
446 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
447 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
448 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
449 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
450 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
451 ctf_integer(pgoff_t
, writeback_index
,
452 inode
->i_mapping
->writeback_index
)
453 ctf_integer(u64
, root_objectid
,
454 BTRFS_I(inode
)->root
->root_key
.objectid
)
458 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
462 btrfs__extent_writepage
,
464 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
465 const struct writeback_control
*wbc
),
467 TP_ARGS(page
, inode
, wbc
)
470 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
472 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
474 TP_ARGS(page
, start
, end
, uptodate
),
477 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
478 ctf_integer(pgoff_t
, index
, page
->index
)
479 ctf_integer(u64
, start
, start
)
480 ctf_integer(u64
, end
, end
)
481 ctf_integer(int, uptodate
, uptodate
)
482 ctf_integer(u64
, root_objectid
,
483 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
487 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
489 TP_PROTO(const struct file
*file
, int datasync
),
491 TP_ARGS(file
, datasync
),
494 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
495 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
496 ctf_integer(int, datasync
, datasync
)
497 ctf_integer(u64
, root_objectid
,
498 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
502 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
504 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
506 TP_ARGS(inode
, ordered
)
509 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
511 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
513 TP_ARGS(inode
, ordered
)
516 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
518 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
520 TP_ARGS(inode
, ordered
)
523 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
525 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
527 TP_ARGS(inode
, ordered
)
530 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
532 TP_PROTO(struct page
*page
, struct inode
*inode
,
533 struct writeback_control
*wbc
),
535 TP_ARGS(page
, inode
, wbc
),
538 ctf_integer(ino_t
, ino
, inode
->i_ino
)
539 ctf_integer(pgoff_t
, index
, page
->index
)
540 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
541 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
542 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
543 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
544 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
545 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
547 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
548 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
549 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
550 ctf_integer(pgoff_t
, writeback_index
,
551 inode
->i_mapping
->writeback_index
)
552 ctf_integer(u64
, root_objectid
,
553 BTRFS_I(inode
)->root
->root_key
.objectid
)
557 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
561 btrfs__extent_writepage
,
563 TP_PROTO(struct page
*page
, struct inode
*inode
,
564 struct writeback_control
*wbc
),
566 TP_ARGS(page
, inode
, wbc
)
569 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
571 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
573 TP_ARGS(page
, start
, end
, uptodate
),
576 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
577 ctf_integer(pgoff_t
, index
, page
->index
)
578 ctf_integer(u64
, start
, start
)
579 ctf_integer(u64
, end
, end
)
580 ctf_integer(int, uptodate
, uptodate
)
581 ctf_integer(u64
, root_objectid
,
582 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
586 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
588 TP_PROTO(struct file
*file
, int datasync
),
590 TP_ARGS(file
, datasync
),
593 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
594 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
595 ctf_integer(int, datasync
, datasync
)
596 ctf_integer(u64
, root_objectid
,
597 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
602 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
603 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
604 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
606 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
608 TP_ARGS(fs_info
, wait
),
611 ctf_integer(int, wait
, wait
)
614 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
615 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
617 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
619 TP_ARGS(fs_info
, wait
),
622 ctf_integer(int, wait
, wait
)
626 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
633 ctf_integer(int, wait
, wait
)
638 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
639 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
640 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
642 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
643 const struct btrfs_block_group_cache
*block_group
, int create
),
645 TP_ARGS(fs_info
, block_group
, create
),
648 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
649 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
650 ctf_integer(u64
, size
, block_group
->key
.offset
)
651 ctf_integer(u64
, flags
, block_group
->flags
)
652 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
653 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
654 ctf_integer(int, create
, create
)
658 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
660 TP_PROTO(struct btrfs_fs_info
*fs_info
,
661 struct btrfs_block_group_cache
*block_group
, int create
),
663 TP_ARGS(fs_info
, block_group
, create
),
666 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
667 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
668 ctf_integer(u64
, size
, block_group
->key
.offset
)
669 ctf_integer(u64
, flags
, block_group
->flags
)
670 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
671 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
672 ctf_integer(int, create
, create
)
677 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
678 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
680 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
681 const struct btrfs_delayed_ref_node
*ref
,
682 const struct btrfs_delayed_tree_ref
*full_ref
,
685 TP_ARGS(fs_info
, ref
, full_ref
, action
),
688 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
689 ctf_integer(u64
, bytenr
, ref
->bytenr
)
690 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
691 ctf_integer(int, action
, action
)
692 ctf_integer(u64
, parent
, full_ref
->parent
)
693 ctf_integer(u64
, ref_root
, full_ref
->root
)
694 ctf_integer(int, level
, full_ref
->level
)
695 ctf_integer(int, type
, ref
->type
)
696 ctf_integer(u64
, seq
, ref
->seq
)
700 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
702 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
703 const struct btrfs_delayed_ref_node
*ref
,
704 const struct btrfs_delayed_tree_ref
*full_ref
,
707 TP_ARGS(fs_info
, ref
, full_ref
, action
)
710 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
712 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
713 const struct btrfs_delayed_ref_node
*ref
,
714 const struct btrfs_delayed_tree_ref
*full_ref
,
717 TP_ARGS(fs_info
, ref
, full_ref
, action
)
719 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
720 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
722 TP_PROTO(struct btrfs_fs_info
*fs_info
,
723 struct btrfs_delayed_ref_node
*ref
,
724 struct btrfs_delayed_tree_ref
*full_ref
,
727 TP_ARGS(fs_info
, ref
, full_ref
, action
),
730 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
731 ctf_integer(u64
, bytenr
, ref
->bytenr
)
732 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
733 ctf_integer(int, action
, action
)
734 ctf_integer(u64
, parent
, full_ref
->parent
)
735 ctf_integer(u64
, ref_root
, full_ref
->root
)
736 ctf_integer(int, level
, full_ref
->level
)
737 ctf_integer(int, type
, ref
->type
)
738 ctf_integer(u64
, seq
, ref
->seq
)
742 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
744 TP_PROTO(struct btrfs_fs_info
*fs_info
,
745 struct btrfs_delayed_ref_node
*ref
,
746 struct btrfs_delayed_tree_ref
*full_ref
,
749 TP_ARGS(fs_info
, ref
, full_ref
, action
)
752 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
754 TP_PROTO(struct btrfs_fs_info
*fs_info
,
755 struct btrfs_delayed_ref_node
*ref
,
756 struct btrfs_delayed_tree_ref
*full_ref
,
759 TP_ARGS(fs_info
, ref
, full_ref
, action
)
761 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
762 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
764 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
765 struct btrfs_delayed_tree_ref
*full_ref
,
768 TP_ARGS(ref
, full_ref
, action
),
771 ctf_integer(u64
, bytenr
, ref
->bytenr
)
772 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
773 ctf_integer(int, action
, action
)
774 ctf_integer(u64
, parent
, full_ref
->parent
)
775 ctf_integer(u64
, ref_root
, full_ref
->root
)
776 ctf_integer(int, level
, full_ref
->level
)
777 ctf_integer(int, type
, ref
->type
)
778 ctf_integer(u64
, seq
, ref
->seq
)
782 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
784 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
785 struct btrfs_delayed_tree_ref
*full_ref
,
788 TP_ARGS(ref
, full_ref
, action
)
791 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
793 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
794 struct btrfs_delayed_tree_ref
*full_ref
,
797 TP_ARGS(ref
, full_ref
, action
)
799 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
800 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
802 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
803 struct btrfs_delayed_tree_ref
*full_ref
,
806 TP_ARGS(ref
, full_ref
, action
),
809 ctf_integer(u64
, bytenr
, ref
->bytenr
)
810 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
811 ctf_integer(int, action
, action
)
812 ctf_integer(u64
, parent
, full_ref
->parent
)
813 ctf_integer(u64
, ref_root
, full_ref
->root
)
814 ctf_integer(int, level
, full_ref
->level
)
815 ctf_integer(int, type
, ref
->type
)
816 ctf_integer(u64
, seq
, ref
->seq
)
820 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
822 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
823 struct btrfs_delayed_tree_ref
*full_ref
,
826 TP_ARGS(ref
, full_ref
, action
),
829 ctf_integer(u64
, bytenr
, ref
->bytenr
)
830 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
831 ctf_integer(int, action
, action
)
832 ctf_integer(u64
, parent
, full_ref
->parent
)
833 ctf_integer(u64
, ref_root
, full_ref
->root
)
834 ctf_integer(int, level
, full_ref
->level
)
835 ctf_integer(int, type
, ref
->type
)
840 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
841 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
843 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
844 const struct btrfs_delayed_ref_node
*ref
,
845 const struct btrfs_delayed_data_ref
*full_ref
,
848 TP_ARGS(fs_info
, ref
, full_ref
, action
),
851 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
852 ctf_integer(u64
, bytenr
, ref
->bytenr
)
853 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
854 ctf_integer(int, action
, action
)
855 ctf_integer(u64
, parent
, full_ref
->parent
)
856 ctf_integer(u64
, ref_root
, full_ref
->root
)
857 ctf_integer(u64
, owner
, full_ref
->objectid
)
858 ctf_integer(u64
, offset
, full_ref
->offset
)
859 ctf_integer(int, type
, ref
->type
)
860 ctf_integer(u64
, seq
, ref
->seq
)
864 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
866 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
867 const struct btrfs_delayed_ref_node
*ref
,
868 const struct btrfs_delayed_data_ref
*full_ref
,
871 TP_ARGS(fs_info
, ref
, full_ref
, action
)
874 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
876 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
877 const struct btrfs_delayed_ref_node
*ref
,
878 const struct btrfs_delayed_data_ref
*full_ref
,
881 TP_ARGS(fs_info
, ref
, full_ref
, action
)
883 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
884 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
886 TP_PROTO(struct btrfs_fs_info
*fs_info
,
887 struct btrfs_delayed_ref_node
*ref
,
888 struct btrfs_delayed_data_ref
*full_ref
,
891 TP_ARGS(fs_info
, ref
, full_ref
, action
),
894 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
895 ctf_integer(u64
, bytenr
, ref
->bytenr
)
896 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
897 ctf_integer(int, action
, action
)
898 ctf_integer(u64
, parent
, full_ref
->parent
)
899 ctf_integer(u64
, ref_root
, full_ref
->root
)
900 ctf_integer(u64
, owner
, full_ref
->objectid
)
901 ctf_integer(u64
, offset
, full_ref
->offset
)
902 ctf_integer(int, type
, ref
->type
)
903 ctf_integer(u64
, seq
, ref
->seq
)
907 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
909 TP_PROTO(struct btrfs_fs_info
*fs_info
,
910 struct btrfs_delayed_ref_node
*ref
,
911 struct btrfs_delayed_data_ref
*full_ref
,
914 TP_ARGS(fs_info
, ref
, full_ref
, action
)
917 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
919 TP_PROTO(struct btrfs_fs_info
*fs_info
,
920 struct btrfs_delayed_ref_node
*ref
,
921 struct btrfs_delayed_data_ref
*full_ref
,
924 TP_ARGS(fs_info
, ref
, full_ref
, action
)
926 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
927 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
929 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
930 struct btrfs_delayed_data_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(u64
, owner
, full_ref
->objectid
)
942 ctf_integer(u64
, offset
, full_ref
->offset
)
943 ctf_integer(int, type
, ref
->type
)
944 ctf_integer(u64
, seq
, ref
->seq
)
948 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
950 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
951 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(struct btrfs_delayed_ref_node
*ref
,
960 struct btrfs_delayed_data_ref
*full_ref
,
963 TP_ARGS(fs_info
, ref
, full_ref
, action
)
965 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
966 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
968 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
969 struct btrfs_delayed_data_ref
*full_ref
,
972 TP_ARGS(ref
, full_ref
, action
),
975 ctf_integer(u64
, bytenr
, ref
->bytenr
)
976 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
977 ctf_integer(int, action
, action
)
978 ctf_integer(u64
, parent
, full_ref
->parent
)
979 ctf_integer(u64
, ref_root
, full_ref
->root
)
980 ctf_integer(u64
, owner
, full_ref
->objectid
)
981 ctf_integer(u64
, offset
, full_ref
->offset
)
982 ctf_integer(int, type
, ref
->type
)
983 ctf_integer(u64
, seq
, ref
->seq
)
987 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
989 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
990 struct btrfs_delayed_data_ref
*full_ref
,
993 TP_ARGS(ref
, full_ref
, action
),
996 ctf_integer(u64
, bytenr
, ref
->bytenr
)
997 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
998 ctf_integer(int, action
, action
)
999 ctf_integer(u64
, parent
, full_ref
->parent
)
1000 ctf_integer(u64
, ref_root
, full_ref
->root
)
1001 ctf_integer(u64
, owner
, full_ref
->objectid
)
1002 ctf_integer(u64
, offset
, full_ref
->offset
)
1003 ctf_integer(int, type
, ref
->type
)
1008 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1009 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1011 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1012 const struct btrfs_delayed_ref_head
*head_ref
,
1015 TP_ARGS(fs_info
, head_ref
, action
),
1018 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1019 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1020 ctf_integer(int, action
, action
)
1021 ctf_integer(int, is_data
, head_ref
->is_data
)
1025 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1027 add_delayed_ref_head
,
1029 btrfs_add_delayed_ref_head
,
1031 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1032 const struct btrfs_delayed_ref_head
*head_ref
,
1035 TP_ARGS(fs_info
, head_ref
, action
)
1038 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1040 run_delayed_ref_head
,
1042 btrfs_run_delayed_ref_head
,
1044 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1045 const struct btrfs_delayed_ref_head
*head_ref
,
1048 TP_ARGS(fs_info
, head_ref
, action
)
1051 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1052 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
1053 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1055 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1056 const struct btrfs_delayed_ref_node
*ref
,
1057 const struct btrfs_delayed_ref_head
*head_ref
,
1060 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1063 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1064 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1065 ctf_integer(int, action
, action
)
1066 ctf_integer(int, is_data
, head_ref
->is_data
)
1070 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1072 add_delayed_ref_head
,
1074 btrfs_add_delayed_ref_head
,
1076 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1077 const struct btrfs_delayed_ref_node
*ref
,
1078 const struct btrfs_delayed_ref_head
*head_ref
,
1081 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1084 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1086 run_delayed_ref_head
,
1088 btrfs_run_delayed_ref_head
,
1090 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1091 const struct btrfs_delayed_ref_node
*ref
,
1092 const struct btrfs_delayed_ref_head
*head_ref
,
1095 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1098 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1099 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1101 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1102 struct btrfs_delayed_ref_node
*ref
,
1103 struct btrfs_delayed_ref_head
*head_ref
,
1106 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1109 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1110 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1111 ctf_integer(int, action
, action
)
1112 ctf_integer(int, is_data
, head_ref
->is_data
)
1116 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1118 add_delayed_ref_head
,
1120 btrfs_add_delayed_ref_head
,
1122 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1123 struct btrfs_delayed_ref_node
*ref
,
1124 struct btrfs_delayed_ref_head
*head_ref
,
1127 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1130 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1132 run_delayed_ref_head
,
1134 btrfs_run_delayed_ref_head
,
1136 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1137 struct btrfs_delayed_ref_node
*ref
,
1138 struct btrfs_delayed_ref_head
*head_ref
,
1141 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1144 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
1145 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1147 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1148 const struct btrfs_delayed_ref_head
*head_ref
,
1151 TP_ARGS(ref
, head_ref
, action
),
1154 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1155 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1156 ctf_integer(int, action
, action
)
1157 ctf_integer(int, is_data
, head_ref
->is_data
)
1161 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1163 add_delayed_ref_head
,
1165 btrfs_add_delayed_ref_head
,
1167 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1168 const struct btrfs_delayed_ref_head
*head_ref
,
1171 TP_ARGS(ref
, head_ref
, action
)
1174 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1176 run_delayed_ref_head
,
1178 btrfs_run_delayed_ref_head
,
1180 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1181 const struct btrfs_delayed_ref_head
*head_ref
,
1184 TP_ARGS(ref
, head_ref
, action
)
1187 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1188 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1190 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1191 struct btrfs_delayed_ref_head
*head_ref
,
1194 TP_ARGS(ref
, head_ref
, action
),
1197 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1198 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1199 ctf_integer(int, action
, action
)
1200 ctf_integer(int, is_data
, head_ref
->is_data
)
1204 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1206 add_delayed_ref_head
,
1208 btrfs_add_delayed_ref_head
,
1210 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1211 struct btrfs_delayed_ref_head
*head_ref
,
1214 TP_ARGS(ref
, head_ref
, action
)
1217 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1219 run_delayed_ref_head
,
1221 btrfs_run_delayed_ref_head
,
1223 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1224 struct btrfs_delayed_ref_head
*head_ref
,
1227 TP_ARGS(ref
, head_ref
, action
)
1231 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1233 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1234 struct btrfs_delayed_ref_head
*head_ref
,
1237 TP_ARGS(ref
, head_ref
, action
),
1240 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1241 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1242 ctf_integer(int, action
, action
)
1243 ctf_integer(int, is_data
, head_ref
->is_data
)
1248 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1250 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1252 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1253 u64 offset
, u64 size
),
1255 TP_ARGS(fs_info
, map
, offset
, size
),
1258 ctf_integer(int, num_stripes
, map
->num_stripes
)
1259 ctf_integer(u64
, type
, map
->type
)
1260 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1261 ctf_integer(u64
, offset
, offset
)
1262 ctf_integer(u64
, size
, size
)
1263 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1267 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1269 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1270 u64 offset
, u64 size
),
1272 TP_ARGS(info
, map
, offset
, size
)
1275 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1277 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1278 u64 offset
, u64 size
),
1280 TP_ARGS(info
, map
, offset
, size
)
1283 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1285 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1287 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1288 u64 offset
, u64 size
),
1290 TP_ARGS(fs_info
, map
, offset
, size
),
1293 ctf_integer(int, num_stripes
, map
->num_stripes
)
1294 ctf_integer(u64
, type
, map
->type
)
1295 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1296 ctf_integer(u64
, offset
, offset
)
1297 ctf_integer(u64
, size
, size
)
1298 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1302 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1304 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1305 u64 offset
, u64 size
),
1307 TP_ARGS(info
, map
, offset
, size
)
1310 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1312 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1313 u64 offset
, u64 size
),
1315 TP_ARGS(info
, map
, offset
, size
)
1318 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1320 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1322 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1323 u64 offset
, u64 size
),
1325 TP_ARGS(root
, map
, offset
, size
),
1328 ctf_integer(int, num_stripes
, map
->num_stripes
)
1329 ctf_integer(u64
, type
, map
->type
)
1330 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1331 ctf_integer(u64
, offset
, offset
)
1332 ctf_integer(u64
, size
, size
)
1333 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1337 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1339 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1340 u64 offset
, u64 size
),
1342 TP_ARGS(root
, map
, offset
, size
)
1345 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1347 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1348 u64 offset
, u64 size
),
1350 TP_ARGS(root
, map
, offset
, size
)
1353 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1355 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1357 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1358 u64 offset
, u64 size
),
1360 TP_ARGS(root
, map
, offset
, size
),
1363 ctf_integer(int, num_stripes
, map
->num_stripes
)
1364 ctf_integer(u64
, type
, map
->type
)
1365 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1366 ctf_integer(u64
, offset
, offset
)
1367 ctf_integer(u64
, size
, size
)
1368 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1372 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1374 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1375 u64 offset
, u64 size
),
1377 TP_ARGS(root
, map
, offset
, size
)
1380 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1382 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1383 u64 offset
, u64 size
),
1385 TP_ARGS(root
, map
, offset
, size
)
1388 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1390 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1391 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1392 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1394 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1395 const struct extent_buffer
*cow
),
1397 TP_ARGS(root
, buf
, cow
),
1400 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1401 ctf_integer(u64
, buf_start
, buf
->start
)
1402 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1403 ctf_integer(u64
, cow_start
, cow
->start
)
1404 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1405 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1409 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1411 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1412 struct extent_buffer
*cow
),
1414 TP_ARGS(root
, buf
, cow
),
1417 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1418 ctf_integer(u64
, buf_start
, buf
->start
)
1419 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1420 ctf_integer(u64
, cow_start
, cow
->start
)
1421 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1422 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1427 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1428 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1429 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1431 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1432 u64 bytes
, int reserve
),
1434 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1437 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1438 ctf_string(type
, type
)
1439 ctf_integer(u64
, val
, val
)
1440 ctf_integer(u64
, bytes
, bytes
)
1441 ctf_integer(int, reserve
, reserve
)
1444 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1445 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1447 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1448 u64 bytes
, int reserve
),
1450 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1453 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1454 ctf_string(type
, type
)
1455 ctf_integer(u64
, val
, val
)
1456 ctf_integer(u64
, bytes
, bytes
)
1457 ctf_integer(int, reserve
, reserve
)
1462 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1464 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1466 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1468 TP_ARGS(info
, start
, len
),
1471 ctf_integer(u64
, start
, start
)
1472 ctf_integer(u64
, len
, len
)
1476 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1478 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1480 TP_ARGS(info
, start
, len
)
1483 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1485 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1487 TP_ARGS(info
, start
, len
)
1490 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1492 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1494 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1496 TP_ARGS(info
, start
, len
),
1499 ctf_integer(u64
, start
, start
)
1500 ctf_integer(u64
, len
, len
)
1504 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1506 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1508 TP_ARGS(info
, start
, len
)
1511 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1513 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1515 TP_ARGS(info
, start
, len
)
1518 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1520 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1522 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1524 TP_ARGS(root
, start
, len
),
1527 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1528 ctf_integer(u64
, start
, start
)
1529 ctf_integer(u64
, len
, len
)
1533 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1535 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1537 TP_ARGS(root
, start
, len
)
1540 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1542 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1544 TP_ARGS(root
, start
, len
)
1547 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1549 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1551 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1553 TP_ARGS(root
, start
, len
),
1556 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1557 ctf_integer(u64
, start
, start
)
1558 ctf_integer(u64
, len
, len
)
1562 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1564 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1566 TP_ARGS(root
, start
, len
)
1569 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1571 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1573 TP_ARGS(root
, start
, len
)
1576 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1578 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1579 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1581 btrfs_find_free_extent
,
1583 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1586 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1589 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1590 ctf_integer(u64
, num_bytes
, num_bytes
)
1591 ctf_integer(u64
, empty_size
, empty_size
)
1592 ctf_integer(u64
, data
, data
)
1596 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1598 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1601 TP_ARGS(block_group
, start
, len
),
1604 ctf_array(u8
, fsid
, block_group
->fs_info
->fsid
, BTRFS_UUID_SIZE
)
1605 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1606 ctf_integer(u64
, flags
, block_group
->flags
)
1607 ctf_integer(u64
, start
, start
)
1608 ctf_integer(u64
, len
, len
)
1612 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1614 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1617 TP_ARGS(block_group
, start
, len
)
1620 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1622 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1625 TP_ARGS(block_group
, start
, len
)
1628 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1629 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1631 btrfs_find_free_extent
,
1633 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1636 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1639 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1640 ctf_integer(u64
, num_bytes
, num_bytes
)
1641 ctf_integer(u64
, empty_size
, empty_size
)
1642 ctf_integer(u64
, data
, data
)
1646 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1648 TP_PROTO(const struct btrfs_fs_info
*info
,
1649 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1652 TP_ARGS(info
, block_group
, start
, len
),
1655 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1656 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1657 ctf_integer(u64
, flags
, block_group
->flags
)
1658 ctf_integer(u64
, start
, start
)
1659 ctf_integer(u64
, len
, len
)
1663 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1665 TP_PROTO(const struct btrfs_fs_info
*info
,
1666 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1669 TP_ARGS(info
, block_group
, start
, len
)
1672 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1674 TP_PROTO(const struct btrfs_fs_info
*info
,
1675 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1678 TP_ARGS(info
, block_group
, start
, len
)
1681 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1683 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1685 btrfs_find_free_extent
,
1687 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1690 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1693 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1694 ctf_integer(u64
, num_bytes
, num_bytes
)
1695 ctf_integer(u64
, empty_size
, empty_size
)
1696 ctf_integer(u64
, data
, data
)
1700 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1702 TP_PROTO(struct btrfs_fs_info
*info
,
1703 struct btrfs_block_group_cache
*block_group
, u64 start
,
1706 TP_ARGS(info
, block_group
, start
, len
),
1709 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1710 ctf_integer(u64
, flags
, block_group
->flags
)
1711 ctf_integer(u64
, start
, start
)
1712 ctf_integer(u64
, len
, len
)
1716 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1718 TP_PROTO(struct btrfs_fs_info
*info
,
1719 struct btrfs_block_group_cache
*block_group
, u64 start
,
1722 TP_ARGS(info
, block_group
, start
, len
)
1725 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1727 TP_PROTO(struct btrfs_fs_info
*info
,
1728 struct btrfs_block_group_cache
*block_group
, u64 start
,
1731 TP_ARGS(info
, block_group
, start
, len
)
1733 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1735 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1737 btrfs_find_free_extent
,
1739 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1742 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1745 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1746 ctf_integer(u64
, num_bytes
, num_bytes
)
1747 ctf_integer(u64
, empty_size
, empty_size
)
1748 ctf_integer(u64
, data
, data
)
1752 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1754 TP_PROTO(const struct btrfs_root
*root
,
1755 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1758 TP_ARGS(root
, block_group
, start
, len
),
1761 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1762 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1763 ctf_integer(u64
, flags
, block_group
->flags
)
1764 ctf_integer(u64
, start
, start
)
1765 ctf_integer(u64
, len
, len
)
1769 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1771 TP_PROTO(const struct btrfs_root
*root
,
1772 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1775 TP_ARGS(root
, block_group
, start
, len
)
1778 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1780 TP_PROTO(const struct btrfs_root
*root
,
1781 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1784 TP_ARGS(root
, block_group
, start
, len
)
1787 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1789 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1791 btrfs_find_free_extent
,
1793 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1796 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1799 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1800 ctf_integer(u64
, num_bytes
, num_bytes
)
1801 ctf_integer(u64
, empty_size
, empty_size
)
1802 ctf_integer(u64
, data
, data
)
1806 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1808 TP_PROTO(struct btrfs_root
*root
,
1809 struct btrfs_block_group_cache
*block_group
, u64 start
,
1812 TP_ARGS(root
, block_group
, start
, len
),
1815 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1816 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1817 ctf_integer(u64
, flags
, block_group
->flags
)
1818 ctf_integer(u64
, start
, start
)
1819 ctf_integer(u64
, len
, len
)
1823 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1825 TP_PROTO(struct btrfs_root
*root
,
1826 struct btrfs_block_group_cache
*block_group
, u64 start
,
1829 TP_ARGS(root
, block_group
, start
, len
)
1832 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1834 TP_PROTO(struct btrfs_root
*root
,
1835 struct btrfs_block_group_cache
*block_group
, u64 start
,
1838 TP_ARGS(root
, block_group
, start
, len
)
1841 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1843 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1844 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1845 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1847 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1848 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1850 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1853 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1854 ctf_integer(u64
, flags
, block_group
->flags
)
1855 ctf_integer(u64
, start
, start
)
1856 ctf_integer(u64
, bytes
, bytes
)
1857 ctf_integer(u64
, empty_size
, empty_size
)
1858 ctf_integer(u64
, min_bytes
, min_bytes
)
1862 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1864 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1866 TP_ARGS(block_group
),
1869 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1873 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1875 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1876 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1878 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1881 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1882 ctf_integer(u64
, flags
, block_group
->flags
)
1883 ctf_integer(u64
, start
, cluster
->window_start
)
1884 ctf_integer(u64
, max_size
, cluster
->max_size
)
1885 ctf_integer(u64
, size
, size
)
1886 ctf_integer(int, bitmap
, bitmap
)
1889 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1890 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1892 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1893 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1895 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1898 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1899 ctf_integer(u64
, flags
, block_group
->flags
)
1900 ctf_integer(u64
, start
, start
)
1901 ctf_integer(u64
, bytes
, bytes
)
1902 ctf_integer(u64
, empty_size
, empty_size
)
1903 ctf_integer(u64
, min_bytes
, min_bytes
)
1907 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1909 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1911 TP_ARGS(block_group
),
1914 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1918 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1920 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1921 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1923 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1926 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1927 ctf_integer(u64
, flags
, block_group
->flags
)
1928 ctf_integer(u64
, start
, cluster
->window_start
)
1929 ctf_integer(u64
, max_size
, cluster
->max_size
)
1930 ctf_integer(u64
, size
, size
)
1931 ctf_integer(int, bitmap
, bitmap
)
1936 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1937 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1938 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1940 btrfs_alloc_extent_state
,
1942 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1944 TP_ARGS(state
, mask
, IP
),
1947 ctf_integer_hex(const struct extent_state
*, state
, state
)
1948 ctf_integer(gfp_t
, mask
, mask
)
1949 ctf_integer(unsigned long, ip
, IP
)
1953 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1955 btrfs_free_extent_state
,
1957 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1962 ctf_integer_hex(const struct extent_state
*, state
, state
)
1963 ctf_integer(unsigned long, ip
, IP
)
1966 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1967 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1969 btrfs_alloc_extent_state
,
1971 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1973 TP_ARGS(state
, mask
, IP
),
1976 ctf_integer_hex(struct extent_state
*, state
, state
)
1977 ctf_integer(gfp_t
, mask
, mask
)
1978 ctf_integer(unsigned long, ip
, IP
)
1982 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1984 btrfs_free_extent_state
,
1986 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
1991 ctf_integer_hex(struct extent_state
*, state
, state
)
1992 ctf_integer(unsigned long, ip
, IP
)
1997 #endif /* LTTNG_TRACE_BTRFS_H */
1999 /* This part must be outside protection */
2000 #include <probes/define_trace.h>