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,12,0))
295 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__file_extent_item_regular
,
297 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
298 struct btrfs_file_extent_item
*fi
, u64 start
),
300 TP_ARGS(bi
, l
, fi
, start
),
303 ctf_array(u8
, fsid
, bi
->root
->fs_info
, BTRFS_FSID_SIZE
)
304 ctf_integer(u64
, root_obj
, bi
->root
->objectid
)
305 ctf_integer(u64
, ino
, btrfs_ino(bi
))
306 ctf_integer(loff_t
, isize
, bi
->vfs_inode
.i_size
)
307 ctf_integer(u64
, disk_isize
, bi
->disk_i_size
)
308 ctf_integer(u64
, num_bytes
, btrfs_file_extent_num_bytes(l
, fi
))
309 ctf_integer(u64
, ram_bytes
, btrfs_file_extent_ram_bytes(l
, fi
))
310 ctf_integer(u64
, disk_bytenr
, btrfs_file_extent_disk_bytenr(l
, fi
))
311 ctf_integer(u64
, disk_num_bytes
, btrfs_file_extent_disk_num_bytes(l
, fi
))
312 ctf_integer(u64
, extent_offset
, btrfs_file_extent_offset(l
, fi
))
313 ctf_integer(u8
, extent_type
, btrfs_file_extent_type(l
, fi
))
314 ctf_integer(u8
, compression
, btrfs_file_extent_compression(l
, fi
))
315 ctf_integer(u64
, extent_start
, start
)
316 ctf_integer(u64
, extent_end
, (start
+ btrfs_file_extent_num_bytes(l
, fi
)))
320 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__file_extent_item_inline
,
322 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
323 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
325 TP_ARGS(bi
, l
, fi
, slot
, start
),
328 ctf_array(u8
, fsid
, bi
->root
->fs_info
, BTRFS_FSID_SIZE
)
329 ctf_integer(u64
, root_obj
, bi
->root
->objectid
)
330 ctf_integer(u64
, ino
, btrfs_ino(bi
))
331 ctf_integer(loff_t
, isize
, bi
->vfs_inode
.i_size
)
332 ctf_integer(u64
, disk_isize
, bi
->disk_i_size
)
333 ctf_integer(u8
, extent_type
, btrfs_file_extent_type(l
, fi
))
334 ctf_integer(u8
, compression
, btrfs_file_extent_compression(l
, fi
))
335 ctf_integer(u64
, extent_start
, start
)
336 ctf_integer(u64
, extent_end
, (start
+ btrfs_file_extent_inline_len(l
, slot
, fi
)))
340 LTTNG_TRACEPOINT_EVENT_INSTANCE(
341 btrfs__file_extent_item_regular
, btrfs_get_extent_show_fi_regular
,
343 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
344 struct btrfs_file_extent_item
*fi
, u64 start
),
346 TP_ARGS(bi
, l
, fi
, start
)
349 LTTNG_TRACEPOINT_EVENT_INSTANCE(
350 btrfs__file_extent_item_regular
, btrfs_truncate_show_fi_regular
,
352 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
353 struct btrfs_file_extent_item
*fi
, u64 start
),
355 TP_ARGS(bi
, l
, fi
, start
)
358 LTTNG_TRACEPOINT_EVENT_INSTANCE(
359 btrfs__file_extent_item_inline
, btrfs_get_extent_show_fi_inline
,
361 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
362 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
364 TP_ARGS(bi
, l
, fi
, slot
, start
)
367 LTTNG_TRACEPOINT_EVENT_INSTANCE(
368 btrfs__file_extent_item_inline
, btrfs_truncate_show_fi_inline
,
370 TP_PROTO(struct btrfs_inode
*bi
, struct extent_buffer
*l
,
371 struct btrfs_file_extent_item
*fi
, int slot
, u64 start
),
373 TP_ARGS(bi
, l
, fi
, slot
, start
)
377 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
378 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
380 TP_PROTO(const struct inode
*inode
,
381 const struct btrfs_ordered_extent
*ordered
),
383 TP_ARGS(inode
, ordered
),
386 ctf_integer(ino_t
, ino
, inode
->i_ino
)
387 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
388 ctf_integer(u64
, start
, ordered
->start
)
389 ctf_integer(u64
, len
, ordered
->len
)
390 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
391 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
392 ctf_integer(unsigned long, flags
, ordered
->flags
)
393 ctf_integer(int, compress_type
, ordered
->compress_type
)
394 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
395 ctf_integer(u64
, root_objectid
,
396 BTRFS_I(inode
)->root
->root_key
.objectid
)
399 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
400 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
402 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
404 TP_ARGS(inode
, ordered
),
407 ctf_integer(ino_t
, ino
, inode
->i_ino
)
408 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
409 ctf_integer(u64
, start
, ordered
->start
)
410 ctf_integer(u64
, len
, ordered
->len
)
411 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
412 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
413 ctf_integer(unsigned long, flags
, ordered
->flags
)
414 ctf_integer(int, compress_type
, ordered
->compress_type
)
415 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
416 ctf_integer(u64
, root_objectid
,
417 BTRFS_I(inode
)->root
->root_key
.objectid
)
420 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
421 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
423 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
425 TP_ARGS(inode
, ordered
),
428 ctf_integer(ino_t
, ino
, inode
->i_ino
)
429 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
430 ctf_integer(u64
, start
, ordered
->start
)
431 ctf_integer(u64
, len
, ordered
->len
)
432 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
433 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
434 ctf_integer(unsigned long, flags
, ordered
->flags
)
435 ctf_integer(int, compress_type
, ordered
->compress_type
)
436 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
437 ctf_integer(u64
, root_objectid
,
438 BTRFS_I(inode
)->root
->root_key
.objectid
)
442 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
444 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
446 TP_ARGS(inode
, ordered
),
449 ctf_integer(ino_t
, ino
, inode
->i_ino
)
450 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
451 ctf_integer(u64
, start
, ordered
->start
)
452 ctf_integer(u64
, len
, ordered
->len
)
453 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
454 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
455 ctf_integer(unsigned long, flags
, ordered
->flags
)
456 ctf_integer(int, compress_type
, ordered
->compress_type
)
457 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
458 ctf_integer(u64
, root_objectid
,
459 BTRFS_I(inode
)->root
->root_key
.objectid
)
464 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
465 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
466 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
468 TP_PROTO(const struct inode
*inode
,
469 const struct btrfs_ordered_extent
*ordered
),
471 TP_ARGS(inode
, ordered
)
474 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
476 TP_PROTO(const struct inode
*inode
,
477 const struct btrfs_ordered_extent
*ordered
),
479 TP_ARGS(inode
, ordered
)
482 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
484 TP_PROTO(const struct inode
*inode
,
485 const struct btrfs_ordered_extent
*ordered
),
487 TP_ARGS(inode
, ordered
)
490 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
492 TP_PROTO(const struct inode
*inode
,
493 const struct btrfs_ordered_extent
*ordered
),
495 TP_ARGS(inode
, ordered
)
498 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
500 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
501 const struct writeback_control
*wbc
),
503 TP_ARGS(page
, inode
, wbc
),
506 ctf_integer(ino_t
, ino
, inode
->i_ino
)
507 ctf_integer(pgoff_t
, index
, page
->index
)
508 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
509 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
510 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
511 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
512 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
513 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
514 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
515 ctf_integer(pgoff_t
, writeback_index
,
516 inode
->i_mapping
->writeback_index
)
517 ctf_integer(u64
, root_objectid
,
518 BTRFS_I(inode
)->root
->root_key
.objectid
)
522 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
526 btrfs__extent_writepage
,
528 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
529 const struct writeback_control
*wbc
),
531 TP_ARGS(page
, inode
, wbc
)
534 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
536 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
538 TP_ARGS(page
, start
, end
, uptodate
),
541 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
542 ctf_integer(pgoff_t
, index
, page
->index
)
543 ctf_integer(u64
, start
, start
)
544 ctf_integer(u64
, end
, end
)
545 ctf_integer(int, uptodate
, uptodate
)
546 ctf_integer(u64
, root_objectid
,
547 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
551 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
553 TP_PROTO(const struct file
*file
, int datasync
),
555 TP_ARGS(file
, datasync
),
558 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
559 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
560 ctf_integer(int, datasync
, datasync
)
561 ctf_integer(u64
, root_objectid
,
562 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
566 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
568 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
570 TP_ARGS(inode
, ordered
)
573 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
575 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
577 TP_ARGS(inode
, ordered
)
580 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
582 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
584 TP_ARGS(inode
, ordered
)
587 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
589 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
591 TP_ARGS(inode
, ordered
)
594 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
596 TP_PROTO(struct page
*page
, struct inode
*inode
,
597 struct writeback_control
*wbc
),
599 TP_ARGS(page
, inode
, wbc
),
602 ctf_integer(ino_t
, ino
, inode
->i_ino
)
603 ctf_integer(pgoff_t
, index
, page
->index
)
604 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
605 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
606 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
607 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
608 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
609 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
611 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
612 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
613 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
614 ctf_integer(pgoff_t
, writeback_index
,
615 inode
->i_mapping
->writeback_index
)
616 ctf_integer(u64
, root_objectid
,
617 BTRFS_I(inode
)->root
->root_key
.objectid
)
621 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
625 btrfs__extent_writepage
,
627 TP_PROTO(struct page
*page
, struct inode
*inode
,
628 struct writeback_control
*wbc
),
630 TP_ARGS(page
, inode
, wbc
)
633 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
635 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
637 TP_ARGS(page
, start
, end
, uptodate
),
640 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
641 ctf_integer(pgoff_t
, index
, page
->index
)
642 ctf_integer(u64
, start
, start
)
643 ctf_integer(u64
, end
, end
)
644 ctf_integer(int, uptodate
, uptodate
)
645 ctf_integer(u64
, root_objectid
,
646 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
650 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
652 TP_PROTO(struct file
*file
, int datasync
),
654 TP_ARGS(file
, datasync
),
657 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
658 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
659 ctf_integer(int, datasync
, datasync
)
660 ctf_integer(u64
, root_objectid
,
661 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
666 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
667 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
668 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
670 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
672 TP_ARGS(fs_info
, wait
),
675 ctf_integer(int, wait
, wait
)
678 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
679 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
681 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
683 TP_ARGS(fs_info
, wait
),
686 ctf_integer(int, wait
, wait
)
690 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
697 ctf_integer(int, wait
, wait
)
702 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
703 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
704 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
706 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
707 const struct btrfs_block_group_cache
*block_group
, int create
),
709 TP_ARGS(fs_info
, block_group
, create
),
712 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
713 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
714 ctf_integer(u64
, size
, block_group
->key
.offset
)
715 ctf_integer(u64
, flags
, block_group
->flags
)
716 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
717 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
718 ctf_integer(int, create
, create
)
722 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
724 TP_PROTO(struct btrfs_fs_info
*fs_info
,
725 struct btrfs_block_group_cache
*block_group
, int create
),
727 TP_ARGS(fs_info
, block_group
, create
),
730 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
731 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
732 ctf_integer(u64
, size
, block_group
->key
.offset
)
733 ctf_integer(u64
, flags
, block_group
->flags
)
734 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
735 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
736 ctf_integer(int, create
, create
)
741 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
742 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
744 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
745 const struct btrfs_delayed_ref_node
*ref
,
746 const struct btrfs_delayed_tree_ref
*full_ref
,
749 TP_ARGS(fs_info
, ref
, full_ref
, action
),
752 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
753 ctf_integer(u64
, bytenr
, ref
->bytenr
)
754 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
755 ctf_integer(int, action
, action
)
756 ctf_integer(u64
, parent
, full_ref
->parent
)
757 ctf_integer(u64
, ref_root
, full_ref
->root
)
758 ctf_integer(int, level
, full_ref
->level
)
759 ctf_integer(int, type
, ref
->type
)
760 ctf_integer(u64
, seq
, ref
->seq
)
764 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
766 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
767 const struct btrfs_delayed_ref_node
*ref
,
768 const struct btrfs_delayed_tree_ref
*full_ref
,
771 TP_ARGS(fs_info
, ref
, full_ref
, action
)
774 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
776 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
777 const struct btrfs_delayed_ref_node
*ref
,
778 const struct btrfs_delayed_tree_ref
*full_ref
,
781 TP_ARGS(fs_info
, ref
, full_ref
, action
)
783 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
784 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
786 TP_PROTO(struct btrfs_fs_info
*fs_info
,
787 struct btrfs_delayed_ref_node
*ref
,
788 struct btrfs_delayed_tree_ref
*full_ref
,
791 TP_ARGS(fs_info
, ref
, full_ref
, action
),
794 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
795 ctf_integer(u64
, bytenr
, ref
->bytenr
)
796 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
797 ctf_integer(int, action
, action
)
798 ctf_integer(u64
, parent
, full_ref
->parent
)
799 ctf_integer(u64
, ref_root
, full_ref
->root
)
800 ctf_integer(int, level
, full_ref
->level
)
801 ctf_integer(int, type
, ref
->type
)
802 ctf_integer(u64
, seq
, ref
->seq
)
806 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
808 TP_PROTO(struct btrfs_fs_info
*fs_info
,
809 struct btrfs_delayed_ref_node
*ref
,
810 struct btrfs_delayed_tree_ref
*full_ref
,
813 TP_ARGS(fs_info
, ref
, full_ref
, action
)
816 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
818 TP_PROTO(struct btrfs_fs_info
*fs_info
,
819 struct btrfs_delayed_ref_node
*ref
,
820 struct btrfs_delayed_tree_ref
*full_ref
,
823 TP_ARGS(fs_info
, ref
, full_ref
, action
)
825 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
826 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
828 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
829 struct btrfs_delayed_tree_ref
*full_ref
,
832 TP_ARGS(ref
, full_ref
, action
),
835 ctf_integer(u64
, bytenr
, ref
->bytenr
)
836 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
837 ctf_integer(int, action
, action
)
838 ctf_integer(u64
, parent
, full_ref
->parent
)
839 ctf_integer(u64
, ref_root
, full_ref
->root
)
840 ctf_integer(int, level
, full_ref
->level
)
841 ctf_integer(int, type
, ref
->type
)
842 ctf_integer(u64
, seq
, ref
->seq
)
846 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
848 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
849 struct btrfs_delayed_tree_ref
*full_ref
,
852 TP_ARGS(ref
, full_ref
, action
)
855 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
857 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
858 struct btrfs_delayed_tree_ref
*full_ref
,
861 TP_ARGS(ref
, full_ref
, action
)
863 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
864 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
866 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
867 struct btrfs_delayed_tree_ref
*full_ref
,
870 TP_ARGS(ref
, full_ref
, action
),
873 ctf_integer(u64
, bytenr
, ref
->bytenr
)
874 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
875 ctf_integer(int, action
, action
)
876 ctf_integer(u64
, parent
, full_ref
->parent
)
877 ctf_integer(u64
, ref_root
, full_ref
->root
)
878 ctf_integer(int, level
, full_ref
->level
)
879 ctf_integer(int, type
, ref
->type
)
880 ctf_integer(u64
, seq
, ref
->seq
)
884 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
886 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
887 struct btrfs_delayed_tree_ref
*full_ref
,
890 TP_ARGS(ref
, full_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(u64
, parent
, full_ref
->parent
)
897 ctf_integer(u64
, ref_root
, full_ref
->root
)
898 ctf_integer(int, level
, full_ref
->level
)
899 ctf_integer(int, type
, ref
->type
)
904 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
905 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
907 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
908 const struct btrfs_delayed_ref_node
*ref
,
909 const struct btrfs_delayed_data_ref
*full_ref
,
912 TP_ARGS(fs_info
, ref
, full_ref
, action
),
915 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
916 ctf_integer(u64
, bytenr
, ref
->bytenr
)
917 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
918 ctf_integer(int, action
, action
)
919 ctf_integer(u64
, parent
, full_ref
->parent
)
920 ctf_integer(u64
, ref_root
, full_ref
->root
)
921 ctf_integer(u64
, owner
, full_ref
->objectid
)
922 ctf_integer(u64
, offset
, full_ref
->offset
)
923 ctf_integer(int, type
, ref
->type
)
924 ctf_integer(u64
, seq
, ref
->seq
)
928 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
930 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
931 const struct btrfs_delayed_ref_node
*ref
,
932 const struct btrfs_delayed_data_ref
*full_ref
,
935 TP_ARGS(fs_info
, ref
, full_ref
, action
)
938 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
940 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
941 const struct btrfs_delayed_ref_node
*ref
,
942 const struct btrfs_delayed_data_ref
*full_ref
,
945 TP_ARGS(fs_info
, ref
, full_ref
, action
)
947 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
948 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
950 TP_PROTO(struct btrfs_fs_info
*fs_info
,
951 struct btrfs_delayed_ref_node
*ref
,
952 struct btrfs_delayed_data_ref
*full_ref
,
955 TP_ARGS(fs_info
, ref
, full_ref
, action
),
958 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
959 ctf_integer(u64
, bytenr
, ref
->bytenr
)
960 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
961 ctf_integer(int, action
, action
)
962 ctf_integer(u64
, parent
, full_ref
->parent
)
963 ctf_integer(u64
, ref_root
, full_ref
->root
)
964 ctf_integer(u64
, owner
, full_ref
->objectid
)
965 ctf_integer(u64
, offset
, full_ref
->offset
)
966 ctf_integer(int, type
, ref
->type
)
967 ctf_integer(u64
, seq
, ref
->seq
)
971 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
973 TP_PROTO(struct btrfs_fs_info
*fs_info
,
974 struct btrfs_delayed_ref_node
*ref
,
975 struct btrfs_delayed_data_ref
*full_ref
,
978 TP_ARGS(fs_info
, ref
, full_ref
, action
)
981 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
983 TP_PROTO(struct btrfs_fs_info
*fs_info
,
984 struct btrfs_delayed_ref_node
*ref
,
985 struct btrfs_delayed_data_ref
*full_ref
,
988 TP_ARGS(fs_info
, ref
, full_ref
, action
)
990 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
991 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
993 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
994 struct btrfs_delayed_data_ref
*full_ref
,
997 TP_ARGS(ref
, full_ref
, action
),
1000 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1001 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1002 ctf_integer(int, action
, action
)
1003 ctf_integer(u64
, parent
, full_ref
->parent
)
1004 ctf_integer(u64
, ref_root
, full_ref
->root
)
1005 ctf_integer(u64
, owner
, full_ref
->objectid
)
1006 ctf_integer(u64
, offset
, full_ref
->offset
)
1007 ctf_integer(int, type
, ref
->type
)
1008 ctf_integer(u64
, seq
, ref
->seq
)
1012 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
1014 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1015 struct btrfs_delayed_data_ref
*full_ref
,
1018 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1021 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
1023 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1024 struct btrfs_delayed_data_ref
*full_ref
,
1027 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1029 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1030 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1032 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1033 struct btrfs_delayed_data_ref
*full_ref
,
1036 TP_ARGS(ref
, full_ref
, action
),
1039 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1040 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1041 ctf_integer(int, action
, action
)
1042 ctf_integer(u64
, parent
, full_ref
->parent
)
1043 ctf_integer(u64
, ref_root
, full_ref
->root
)
1044 ctf_integer(u64
, owner
, full_ref
->objectid
)
1045 ctf_integer(u64
, offset
, full_ref
->offset
)
1046 ctf_integer(int, type
, ref
->type
)
1047 ctf_integer(u64
, seq
, ref
->seq
)
1051 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1053 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1054 struct btrfs_delayed_data_ref
*full_ref
,
1057 TP_ARGS(ref
, full_ref
, action
),
1060 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1061 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1062 ctf_integer(int, action
, action
)
1063 ctf_integer(u64
, parent
, full_ref
->parent
)
1064 ctf_integer(u64
, ref_root
, full_ref
->root
)
1065 ctf_integer(u64
, owner
, full_ref
->objectid
)
1066 ctf_integer(u64
, offset
, full_ref
->offset
)
1067 ctf_integer(int, type
, ref
->type
)
1072 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1073 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1075 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1076 const struct btrfs_delayed_ref_head
*head_ref
,
1079 TP_ARGS(fs_info
, head_ref
, action
),
1082 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1083 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1084 ctf_integer(int, action
, action
)
1085 ctf_integer(int, is_data
, head_ref
->is_data
)
1089 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1091 add_delayed_ref_head
,
1093 btrfs_add_delayed_ref_head
,
1095 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1096 const struct btrfs_delayed_ref_head
*head_ref
,
1099 TP_ARGS(fs_info
, head_ref
, action
)
1102 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1104 run_delayed_ref_head
,
1106 btrfs_run_delayed_ref_head
,
1108 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1109 const struct btrfs_delayed_ref_head
*head_ref
,
1112 TP_ARGS(fs_info
, head_ref
, action
)
1115 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1116 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
1117 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1119 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1120 const struct btrfs_delayed_ref_node
*ref
,
1121 const struct btrfs_delayed_ref_head
*head_ref
,
1124 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1127 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1128 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1129 ctf_integer(int, action
, action
)
1130 ctf_integer(int, is_data
, head_ref
->is_data
)
1134 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1136 add_delayed_ref_head
,
1138 btrfs_add_delayed_ref_head
,
1140 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1141 const struct btrfs_delayed_ref_node
*ref
,
1142 const struct btrfs_delayed_ref_head
*head_ref
,
1145 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1148 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1150 run_delayed_ref_head
,
1152 btrfs_run_delayed_ref_head
,
1154 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1155 const struct btrfs_delayed_ref_node
*ref
,
1156 const struct btrfs_delayed_ref_head
*head_ref
,
1159 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1162 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1163 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1165 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1166 struct btrfs_delayed_ref_node
*ref
,
1167 struct btrfs_delayed_ref_head
*head_ref
,
1170 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1173 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1174 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1175 ctf_integer(int, action
, action
)
1176 ctf_integer(int, is_data
, head_ref
->is_data
)
1180 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1182 add_delayed_ref_head
,
1184 btrfs_add_delayed_ref_head
,
1186 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1187 struct btrfs_delayed_ref_node
*ref
,
1188 struct btrfs_delayed_ref_head
*head_ref
,
1191 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1194 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1196 run_delayed_ref_head
,
1198 btrfs_run_delayed_ref_head
,
1200 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1201 struct btrfs_delayed_ref_node
*ref
,
1202 struct btrfs_delayed_ref_head
*head_ref
,
1205 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1208 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
1209 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1211 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1212 const struct btrfs_delayed_ref_head
*head_ref
,
1215 TP_ARGS(ref
, head_ref
, action
),
1218 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1219 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1220 ctf_integer(int, action
, action
)
1221 ctf_integer(int, is_data
, head_ref
->is_data
)
1225 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1227 add_delayed_ref_head
,
1229 btrfs_add_delayed_ref_head
,
1231 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1232 const struct btrfs_delayed_ref_head
*head_ref
,
1235 TP_ARGS(ref
, head_ref
, action
)
1238 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1240 run_delayed_ref_head
,
1242 btrfs_run_delayed_ref_head
,
1244 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1245 const struct btrfs_delayed_ref_head
*head_ref
,
1248 TP_ARGS(ref
, head_ref
, action
)
1251 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1252 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1254 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1255 struct btrfs_delayed_ref_head
*head_ref
,
1258 TP_ARGS(ref
, head_ref
, action
),
1261 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1262 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1263 ctf_integer(int, action
, action
)
1264 ctf_integer(int, is_data
, head_ref
->is_data
)
1268 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1270 add_delayed_ref_head
,
1272 btrfs_add_delayed_ref_head
,
1274 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1275 struct btrfs_delayed_ref_head
*head_ref
,
1278 TP_ARGS(ref
, head_ref
, action
)
1281 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1283 run_delayed_ref_head
,
1285 btrfs_run_delayed_ref_head
,
1287 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1288 struct btrfs_delayed_ref_head
*head_ref
,
1291 TP_ARGS(ref
, head_ref
, action
)
1295 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1297 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1298 struct btrfs_delayed_ref_head
*head_ref
,
1301 TP_ARGS(ref
, head_ref
, action
),
1304 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1305 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1306 ctf_integer(int, action
, action
)
1307 ctf_integer(int, is_data
, head_ref
->is_data
)
1312 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1314 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1316 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1317 u64 offset
, u64 size
),
1319 TP_ARGS(fs_info
, map
, offset
, size
),
1322 ctf_integer(int, num_stripes
, map
->num_stripes
)
1323 ctf_integer(u64
, type
, map
->type
)
1324 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1325 ctf_integer(u64
, offset
, offset
)
1326 ctf_integer(u64
, size
, size
)
1327 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1331 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1333 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1334 u64 offset
, u64 size
),
1336 TP_ARGS(info
, map
, offset
, size
)
1339 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1341 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1342 u64 offset
, u64 size
),
1344 TP_ARGS(info
, map
, offset
, size
)
1347 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1349 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1351 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1352 u64 offset
, u64 size
),
1354 TP_ARGS(fs_info
, map
, offset
, size
),
1357 ctf_integer(int, num_stripes
, map
->num_stripes
)
1358 ctf_integer(u64
, type
, map
->type
)
1359 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1360 ctf_integer(u64
, offset
, offset
)
1361 ctf_integer(u64
, size
, size
)
1362 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1366 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1368 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1369 u64 offset
, u64 size
),
1371 TP_ARGS(info
, map
, offset
, size
)
1374 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1376 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1377 u64 offset
, u64 size
),
1379 TP_ARGS(info
, map
, offset
, size
)
1382 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1384 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1386 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1387 u64 offset
, u64 size
),
1389 TP_ARGS(root
, map
, offset
, size
),
1392 ctf_integer(int, num_stripes
, map
->num_stripes
)
1393 ctf_integer(u64
, type
, map
->type
)
1394 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1395 ctf_integer(u64
, offset
, offset
)
1396 ctf_integer(u64
, size
, size
)
1397 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1401 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1403 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1404 u64 offset
, u64 size
),
1406 TP_ARGS(root
, map
, offset
, size
)
1409 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1411 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1412 u64 offset
, u64 size
),
1414 TP_ARGS(root
, map
, offset
, size
)
1417 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1419 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1421 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1422 u64 offset
, u64 size
),
1424 TP_ARGS(root
, map
, offset
, size
),
1427 ctf_integer(int, num_stripes
, map
->num_stripes
)
1428 ctf_integer(u64
, type
, map
->type
)
1429 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1430 ctf_integer(u64
, offset
, offset
)
1431 ctf_integer(u64
, size
, size
)
1432 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1436 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1438 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1439 u64 offset
, u64 size
),
1441 TP_ARGS(root
, map
, offset
, size
)
1444 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1446 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1447 u64 offset
, u64 size
),
1449 TP_ARGS(root
, map
, offset
, size
)
1452 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1454 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1455 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1456 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1458 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1459 const struct extent_buffer
*cow
),
1461 TP_ARGS(root
, buf
, cow
),
1464 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1465 ctf_integer(u64
, buf_start
, buf
->start
)
1466 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1467 ctf_integer(u64
, cow_start
, cow
->start
)
1468 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1469 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1473 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1475 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1476 struct extent_buffer
*cow
),
1478 TP_ARGS(root
, buf
, cow
),
1481 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1482 ctf_integer(u64
, buf_start
, buf
->start
)
1483 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1484 ctf_integer(u64
, cow_start
, cow
->start
)
1485 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1486 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1491 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1492 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1493 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1495 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1496 u64 bytes
, int reserve
),
1498 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1501 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1502 ctf_string(type
, type
)
1503 ctf_integer(u64
, val
, val
)
1504 ctf_integer(u64
, bytes
, bytes
)
1505 ctf_integer(int, reserve
, reserve
)
1508 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1509 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1511 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1512 u64 bytes
, int reserve
),
1514 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1517 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1518 ctf_string(type
, type
)
1519 ctf_integer(u64
, val
, val
)
1520 ctf_integer(u64
, bytes
, bytes
)
1521 ctf_integer(int, reserve
, reserve
)
1526 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1528 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1530 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1532 TP_ARGS(info
, start
, len
),
1535 ctf_integer(u64
, start
, start
)
1536 ctf_integer(u64
, len
, len
)
1540 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1542 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1544 TP_ARGS(info
, start
, len
)
1547 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1549 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1551 TP_ARGS(info
, start
, len
)
1554 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1556 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1558 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1560 TP_ARGS(info
, start
, len
),
1563 ctf_integer(u64
, start
, start
)
1564 ctf_integer(u64
, len
, len
)
1568 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1570 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1572 TP_ARGS(info
, start
, len
)
1575 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1577 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1579 TP_ARGS(info
, start
, len
)
1582 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1584 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1586 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1588 TP_ARGS(root
, start
, len
),
1591 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1592 ctf_integer(u64
, start
, start
)
1593 ctf_integer(u64
, len
, len
)
1597 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1599 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1601 TP_ARGS(root
, start
, len
)
1604 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1606 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1608 TP_ARGS(root
, start
, len
)
1611 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1613 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1615 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1617 TP_ARGS(root
, start
, len
),
1620 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1621 ctf_integer(u64
, start
, start
)
1622 ctf_integer(u64
, len
, len
)
1626 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1628 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1630 TP_ARGS(root
, start
, len
)
1633 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1635 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1637 TP_ARGS(root
, start
, len
)
1640 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1642 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1644 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1646 btrfs_find_free_extent
,
1648 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1651 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1654 ctf_integer(u64
, num_bytes
, num_bytes
)
1655 ctf_integer(u64
, empty_size
, empty_size
)
1656 ctf_integer(u64
, data
, data
)
1660 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1662 TP_PROTO(const struct btrfs_fs_info
*info
,
1663 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1666 TP_ARGS(info
, block_group
, start
, len
),
1669 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1670 ctf_integer(u64
, flags
, block_group
->flags
)
1671 ctf_integer(u64
, start
, start
)
1672 ctf_integer(u64
, len
, len
)
1676 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1678 TP_PROTO(const struct btrfs_fs_info
*info
,
1679 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1682 TP_ARGS(info
, block_group
, start
, len
)
1685 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1687 TP_PROTO(const struct btrfs_fs_info
*info
,
1688 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1691 TP_ARGS(info
, block_group
, start
, len
)
1694 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1696 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1698 btrfs_find_free_extent
,
1700 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1703 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1706 ctf_integer(u64
, num_bytes
, num_bytes
)
1707 ctf_integer(u64
, empty_size
, empty_size
)
1708 ctf_integer(u64
, data
, data
)
1712 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1714 TP_PROTO(struct btrfs_fs_info
*info
,
1715 struct btrfs_block_group_cache
*block_group
, u64 start
,
1718 TP_ARGS(info
, block_group
, start
, len
),
1721 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1722 ctf_integer(u64
, flags
, block_group
->flags
)
1723 ctf_integer(u64
, start
, start
)
1724 ctf_integer(u64
, len
, len
)
1728 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1730 TP_PROTO(struct btrfs_fs_info
*info
,
1731 struct btrfs_block_group_cache
*block_group
, u64 start
,
1734 TP_ARGS(info
, block_group
, start
, len
)
1737 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1739 TP_PROTO(struct btrfs_fs_info
*info
,
1740 struct btrfs_block_group_cache
*block_group
, u64 start
,
1743 TP_ARGS(info
, block_group
, start
, len
)
1745 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1747 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1749 btrfs_find_free_extent
,
1751 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1754 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1757 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1758 ctf_integer(u64
, num_bytes
, num_bytes
)
1759 ctf_integer(u64
, empty_size
, empty_size
)
1760 ctf_integer(u64
, data
, data
)
1764 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1766 TP_PROTO(const struct btrfs_root
*root
,
1767 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1770 TP_ARGS(root
, block_group
, start
, len
),
1773 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1774 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1775 ctf_integer(u64
, flags
, block_group
->flags
)
1776 ctf_integer(u64
, start
, start
)
1777 ctf_integer(u64
, len
, len
)
1781 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1783 TP_PROTO(const struct btrfs_root
*root
,
1784 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1787 TP_ARGS(root
, block_group
, start
, len
)
1790 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1792 TP_PROTO(const struct btrfs_root
*root
,
1793 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1796 TP_ARGS(root
, block_group
, start
, len
)
1799 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1801 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1803 btrfs_find_free_extent
,
1805 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1808 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1811 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1812 ctf_integer(u64
, num_bytes
, num_bytes
)
1813 ctf_integer(u64
, empty_size
, empty_size
)
1814 ctf_integer(u64
, data
, data
)
1818 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1820 TP_PROTO(struct btrfs_root
*root
,
1821 struct btrfs_block_group_cache
*block_group
, u64 start
,
1824 TP_ARGS(root
, block_group
, start
, len
),
1827 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1828 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1829 ctf_integer(u64
, flags
, block_group
->flags
)
1830 ctf_integer(u64
, start
, start
)
1831 ctf_integer(u64
, len
, len
)
1835 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1837 TP_PROTO(struct btrfs_root
*root
,
1838 struct btrfs_block_group_cache
*block_group
, u64 start
,
1841 TP_ARGS(root
, block_group
, start
, len
)
1844 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1846 TP_PROTO(struct btrfs_root
*root
,
1847 struct btrfs_block_group_cache
*block_group
, u64 start
,
1850 TP_ARGS(root
, block_group
, start
, len
)
1853 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1855 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1856 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1857 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1859 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1860 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1862 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1865 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1866 ctf_integer(u64
, flags
, block_group
->flags
)
1867 ctf_integer(u64
, start
, start
)
1868 ctf_integer(u64
, bytes
, bytes
)
1869 ctf_integer(u64
, empty_size
, empty_size
)
1870 ctf_integer(u64
, min_bytes
, min_bytes
)
1874 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1876 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1878 TP_ARGS(block_group
),
1881 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1885 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1887 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1888 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1890 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1893 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1894 ctf_integer(u64
, flags
, block_group
->flags
)
1895 ctf_integer(u64
, start
, cluster
->window_start
)
1896 ctf_integer(u64
, max_size
, cluster
->max_size
)
1897 ctf_integer(u64
, size
, size
)
1898 ctf_integer(int, bitmap
, bitmap
)
1901 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1902 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1904 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1905 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1907 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1910 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1911 ctf_integer(u64
, flags
, block_group
->flags
)
1912 ctf_integer(u64
, start
, start
)
1913 ctf_integer(u64
, bytes
, bytes
)
1914 ctf_integer(u64
, empty_size
, empty_size
)
1915 ctf_integer(u64
, min_bytes
, min_bytes
)
1919 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1921 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1923 TP_ARGS(block_group
),
1926 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1930 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1932 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1933 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1935 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1938 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1939 ctf_integer(u64
, flags
, block_group
->flags
)
1940 ctf_integer(u64
, start
, cluster
->window_start
)
1941 ctf_integer(u64
, max_size
, cluster
->max_size
)
1942 ctf_integer(u64
, size
, size
)
1943 ctf_integer(int, bitmap
, bitmap
)
1948 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1949 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1950 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1952 btrfs_alloc_extent_state
,
1954 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1956 TP_ARGS(state
, mask
, IP
),
1959 ctf_integer_hex(const struct extent_state
*, state
, state
)
1960 ctf_integer(gfp_t
, mask
, mask
)
1961 ctf_integer(unsigned long, ip
, IP
)
1965 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1967 btrfs_free_extent_state
,
1969 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1974 ctf_integer_hex(const struct extent_state
*, state
, state
)
1975 ctf_integer(unsigned long, ip
, IP
)
1978 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1979 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1981 btrfs_alloc_extent_state
,
1983 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1985 TP_ARGS(state
, mask
, IP
),
1988 ctf_integer_hex(struct extent_state
*, state
, state
)
1989 ctf_integer(gfp_t
, mask
, mask
)
1990 ctf_integer(unsigned long, ip
, IP
)
1994 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1996 btrfs_free_extent_state
,
1998 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2003 ctf_integer_hex(struct extent_state
*, state
, state
)
2004 ctf_integer(unsigned long, ip
, IP
)
2009 #endif /* LTTNG_TRACE_BTRFS_H */
2011 /* This part must be outside protection */
2012 #include <probes/define_trace.h>