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,17,0))
277 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
279 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
281 TP_ARGS(existing
, map
, start
, len
),
284 ctf_integer(u64
, e_start
, existing
->start
)
285 ctf_integer(u64
, e_len
, existing
->len
)
286 ctf_integer(u64
, map_start
, map
->start
)
287 ctf_integer(u64
, map_len
, map
->len
)
288 ctf_integer(u64
, start
, start
)
289 ctf_integer(u64
, len
, len
)
294 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
295 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
297 TP_PROTO(const struct inode
*inode
,
298 const struct btrfs_ordered_extent
*ordered
),
300 TP_ARGS(inode
, ordered
),
303 ctf_integer(ino_t
, ino
, inode
->i_ino
)
304 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
305 ctf_integer(u64
, start
, ordered
->start
)
306 ctf_integer(u64
, len
, ordered
->len
)
307 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
308 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
309 ctf_integer(unsigned long, flags
, ordered
->flags
)
310 ctf_integer(int, compress_type
, ordered
->compress_type
)
311 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
312 ctf_integer(u64
, root_objectid
,
313 BTRFS_I(inode
)->root
->root_key
.objectid
)
316 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
317 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
319 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
321 TP_ARGS(inode
, ordered
),
324 ctf_integer(ino_t
, ino
, inode
->i_ino
)
325 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
326 ctf_integer(u64
, start
, ordered
->start
)
327 ctf_integer(u64
, len
, ordered
->len
)
328 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
329 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
330 ctf_integer(unsigned long, flags
, ordered
->flags
)
331 ctf_integer(int, compress_type
, ordered
->compress_type
)
332 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
333 ctf_integer(u64
, root_objectid
,
334 BTRFS_I(inode
)->root
->root_key
.objectid
)
337 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
338 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
340 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
342 TP_ARGS(inode
, ordered
),
345 ctf_integer(ino_t
, ino
, inode
->i_ino
)
346 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
347 ctf_integer(u64
, start
, ordered
->start
)
348 ctf_integer(u64
, len
, ordered
->len
)
349 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
350 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
351 ctf_integer(unsigned long, flags
, ordered
->flags
)
352 ctf_integer(int, compress_type
, ordered
->compress_type
)
353 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
354 ctf_integer(u64
, root_objectid
,
355 BTRFS_I(inode
)->root
->root_key
.objectid
)
359 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
361 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
363 TP_ARGS(inode
, ordered
),
366 ctf_integer(ino_t
, ino
, inode
->i_ino
)
367 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
368 ctf_integer(u64
, start
, ordered
->start
)
369 ctf_integer(u64
, len
, ordered
->len
)
370 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
371 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
372 ctf_integer(unsigned long, flags
, ordered
->flags
)
373 ctf_integer(int, compress_type
, ordered
->compress_type
)
374 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
375 ctf_integer(u64
, root_objectid
,
376 BTRFS_I(inode
)->root
->root_key
.objectid
)
381 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
382 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
383 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
385 TP_PROTO(const struct inode
*inode
,
386 const struct btrfs_ordered_extent
*ordered
),
388 TP_ARGS(inode
, ordered
)
391 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
393 TP_PROTO(const struct inode
*inode
,
394 const struct btrfs_ordered_extent
*ordered
),
396 TP_ARGS(inode
, ordered
)
399 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
401 TP_PROTO(const struct inode
*inode
,
402 const struct btrfs_ordered_extent
*ordered
),
404 TP_ARGS(inode
, ordered
)
407 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
409 TP_PROTO(const struct inode
*inode
,
410 const struct btrfs_ordered_extent
*ordered
),
412 TP_ARGS(inode
, ordered
)
415 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
417 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
418 const struct writeback_control
*wbc
),
420 TP_ARGS(page
, inode
, wbc
),
423 ctf_integer(ino_t
, ino
, inode
->i_ino
)
424 ctf_integer(pgoff_t
, index
, page
->index
)
425 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
426 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
427 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
428 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
429 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
430 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
431 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
432 ctf_integer(pgoff_t
, writeback_index
,
433 inode
->i_mapping
->writeback_index
)
434 ctf_integer(u64
, root_objectid
,
435 BTRFS_I(inode
)->root
->root_key
.objectid
)
439 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
443 btrfs__extent_writepage
,
445 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
446 const struct writeback_control
*wbc
),
448 TP_ARGS(page
, inode
, wbc
)
451 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
453 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
455 TP_ARGS(page
, start
, end
, uptodate
),
458 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
459 ctf_integer(pgoff_t
, index
, page
->index
)
460 ctf_integer(u64
, start
, start
)
461 ctf_integer(u64
, end
, end
)
462 ctf_integer(int, uptodate
, uptodate
)
463 ctf_integer(u64
, root_objectid
,
464 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
468 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
470 TP_PROTO(const struct file
*file
, int datasync
),
472 TP_ARGS(file
, datasync
),
475 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
476 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
477 ctf_integer(int, datasync
, datasync
)
478 ctf_integer(u64
, root_objectid
,
479 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
483 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
485 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
487 TP_ARGS(inode
, ordered
)
490 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
492 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
494 TP_ARGS(inode
, ordered
)
497 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
499 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
501 TP_ARGS(inode
, ordered
)
504 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
506 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
508 TP_ARGS(inode
, ordered
)
511 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
513 TP_PROTO(struct page
*page
, struct inode
*inode
,
514 struct writeback_control
*wbc
),
516 TP_ARGS(page
, inode
, wbc
),
519 ctf_integer(ino_t
, ino
, inode
->i_ino
)
520 ctf_integer(pgoff_t
, index
, page
->index
)
521 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
522 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
523 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
524 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
525 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
526 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
528 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
529 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
530 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
531 ctf_integer(pgoff_t
, writeback_index
,
532 inode
->i_mapping
->writeback_index
)
533 ctf_integer(u64
, root_objectid
,
534 BTRFS_I(inode
)->root
->root_key
.objectid
)
538 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
542 btrfs__extent_writepage
,
544 TP_PROTO(struct page
*page
, struct inode
*inode
,
545 struct writeback_control
*wbc
),
547 TP_ARGS(page
, inode
, wbc
)
550 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
552 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
554 TP_ARGS(page
, start
, end
, uptodate
),
557 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
558 ctf_integer(pgoff_t
, index
, page
->index
)
559 ctf_integer(u64
, start
, start
)
560 ctf_integer(u64
, end
, end
)
561 ctf_integer(int, uptodate
, uptodate
)
562 ctf_integer(u64
, root_objectid
,
563 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
567 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
569 TP_PROTO(struct file
*file
, int datasync
),
571 TP_ARGS(file
, datasync
),
574 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
575 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
576 ctf_integer(int, datasync
, datasync
)
577 ctf_integer(u64
, root_objectid
,
578 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
583 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
584 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
585 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
587 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
589 TP_ARGS(fs_info
, wait
),
592 ctf_integer(int, wait
, wait
)
595 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
596 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
598 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
600 TP_ARGS(fs_info
, wait
),
603 ctf_integer(int, wait
, wait
)
607 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
614 ctf_integer(int, wait
, wait
)
619 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
620 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
621 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
623 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
624 const struct btrfs_block_group_cache
*block_group
, int create
),
626 TP_ARGS(fs_info
, block_group
, create
),
629 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
630 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
631 ctf_integer(u64
, size
, block_group
->key
.offset
)
632 ctf_integer(u64
, flags
, block_group
->flags
)
633 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
634 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
635 ctf_integer(int, create
, create
)
639 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
641 TP_PROTO(struct btrfs_fs_info
*fs_info
,
642 struct btrfs_block_group_cache
*block_group
, int create
),
644 TP_ARGS(fs_info
, block_group
, create
),
647 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
648 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
649 ctf_integer(u64
, size
, block_group
->key
.offset
)
650 ctf_integer(u64
, flags
, block_group
->flags
)
651 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
652 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
653 ctf_integer(int, create
, create
)
658 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
659 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
661 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
662 const struct btrfs_delayed_ref_node
*ref
,
663 const struct btrfs_delayed_tree_ref
*full_ref
,
666 TP_ARGS(fs_info
, ref
, full_ref
, action
),
669 ctf_integer(u64
, bytenr
, ref
->bytenr
)
670 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
671 ctf_integer(int, action
, action
)
672 ctf_integer(u64
, parent
, full_ref
->parent
)
673 ctf_integer(u64
, ref_root
, full_ref
->root
)
674 ctf_integer(int, level
, full_ref
->level
)
675 ctf_integer(int, type
, ref
->type
)
676 ctf_integer(u64
, seq
, ref
->seq
)
679 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
680 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
682 TP_PROTO(struct btrfs_fs_info
*fs_info
,
683 struct btrfs_delayed_ref_node
*ref
,
684 struct btrfs_delayed_tree_ref
*full_ref
,
687 TP_ARGS(fs_info
, ref
, full_ref
, action
),
690 ctf_integer(u64
, bytenr
, ref
->bytenr
)
691 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
692 ctf_integer(int, action
, action
)
693 ctf_integer(u64
, parent
, full_ref
->parent
)
694 ctf_integer(u64
, ref_root
, full_ref
->root
)
695 ctf_integer(int, level
, full_ref
->level
)
696 ctf_integer(int, type
, ref
->type
)
697 ctf_integer(u64
, seq
, ref
->seq
)
701 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
703 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
704 struct btrfs_delayed_tree_ref
*full_ref
,
707 TP_ARGS(ref
, full_ref
, action
),
710 ctf_integer(u64
, bytenr
, ref
->bytenr
)
711 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
712 ctf_integer(int, action
, action
)
713 ctf_integer(u64
, parent
, full_ref
->parent
)
714 ctf_integer(u64
, ref_root
, full_ref
->root
)
715 ctf_integer(int, level
, full_ref
->level
)
716 ctf_integer(int, type
, ref
->type
)
717 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
718 ctf_integer(u64
, seq
, ref
->seq
)
724 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
726 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
727 struct btrfs_delayed_data_ref
*full_ref
,
730 TP_ARGS(ref
, full_ref
, action
),
733 ctf_integer(u64
, bytenr
, ref
->bytenr
)
734 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
735 ctf_integer(int, action
, action
)
736 ctf_integer(u64
, parent
, full_ref
->parent
)
737 ctf_integer(u64
, ref_root
, full_ref
->root
)
738 ctf_integer(u64
, owner
, full_ref
->objectid
)
739 ctf_integer(u64
, offset
, full_ref
->offset
)
740 ctf_integer(int, type
, ref
->type
)
741 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
742 ctf_integer(u64
, seq
, ref
->seq
)
747 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
748 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
750 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
751 const struct btrfs_delayed_ref_head
*head_ref
,
754 TP_ARGS(fs_info
, head_ref
, action
),
757 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
758 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
759 ctf_integer(int, action
, action
)
760 ctf_integer(int, is_data
, head_ref
->is_data
)
764 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
766 add_delayed_ref_head
,
768 btrfs_add_delayed_ref_head
,
770 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
771 const struct btrfs_delayed_ref_head
*head_ref
,
774 TP_ARGS(fs_info
, head_ref
, action
)
777 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
779 run_delayed_ref_head
,
781 btrfs_run_delayed_ref_head
,
783 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
784 const struct btrfs_delayed_ref_head
*head_ref
,
787 TP_ARGS(fs_info
, head_ref
, action
)
790 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
791 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
792 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
794 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
795 const struct btrfs_delayed_ref_node
*ref
,
796 const struct btrfs_delayed_ref_head
*head_ref
,
799 TP_ARGS(fs_info
, ref
, head_ref
, action
),
802 ctf_integer(u64
, bytenr
, ref
->bytenr
)
803 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
804 ctf_integer(int, action
, action
)
805 ctf_integer(int, is_data
, head_ref
->is_data
)
809 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
811 add_delayed_ref_head
,
813 btrfs_add_delayed_ref_head
,
815 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
816 const struct btrfs_delayed_ref_node
*ref
,
817 const struct btrfs_delayed_ref_head
*head_ref
,
820 TP_ARGS(fs_info
, ref
, head_ref
, action
)
823 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
825 run_delayed_ref_head
,
827 btrfs_run_delayed_ref_head
,
829 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
830 const struct btrfs_delayed_ref_node
*ref
,
831 const struct btrfs_delayed_ref_head
*head_ref
,
834 TP_ARGS(fs_info
, ref
, head_ref
, action
)
837 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
838 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
840 TP_PROTO(struct btrfs_fs_info
*fs_info
,
841 struct btrfs_delayed_ref_node
*ref
,
842 struct btrfs_delayed_ref_head
*head_ref
,
845 TP_ARGS(fs_info
, ref
, head_ref
, action
),
848 ctf_integer(u64
, bytenr
, ref
->bytenr
)
849 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
850 ctf_integer(int, action
, action
)
851 ctf_integer(int, is_data
, head_ref
->is_data
)
855 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
857 add_delayed_ref_head
,
859 btrfs_add_delayed_ref_head
,
861 TP_PROTO(struct btrfs_fs_info
*fs_info
,
862 struct btrfs_delayed_ref_node
*ref
,
863 struct btrfs_delayed_ref_head
*head_ref
,
866 TP_ARGS(fs_info
, ref
, head_ref
, action
)
869 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
871 run_delayed_ref_head
,
873 btrfs_run_delayed_ref_head
,
875 TP_PROTO(struct btrfs_fs_info
*fs_info
,
876 struct btrfs_delayed_ref_node
*ref
,
877 struct btrfs_delayed_ref_head
*head_ref
,
880 TP_ARGS(fs_info
, ref
, head_ref
, action
)
883 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
884 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
886 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
887 const struct btrfs_delayed_ref_head
*head_ref
,
890 TP_ARGS(ref
, head_ref
, action
),
893 ctf_integer(u64
, bytenr
, ref
->bytenr
)
894 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
895 ctf_integer(int, action
, action
)
896 ctf_integer(int, is_data
, head_ref
->is_data
)
900 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
902 add_delayed_ref_head
,
904 btrfs_add_delayed_ref_head
,
906 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
907 const struct btrfs_delayed_ref_head
*head_ref
,
910 TP_ARGS(ref
, head_ref
, action
)
913 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
915 run_delayed_ref_head
,
917 btrfs_run_delayed_ref_head
,
919 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
920 const struct btrfs_delayed_ref_head
*head_ref
,
923 TP_ARGS(ref
, head_ref
, action
)
926 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
927 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
929 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
930 struct btrfs_delayed_ref_head
*head_ref
,
933 TP_ARGS(ref
, head_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(int, is_data
, head_ref
->is_data
)
943 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
945 add_delayed_ref_head
,
947 btrfs_add_delayed_ref_head
,
949 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
950 struct btrfs_delayed_ref_head
*head_ref
,
953 TP_ARGS(ref
, head_ref
, action
)
956 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
958 run_delayed_ref_head
,
960 btrfs_run_delayed_ref_head
,
962 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
963 struct btrfs_delayed_ref_head
*head_ref
,
966 TP_ARGS(ref
, head_ref
, action
)
970 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
972 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
973 struct btrfs_delayed_ref_head
*head_ref
,
976 TP_ARGS(ref
, head_ref
, action
),
979 ctf_integer(u64
, bytenr
, ref
->bytenr
)
980 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
981 ctf_integer(int, action
, action
)
982 ctf_integer(int, is_data
, head_ref
->is_data
)
987 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
989 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
991 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
992 u64 offset
, u64 size
),
994 TP_ARGS(fs_info
, map
, offset
, size
),
997 ctf_integer(int, num_stripes
, map
->num_stripes
)
998 ctf_integer(u64
, type
, map
->type
)
999 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1000 ctf_integer(u64
, offset
, offset
)
1001 ctf_integer(u64
, size
, size
)
1002 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1006 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1008 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1009 u64 offset
, u64 size
),
1011 TP_ARGS(info
, map
, offset
, size
)
1014 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1016 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1017 u64 offset
, u64 size
),
1019 TP_ARGS(info
, map
, offset
, size
)
1022 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1024 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1026 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1027 u64 offset
, u64 size
),
1029 TP_ARGS(fs_info
, map
, offset
, size
),
1032 ctf_integer(int, num_stripes
, map
->num_stripes
)
1033 ctf_integer(u64
, type
, map
->type
)
1034 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1035 ctf_integer(u64
, offset
, offset
)
1036 ctf_integer(u64
, size
, size
)
1037 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1041 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1043 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1044 u64 offset
, u64 size
),
1046 TP_ARGS(info
, map
, offset
, size
)
1049 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1051 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1052 u64 offset
, u64 size
),
1054 TP_ARGS(info
, map
, offset
, size
)
1057 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1059 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1061 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1062 u64 offset
, u64 size
),
1064 TP_ARGS(root
, map
, offset
, size
),
1067 ctf_integer(int, num_stripes
, map
->num_stripes
)
1068 ctf_integer(u64
, type
, map
->type
)
1069 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1070 ctf_integer(u64
, offset
, offset
)
1071 ctf_integer(u64
, size
, size
)
1072 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1076 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1078 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1079 u64 offset
, u64 size
),
1081 TP_ARGS(root
, map
, offset
, size
)
1084 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1086 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1087 u64 offset
, u64 size
),
1089 TP_ARGS(root
, map
, offset
, size
)
1092 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1094 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1096 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1097 u64 offset
, u64 size
),
1099 TP_ARGS(root
, map
, offset
, size
),
1102 ctf_integer(int, num_stripes
, map
->num_stripes
)
1103 ctf_integer(u64
, type
, map
->type
)
1104 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1105 ctf_integer(u64
, offset
, offset
)
1106 ctf_integer(u64
, size
, size
)
1107 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1111 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1113 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1114 u64 offset
, u64 size
),
1116 TP_ARGS(root
, map
, offset
, size
)
1119 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1121 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1122 u64 offset
, u64 size
),
1124 TP_ARGS(root
, map
, offset
, size
)
1127 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1129 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1130 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1131 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1133 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1134 const struct extent_buffer
*cow
),
1136 TP_ARGS(root
, buf
, cow
),
1139 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1140 ctf_integer(u64
, buf_start
, buf
->start
)
1141 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1142 ctf_integer(u64
, cow_start
, cow
->start
)
1143 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1144 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1148 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1150 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1151 struct extent_buffer
*cow
),
1153 TP_ARGS(root
, buf
, cow
),
1156 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1157 ctf_integer(u64
, buf_start
, buf
->start
)
1158 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1159 ctf_integer(u64
, cow_start
, cow
->start
)
1160 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1161 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1166 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1167 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1168 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1170 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1171 u64 bytes
, int reserve
),
1173 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1176 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1177 ctf_string(type
, type
)
1178 ctf_integer(u64
, val
, val
)
1179 ctf_integer(u64
, bytes
, bytes
)
1180 ctf_integer(int, reserve
, reserve
)
1183 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1184 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1186 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1187 u64 bytes
, int reserve
),
1189 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1192 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1193 ctf_string(type
, type
)
1194 ctf_integer(u64
, val
, val
)
1195 ctf_integer(u64
, bytes
, bytes
)
1196 ctf_integer(int, reserve
, reserve
)
1201 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1203 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1205 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1207 TP_ARGS(info
, start
, len
),
1210 ctf_integer(u64
, start
, start
)
1211 ctf_integer(u64
, len
, len
)
1215 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1217 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1219 TP_ARGS(info
, start
, len
)
1222 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1224 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1226 TP_ARGS(info
, start
, len
)
1229 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1231 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1233 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1235 TP_ARGS(info
, start
, len
),
1238 ctf_integer(u64
, start
, start
)
1239 ctf_integer(u64
, len
, len
)
1243 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1245 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1247 TP_ARGS(info
, start
, len
)
1250 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1252 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1254 TP_ARGS(info
, start
, len
)
1257 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1259 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1261 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1263 TP_ARGS(root
, start
, len
),
1266 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1267 ctf_integer(u64
, start
, start
)
1268 ctf_integer(u64
, len
, len
)
1272 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1274 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1276 TP_ARGS(root
, start
, len
)
1279 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1281 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1283 TP_ARGS(root
, start
, len
)
1286 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1288 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1290 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1292 TP_ARGS(root
, start
, len
),
1295 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1296 ctf_integer(u64
, start
, start
)
1297 ctf_integer(u64
, len
, len
)
1301 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1303 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1305 TP_ARGS(root
, start
, len
)
1308 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1310 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1312 TP_ARGS(root
, start
, len
)
1315 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1317 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1319 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1321 btrfs_find_free_extent
,
1323 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1326 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1329 ctf_integer(u64
, num_bytes
, num_bytes
)
1330 ctf_integer(u64
, empty_size
, empty_size
)
1331 ctf_integer(u64
, data
, data
)
1335 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1337 TP_PROTO(const struct btrfs_fs_info
*info
,
1338 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1341 TP_ARGS(info
, block_group
, start
, len
),
1344 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1345 ctf_integer(u64
, flags
, block_group
->flags
)
1346 ctf_integer(u64
, start
, start
)
1347 ctf_integer(u64
, len
, len
)
1351 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1353 TP_PROTO(const struct btrfs_fs_info
*info
,
1354 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1357 TP_ARGS(info
, block_group
, start
, len
)
1360 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1362 TP_PROTO(const struct btrfs_fs_info
*info
,
1363 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1366 TP_ARGS(info
, block_group
, start
, len
)
1369 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1371 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1373 btrfs_find_free_extent
,
1375 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1378 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1381 ctf_integer(u64
, num_bytes
, num_bytes
)
1382 ctf_integer(u64
, empty_size
, empty_size
)
1383 ctf_integer(u64
, data
, data
)
1387 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1389 TP_PROTO(struct btrfs_fs_info
*info
,
1390 struct btrfs_block_group_cache
*block_group
, u64 start
,
1393 TP_ARGS(info
, block_group
, start
, len
),
1396 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1397 ctf_integer(u64
, flags
, block_group
->flags
)
1398 ctf_integer(u64
, start
, start
)
1399 ctf_integer(u64
, len
, len
)
1403 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1405 TP_PROTO(struct btrfs_fs_info
*info
,
1406 struct btrfs_block_group_cache
*block_group
, u64 start
,
1409 TP_ARGS(info
, block_group
, start
, len
)
1412 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1414 TP_PROTO(struct btrfs_fs_info
*info
,
1415 struct btrfs_block_group_cache
*block_group
, u64 start
,
1418 TP_ARGS(info
, block_group
, start
, len
)
1420 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1422 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1424 btrfs_find_free_extent
,
1426 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1429 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1432 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1433 ctf_integer(u64
, num_bytes
, num_bytes
)
1434 ctf_integer(u64
, empty_size
, empty_size
)
1435 ctf_integer(u64
, data
, data
)
1439 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1441 TP_PROTO(const struct btrfs_root
*root
,
1442 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1445 TP_ARGS(root
, block_group
, start
, len
),
1448 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1449 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1450 ctf_integer(u64
, flags
, block_group
->flags
)
1451 ctf_integer(u64
, start
, start
)
1452 ctf_integer(u64
, len
, len
)
1456 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1458 TP_PROTO(const struct btrfs_root
*root
,
1459 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1462 TP_ARGS(root
, block_group
, start
, len
)
1465 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1467 TP_PROTO(const struct btrfs_root
*root
,
1468 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1471 TP_ARGS(root
, block_group
, start
, len
)
1474 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1476 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1478 btrfs_find_free_extent
,
1480 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1483 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1486 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1487 ctf_integer(u64
, num_bytes
, num_bytes
)
1488 ctf_integer(u64
, empty_size
, empty_size
)
1489 ctf_integer(u64
, data
, data
)
1493 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1495 TP_PROTO(struct btrfs_root
*root
,
1496 struct btrfs_block_group_cache
*block_group
, u64 start
,
1499 TP_ARGS(root
, block_group
, start
, len
),
1502 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1503 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1504 ctf_integer(u64
, flags
, block_group
->flags
)
1505 ctf_integer(u64
, start
, start
)
1506 ctf_integer(u64
, len
, len
)
1510 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1512 TP_PROTO(struct btrfs_root
*root
,
1513 struct btrfs_block_group_cache
*block_group
, u64 start
,
1516 TP_ARGS(root
, block_group
, start
, len
)
1519 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1521 TP_PROTO(struct btrfs_root
*root
,
1522 struct btrfs_block_group_cache
*block_group
, u64 start
,
1525 TP_ARGS(root
, block_group
, start
, len
)
1528 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1530 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1531 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1532 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1534 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1535 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1537 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1540 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1541 ctf_integer(u64
, flags
, block_group
->flags
)
1542 ctf_integer(u64
, start
, start
)
1543 ctf_integer(u64
, bytes
, bytes
)
1544 ctf_integer(u64
, empty_size
, empty_size
)
1545 ctf_integer(u64
, min_bytes
, min_bytes
)
1549 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1551 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1553 TP_ARGS(block_group
),
1556 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1560 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1562 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1563 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1565 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1568 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1569 ctf_integer(u64
, flags
, block_group
->flags
)
1570 ctf_integer(u64
, start
, cluster
->window_start
)
1571 ctf_integer(u64
, max_size
, cluster
->max_size
)
1572 ctf_integer(u64
, size
, size
)
1573 ctf_integer(int, bitmap
, bitmap
)
1576 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1577 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1579 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1580 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1582 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1585 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1586 ctf_integer(u64
, flags
, block_group
->flags
)
1587 ctf_integer(u64
, start
, start
)
1588 ctf_integer(u64
, bytes
, bytes
)
1589 ctf_integer(u64
, empty_size
, empty_size
)
1590 ctf_integer(u64
, min_bytes
, min_bytes
)
1594 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1596 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1598 TP_ARGS(block_group
),
1601 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1605 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1607 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1608 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1610 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1613 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1614 ctf_integer(u64
, flags
, block_group
->flags
)
1615 ctf_integer(u64
, start
, cluster
->window_start
)
1616 ctf_integer(u64
, max_size
, cluster
->max_size
)
1617 ctf_integer(u64
, size
, size
)
1618 ctf_integer(int, bitmap
, bitmap
)
1623 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1624 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1625 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1627 btrfs_alloc_extent_state
,
1629 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1631 TP_ARGS(state
, mask
, IP
),
1634 ctf_integer_hex(const struct extent_state
*, state
, state
)
1635 ctf_integer(gfp_t
, mask
, mask
)
1636 ctf_integer(unsigned long, ip
, IP
)
1640 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1642 btrfs_free_extent_state
,
1644 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1649 ctf_integer_hex(const struct extent_state
*, state
, state
)
1650 ctf_integer(unsigned long, ip
, IP
)
1653 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1654 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1656 btrfs_alloc_extent_state
,
1658 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1660 TP_ARGS(state
, mask
, IP
),
1663 ctf_integer_hex(struct extent_state
*, state
, state
)
1664 ctf_integer(gfp_t
, mask
, mask
)
1665 ctf_integer(unsigned long, ip
, IP
)
1669 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1671 btrfs_free_extent_state
,
1673 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
1678 ctf_integer_hex(struct extent_state
*, state
, state
)
1679 ctf_integer(unsigned long, ip
, IP
)
1684 #endif /* LTTNG_TRACE_BTRFS_H */
1686 /* This part must be outside protection */
1687 #include <probes/define_trace.h>