1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM btrfs
5 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_BTRFS_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
12 #ifndef _TRACE_BTRFS_DEF_
13 #define _TRACE_BTRFS_DEF_
18 struct btrfs_ordered_extent
;
19 struct btrfs_delayed_ref_node
;
20 struct btrfs_delayed_tree_ref
;
21 struct btrfs_delayed_data_ref
;
22 struct btrfs_delayed_ref_head
;
23 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
24 struct btrfs_block_group
;
25 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
26 struct btrfs_block_group_cache
;
28 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
29 struct btrfs_free_cluster
;
33 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
38 #define BTRFS_UUID_SIZE 16
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
41 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
43 #define lttng_fs_info_fsid fs_info->fsid
46 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
47 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
48 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
49 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
50 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
51 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
53 TP_PROTO(const struct btrfs_root
*root
),
58 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
59 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
63 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
65 TP_PROTO(const struct inode
*inode
),
70 ctf_integer(ino_t
, ino
, inode
->i_ino
)
71 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
72 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
73 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
74 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
75 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
76 ctf_integer(u64
, root_objectid
,
77 BTRFS_I(inode
)->root
->root_key
.objectid
)
81 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
83 TP_PROTO(const struct inode
*inode
),
88 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
90 TP_PROTO(const struct inode
*inode
),
95 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
97 TP_PROTO(const struct inode
*inode
),
102 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
104 TP_PROTO(struct btrfs_root
*root
),
109 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
110 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
114 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
116 TP_PROTO(struct inode
*inode
),
121 ctf_integer(ino_t
, ino
, inode
->i_ino
)
122 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
123 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
124 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
125 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
126 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
127 ctf_integer(u64
, root_objectid
,
128 BTRFS_I(inode
)->root
->root_key
.objectid
)
132 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
134 TP_PROTO(struct inode
*inode
),
139 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
141 TP_PROTO(struct inode
*inode
),
146 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
148 TP_PROTO(struct inode
*inode
),
154 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
156 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
158 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
159 const struct extent_map
*map
),
161 TP_ARGS(root
, inode
, map
),
164 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
165 ctf_integer(u64
, ino
, btrfs_ino(inode
))
166 ctf_integer(u64
, start
, map
->start
)
167 ctf_integer(u64
, len
, map
->len
)
168 ctf_integer(u64
, orig_start
, map
->orig_start
)
169 ctf_integer(u64
, block_start
, map
->block_start
)
170 ctf_integer(u64
, block_len
, map
->block_len
)
171 ctf_integer(unsigned long, flags
, map
->flags
)
172 ctf_integer(int, refs
, refcount_read(&map
->refs
))
173 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
177 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
179 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
181 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
182 struct extent_map
*map
),
184 TP_ARGS(root
, inode
, map
),
187 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
188 ctf_integer(u64
, ino
, btrfs_ino(inode
))
189 ctf_integer(u64
, start
, map
->start
)
190 ctf_integer(u64
, len
, map
->len
)
191 ctf_integer(u64
, orig_start
, map
->orig_start
)
192 ctf_integer(u64
, block_start
, map
->block_start
)
193 ctf_integer(u64
, block_len
, map
->block_len
)
194 ctf_integer(unsigned long, flags
, map
->flags
)
195 ctf_integer(int, refs
, refcount_read(&map
->refs
))
196 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
200 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
202 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
204 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
205 struct extent_map
*map
),
207 TP_ARGS(root
, inode
, map
),
210 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
211 ctf_integer(u64
, ino
, btrfs_ino(inode
))
212 ctf_integer(u64
, start
, map
->start
)
213 ctf_integer(u64
, len
, map
->len
)
214 ctf_integer(u64
, orig_start
, map
->orig_start
)
215 ctf_integer(u64
, block_start
, map
->block_start
)
216 ctf_integer(u64
, block_len
, map
->block_len
)
217 ctf_integer(unsigned long, flags
, map
->flags
)
218 ctf_integer(int, refs
, atomic_read(&map
->refs
))
219 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
223 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
225 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
227 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
228 struct extent_map
*map
),
230 TP_ARGS(root
, inode
, map
),
233 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
234 ctf_integer(u64
, ino
, btrfs_ino(inode
))
235 ctf_integer(u64
, start
, map
->start
)
236 ctf_integer(u64
, len
, map
->len
)
237 ctf_integer(u64
, orig_start
, map
->orig_start
)
238 ctf_integer(u64
, block_start
, map
->block_start
)
239 ctf_integer(u64
, block_len
, map
->block_len
)
240 ctf_integer(unsigned long, flags
, map
->flags
)
241 ctf_integer(int, refs
, atomic_read(&map
->refs
))
242 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
246 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
247 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
248 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
249 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
251 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
253 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
258 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
259 ctf_integer(u64
, start
, map
->start
)
260 ctf_integer(u64
, len
, map
->len
)
261 ctf_integer(u64
, orig_start
, map
->orig_start
)
262 ctf_integer(u64
, block_start
, map
->block_start
)
263 ctf_integer(u64
, block_len
, map
->block_len
)
264 ctf_integer(unsigned long, flags
, map
->flags
)
265 ctf_integer(int, refs
, atomic_read(&map
->refs
))
266 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
270 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
272 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
274 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
279 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
280 ctf_integer(u64
, start
, map
->start
)
281 ctf_integer(u64
, len
, map
->len
)
282 ctf_integer(u64
, orig_start
, map
->orig_start
)
283 ctf_integer(u64
, block_start
, map
->block_start
)
284 ctf_integer(u64
, block_len
, map
->block_len
)
285 ctf_integer(unsigned long, flags
, map
->flags
)
286 ctf_integer(int, refs
, atomic_read(&map
->refs
))
287 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
291 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
293 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
294 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
296 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
297 const struct extent_map
*existing
, const struct extent_map
*map
,
300 TP_ARGS(fs_info
, existing
, map
, start
, len
),
303 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
304 ctf_integer(u64
, e_start
, existing
->start
)
305 ctf_integer(u64
, e_len
, existing
->len
)
306 ctf_integer(u64
, map_start
, map
->start
)
307 ctf_integer(u64
, map_len
, map
->len
)
308 ctf_integer(u64
, start
, start
)
309 ctf_integer(u64
, len
, len
)
312 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
313 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
315 TP_PROTO(struct btrfs_fs_info
*fs_info
,
316 const struct extent_map
*existing
, const struct extent_map
*map
,
319 TP_ARGS(fs_info
, existing
, map
, start
, len
),
322 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
323 ctf_integer(u64
, e_start
, existing
->start
)
324 ctf_integer(u64
, e_len
, existing
->len
)
325 ctf_integer(u64
, map_start
, map
->start
)
326 ctf_integer(u64
, map_len
, map
->len
)
327 ctf_integer(u64
, start
, start
)
328 ctf_integer(u64
, len
, len
)
331 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
332 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
334 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
336 TP_ARGS(existing
, map
, start
, len
),
339 ctf_integer(u64
, e_start
, existing
->start
)
340 ctf_integer(u64
, e_len
, existing
->len
)
341 ctf_integer(u64
, map_start
, map
->start
)
342 ctf_integer(u64
, map_len
, map
->len
)
343 ctf_integer(u64
, start
, start
)
344 ctf_integer(u64
, len
, len
)
349 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
350 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
352 TP_PROTO(const struct inode
*inode
,
353 const struct btrfs_ordered_extent
*ordered
),
355 TP_ARGS(inode
, ordered
),
358 ctf_integer(ino_t
, ino
, inode
->i_ino
)
359 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
360 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
361 ctf_integer(u64
, len
, ordered
->num_bytes
)
362 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
363 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
364 ctf_integer(unsigned long, flags
, ordered
->flags
)
365 ctf_integer(int, compress_type
, ordered
->compress_type
)
366 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
367 ctf_integer(u64
, root_objectid
,
368 BTRFS_I(inode
)->root
->root_key
.objectid
)
371 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
372 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
374 TP_PROTO(const struct inode
*inode
,
375 const struct btrfs_ordered_extent
*ordered
),
377 TP_ARGS(inode
, ordered
),
380 ctf_integer(ino_t
, ino
, inode
->i_ino
)
381 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
382 ctf_integer(u64
, start
, ordered
->start
)
383 ctf_integer(u64
, len
, ordered
->len
)
384 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
385 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
386 ctf_integer(unsigned long, flags
, ordered
->flags
)
387 ctf_integer(int, compress_type
, ordered
->compress_type
)
388 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
389 ctf_integer(u64
, root_objectid
,
390 BTRFS_I(inode
)->root
->root_key
.objectid
)
393 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
394 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
396 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
398 TP_ARGS(inode
, ordered
),
401 ctf_integer(ino_t
, ino
, inode
->i_ino
)
402 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
403 ctf_integer(u64
, start
, ordered
->start
)
404 ctf_integer(u64
, len
, ordered
->len
)
405 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
406 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
407 ctf_integer(unsigned long, flags
, ordered
->flags
)
408 ctf_integer(int, compress_type
, ordered
->compress_type
)
409 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
410 ctf_integer(u64
, root_objectid
,
411 BTRFS_I(inode
)->root
->root_key
.objectid
)
414 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
415 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
416 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
417 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
418 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
420 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
422 TP_ARGS(inode
, ordered
),
425 ctf_integer(ino_t
, ino
, inode
->i_ino
)
426 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
427 ctf_integer(u64
, start
, ordered
->start
)
428 ctf_integer(u64
, len
, ordered
->len
)
429 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
430 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
431 ctf_integer(unsigned long, flags
, ordered
->flags
)
432 ctf_integer(int, compress_type
, ordered
->compress_type
)
433 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
434 ctf_integer(u64
, root_objectid
,
435 BTRFS_I(inode
)->root
->root_key
.objectid
)
439 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
441 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
443 TP_ARGS(inode
, ordered
),
446 ctf_integer(ino_t
, ino
, inode
->i_ino
)
447 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
448 ctf_integer(u64
, start
, ordered
->start
)
449 ctf_integer(u64
, len
, ordered
->len
)
450 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
451 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
452 ctf_integer(unsigned long, flags
, ordered
->flags
)
453 ctf_integer(int, compress_type
, ordered
->compress_type
)
454 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
455 ctf_integer(u64
, root_objectid
,
456 BTRFS_I(inode
)->root
->root_key
.objectid
)
461 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
462 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
463 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
464 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,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,73,5,0,0, 4,4,73,6,0,0) || \
668 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
669 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
670 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
671 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
672 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
673 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
674 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
676 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
678 TP_ARGS(fs_info
, wait
),
681 ctf_integer(int, wait
, wait
)
684 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
685 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
687 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
689 TP_ARGS(fs_info
, wait
),
692 ctf_integer(int, wait
, wait
)
696 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
703 ctf_integer(int, wait
, wait
)
708 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
709 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
711 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
712 const struct btrfs_block_group
*block_group
, int create
),
714 TP_ARGS(fs_info
, block_group
, create
),
717 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
718 ctf_integer(u64
, offset
, block_group
->start
)
719 ctf_integer(u64
, size
, block_group
->length
)
720 ctf_integer(u64
, flags
, block_group
->flags
)
721 ctf_integer(u64
, bytes_used
, block_group
->used
)
722 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
723 ctf_integer(int, create
, create
)
726 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
727 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
728 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
729 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
730 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
731 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
733 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
734 const struct btrfs_block_group_cache
*block_group
, int create
),
736 TP_ARGS(fs_info
, block_group
, create
),
739 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
740 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
741 ctf_integer(u64
, size
, block_group
->key
.offset
)
742 ctf_integer(u64
, flags
, block_group
->flags
)
743 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
744 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
745 ctf_integer(int, create
, create
)
749 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
751 TP_PROTO(struct btrfs_fs_info
*fs_info
,
752 struct btrfs_block_group_cache
*block_group
, int create
),
754 TP_ARGS(fs_info
, block_group
, create
),
757 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
758 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
759 ctf_integer(u64
, size
, block_group
->key
.offset
)
760 ctf_integer(u64
, flags
, block_group
->flags
)
761 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
762 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
763 ctf_integer(int, create
, create
)
768 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
769 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
770 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
771 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
772 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
773 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
774 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
775 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
776 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
778 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
779 const struct btrfs_delayed_ref_node
*ref
,
780 const struct btrfs_delayed_tree_ref
*full_ref
,
783 TP_ARGS(fs_info
, ref
, full_ref
, action
),
786 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
787 ctf_integer(u64
, bytenr
, ref
->bytenr
)
788 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
789 ctf_integer(int, action
, action
)
790 ctf_integer(u64
, parent
, full_ref
->parent
)
791 ctf_integer(u64
, ref_root
, full_ref
->root
)
792 ctf_integer(int, level
, full_ref
->level
)
793 ctf_integer(int, type
, ref
->type
)
794 ctf_integer(u64
, seq
, ref
->seq
)
798 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
800 add_delayed_tree_ref
,
802 btrfs_add_delayed_tree_ref
,
804 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
805 const struct btrfs_delayed_ref_node
*ref
,
806 const struct btrfs_delayed_tree_ref
*full_ref
,
809 TP_ARGS(fs_info
, ref
, full_ref
, action
)
812 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
814 run_delayed_tree_ref
,
816 btrfs_run_delayed_tree_ref
,
818 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
819 const struct btrfs_delayed_ref_node
*ref
,
820 const struct btrfs_delayed_tree_ref
*full_ref
,
823 TP_ARGS(fs_info
, ref
, full_ref
, action
)
825 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
826 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
828 TP_PROTO(struct btrfs_fs_info
*fs_info
,
829 struct btrfs_delayed_ref_node
*ref
,
830 struct btrfs_delayed_tree_ref
*full_ref
,
833 TP_ARGS(fs_info
, ref
, full_ref
, action
),
836 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
837 ctf_integer(u64
, bytenr
, ref
->bytenr
)
838 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
839 ctf_integer(int, action
, action
)
840 ctf_integer(u64
, parent
, full_ref
->parent
)
841 ctf_integer(u64
, ref_root
, full_ref
->root
)
842 ctf_integer(int, level
, full_ref
->level
)
843 ctf_integer(int, type
, ref
->type
)
844 ctf_integer(u64
, seq
, ref
->seq
)
848 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
850 add_delayed_tree_ref
,
852 btrfs_add_delayed_tree_ref
,
854 TP_PROTO(struct btrfs_fs_info
*fs_info
,
855 struct btrfs_delayed_ref_node
*ref
,
856 struct btrfs_delayed_tree_ref
*full_ref
,
859 TP_ARGS(fs_info
, ref
, full_ref
, action
)
862 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
864 run_delayed_tree_ref
,
866 btrfs_run_delayed_tree_ref
,
868 TP_PROTO(struct btrfs_fs_info
*fs_info
,
869 struct btrfs_delayed_ref_node
*ref
,
870 struct btrfs_delayed_tree_ref
*full_ref
,
873 TP_ARGS(fs_info
, ref
, full_ref
, action
)
875 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
876 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
878 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
879 const struct btrfs_delayed_tree_ref
*full_ref
,
882 TP_ARGS(ref
, full_ref
, action
),
885 ctf_integer(u64
, bytenr
, ref
->bytenr
)
886 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
887 ctf_integer(int, action
, action
)
888 ctf_integer(u64
, parent
, full_ref
->parent
)
889 ctf_integer(u64
, ref_root
, full_ref
->root
)
890 ctf_integer(int, level
, full_ref
->level
)
891 ctf_integer(int, type
, ref
->type
)
892 ctf_integer(u64
, seq
, ref
->seq
)
896 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
898 add_delayed_tree_ref
,
900 btrfs_add_delayed_tree_ref
,
902 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
903 const struct btrfs_delayed_tree_ref
*full_ref
,
906 TP_ARGS(ref
, full_ref
, action
)
909 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
911 run_delayed_tree_ref
,
913 btrfs_run_delayed_tree_ref
,
915 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
916 const struct btrfs_delayed_tree_ref
*full_ref
,
919 TP_ARGS(ref
, full_ref
, action
)
921 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
922 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
924 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
925 struct btrfs_delayed_tree_ref
*full_ref
,
928 TP_ARGS(ref
, full_ref
, action
),
931 ctf_integer(u64
, bytenr
, ref
->bytenr
)
932 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
933 ctf_integer(int, action
, action
)
934 ctf_integer(u64
, parent
, full_ref
->parent
)
935 ctf_integer(u64
, ref_root
, full_ref
->root
)
936 ctf_integer(int, level
, full_ref
->level
)
937 ctf_integer(int, type
, ref
->type
)
938 ctf_integer(u64
, seq
, ref
->seq
)
942 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
944 add_delayed_tree_ref
,
946 btrfs_add_delayed_tree_ref
,
948 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
949 struct btrfs_delayed_tree_ref
*full_ref
,
952 TP_ARGS(ref
, full_ref
, action
)
955 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
957 run_delayed_tree_ref
,
959 btrfs_run_delayed_tree_ref
,
961 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
962 struct btrfs_delayed_tree_ref
*full_ref
,
965 TP_ARGS(ref
, full_ref
, action
)
967 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
968 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
970 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
971 struct btrfs_delayed_tree_ref
*full_ref
,
974 TP_ARGS(ref
, full_ref
, action
),
977 ctf_integer(u64
, bytenr
, ref
->bytenr
)
978 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
979 ctf_integer(int, action
, action
)
980 ctf_integer(u64
, parent
, full_ref
->parent
)
981 ctf_integer(u64
, ref_root
, full_ref
->root
)
982 ctf_integer(int, level
, full_ref
->level
)
983 ctf_integer(int, type
, ref
->type
)
984 ctf_integer(u64
, seq
, ref
->seq
)
988 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
990 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
991 struct btrfs_delayed_tree_ref
*full_ref
,
994 TP_ARGS(ref
, full_ref
, action
),
997 ctf_integer(u64
, bytenr
, ref
->bytenr
)
998 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
999 ctf_integer(int, action
, action
)
1000 ctf_integer(u64
, parent
, full_ref
->parent
)
1001 ctf_integer(u64
, ref_root
, full_ref
->root
)
1002 ctf_integer(int, level
, full_ref
->level
)
1003 ctf_integer(int, type
, ref
->type
)
1008 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1009 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1010 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1011 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1012 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1013 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1014 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1015 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1016 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1018 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1019 const struct btrfs_delayed_ref_node
*ref
,
1020 const struct btrfs_delayed_data_ref
*full_ref
,
1023 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1026 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1027 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1028 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1029 ctf_integer(int, action
, action
)
1030 ctf_integer(u64
, parent
, full_ref
->parent
)
1031 ctf_integer(u64
, ref_root
, full_ref
->root
)
1032 ctf_integer(u64
, owner
, full_ref
->objectid
)
1033 ctf_integer(u64
, offset
, full_ref
->offset
)
1034 ctf_integer(int, type
, ref
->type
)
1035 ctf_integer(u64
, seq
, ref
->seq
)
1039 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1041 add_delayed_data_ref
,
1043 btrfs_add_delayed_data_ref
,
1045 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1046 const struct btrfs_delayed_ref_node
*ref
,
1047 const struct btrfs_delayed_data_ref
*full_ref
,
1050 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1053 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1055 run_delayed_data_ref
,
1057 btrfs_run_delayed_data_ref
,
1059 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1060 const struct btrfs_delayed_ref_node
*ref
,
1061 const struct btrfs_delayed_data_ref
*full_ref
,
1064 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1066 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1067 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1069 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1070 struct btrfs_delayed_ref_node
*ref
,
1071 struct btrfs_delayed_data_ref
*full_ref
,
1074 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1077 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1078 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1079 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1080 ctf_integer(int, action
, action
)
1081 ctf_integer(u64
, parent
, full_ref
->parent
)
1082 ctf_integer(u64
, ref_root
, full_ref
->root
)
1083 ctf_integer(u64
, owner
, full_ref
->objectid
)
1084 ctf_integer(u64
, offset
, full_ref
->offset
)
1085 ctf_integer(int, type
, ref
->type
)
1086 ctf_integer(u64
, seq
, ref
->seq
)
1090 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1092 add_delayed_data_ref
,
1094 btrfs_add_delayed_data_ref
,
1096 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1097 struct btrfs_delayed_ref_node
*ref
,
1098 struct btrfs_delayed_data_ref
*full_ref
,
1101 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1104 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1106 run_delayed_data_ref
,
1108 btrfs_run_delayed_data_ref
,
1110 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1111 struct btrfs_delayed_ref_node
*ref
,
1112 struct btrfs_delayed_data_ref
*full_ref
,
1115 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1117 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1118 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1120 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1121 const struct btrfs_delayed_data_ref
*full_ref
,
1124 TP_ARGS(ref
, full_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(u64
, parent
, full_ref
->parent
)
1131 ctf_integer(u64
, ref_root
, full_ref
->root
)
1132 ctf_integer(u64
, owner
, full_ref
->objectid
)
1133 ctf_integer(u64
, offset
, full_ref
->offset
)
1134 ctf_integer(int, type
, ref
->type
)
1135 ctf_integer(u64
, seq
, ref
->seq
)
1139 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1141 add_delayed_data_ref
,
1143 btrfs_add_delayed_data_ref
,
1145 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1146 const struct btrfs_delayed_data_ref
*full_ref
,
1149 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1152 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1154 run_delayed_data_ref
,
1156 btrfs_run_delayed_data_ref
,
1158 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1159 const struct btrfs_delayed_data_ref
*full_ref
,
1162 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1164 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1165 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1167 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1168 struct btrfs_delayed_data_ref
*full_ref
,
1171 TP_ARGS(ref
, full_ref
, action
),
1174 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1175 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1176 ctf_integer(int, action
, action
)
1177 ctf_integer(u64
, parent
, full_ref
->parent
)
1178 ctf_integer(u64
, ref_root
, full_ref
->root
)
1179 ctf_integer(u64
, owner
, full_ref
->objectid
)
1180 ctf_integer(u64
, offset
, full_ref
->offset
)
1181 ctf_integer(int, type
, ref
->type
)
1182 ctf_integer(u64
, seq
, ref
->seq
)
1186 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1188 add_delayed_data_ref
,
1190 btrfs_add_delayed_data_ref
,
1192 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1193 struct btrfs_delayed_data_ref
*full_ref
,
1196 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1199 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1201 run_delayed_data_ref
,
1203 btrfs_run_delayed_data_ref
,
1205 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1206 struct btrfs_delayed_data_ref
*full_ref
,
1209 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1211 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1212 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1214 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1215 struct btrfs_delayed_data_ref
*full_ref
,
1218 TP_ARGS(ref
, full_ref
, action
),
1221 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1222 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1223 ctf_integer(int, action
, action
)
1224 ctf_integer(u64
, parent
, full_ref
->parent
)
1225 ctf_integer(u64
, ref_root
, full_ref
->root
)
1226 ctf_integer(u64
, owner
, full_ref
->objectid
)
1227 ctf_integer(u64
, offset
, full_ref
->offset
)
1228 ctf_integer(int, type
, ref
->type
)
1229 ctf_integer(u64
, seq
, ref
->seq
)
1233 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1235 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1236 struct btrfs_delayed_data_ref
*full_ref
,
1239 TP_ARGS(ref
, full_ref
, action
),
1242 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1243 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1244 ctf_integer(int, action
, action
)
1245 ctf_integer(u64
, parent
, full_ref
->parent
)
1246 ctf_integer(u64
, ref_root
, full_ref
->root
)
1247 ctf_integer(u64
, owner
, full_ref
->objectid
)
1248 ctf_integer(u64
, offset
, full_ref
->offset
)
1249 ctf_integer(int, type
, ref
->type
)
1254 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1255 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1257 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1258 const struct btrfs_delayed_ref_head
*head_ref
,
1261 TP_ARGS(fs_info
, head_ref
, action
),
1264 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1265 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1266 ctf_integer(int, action
, action
)
1267 ctf_integer(int, is_data
, head_ref
->is_data
)
1271 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1273 add_delayed_ref_head
,
1275 btrfs_add_delayed_ref_head
,
1277 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1278 const struct btrfs_delayed_ref_head
*head_ref
,
1281 TP_ARGS(fs_info
, head_ref
, action
)
1284 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1286 run_delayed_ref_head
,
1288 btrfs_run_delayed_ref_head
,
1290 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1291 const struct btrfs_delayed_ref_head
*head_ref
,
1294 TP_ARGS(fs_info
, head_ref
, action
)
1297 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1298 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1299 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1300 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1301 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1302 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1303 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1304 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1306 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1308 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1309 const struct btrfs_delayed_ref_node
*ref
,
1310 const struct btrfs_delayed_ref_head
*head_ref
,
1313 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1316 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1317 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1318 ctf_integer(int, action
, action
)
1319 ctf_integer(int, is_data
, head_ref
->is_data
)
1323 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1325 add_delayed_ref_head
,
1327 btrfs_add_delayed_ref_head
,
1329 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1330 const struct btrfs_delayed_ref_node
*ref
,
1331 const struct btrfs_delayed_ref_head
*head_ref
,
1334 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1337 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1339 run_delayed_ref_head
,
1341 btrfs_run_delayed_ref_head
,
1343 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1344 const struct btrfs_delayed_ref_node
*ref
,
1345 const struct btrfs_delayed_ref_head
*head_ref
,
1348 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1351 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1352 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1354 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1355 struct btrfs_delayed_ref_node
*ref
,
1356 struct btrfs_delayed_ref_head
*head_ref
,
1359 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1362 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1363 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1364 ctf_integer(int, action
, action
)
1365 ctf_integer(int, is_data
, head_ref
->is_data
)
1369 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1371 add_delayed_ref_head
,
1373 btrfs_add_delayed_ref_head
,
1375 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1376 struct btrfs_delayed_ref_node
*ref
,
1377 struct btrfs_delayed_ref_head
*head_ref
,
1380 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1383 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1385 run_delayed_ref_head
,
1387 btrfs_run_delayed_ref_head
,
1389 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1390 struct btrfs_delayed_ref_node
*ref
,
1391 struct btrfs_delayed_ref_head
*head_ref
,
1394 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1397 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1398 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1400 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1401 const struct btrfs_delayed_ref_head
*head_ref
,
1404 TP_ARGS(ref
, head_ref
, action
),
1407 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1408 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1409 ctf_integer(int, action
, action
)
1410 ctf_integer(int, is_data
, head_ref
->is_data
)
1414 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1416 add_delayed_ref_head
,
1418 btrfs_add_delayed_ref_head
,
1420 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1421 const struct btrfs_delayed_ref_head
*head_ref
,
1424 TP_ARGS(ref
, head_ref
, action
)
1427 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1429 run_delayed_ref_head
,
1431 btrfs_run_delayed_ref_head
,
1433 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1434 const struct btrfs_delayed_ref_head
*head_ref
,
1437 TP_ARGS(ref
, head_ref
, action
)
1440 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1441 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1443 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1444 struct btrfs_delayed_ref_head
*head_ref
,
1447 TP_ARGS(ref
, head_ref
, action
),
1450 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1451 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1452 ctf_integer(int, action
, action
)
1453 ctf_integer(int, is_data
, head_ref
->is_data
)
1457 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1459 add_delayed_ref_head
,
1461 btrfs_add_delayed_ref_head
,
1463 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1464 struct btrfs_delayed_ref_head
*head_ref
,
1467 TP_ARGS(ref
, head_ref
, action
)
1470 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1472 run_delayed_ref_head
,
1474 btrfs_run_delayed_ref_head
,
1476 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1477 struct btrfs_delayed_ref_head
*head_ref
,
1480 TP_ARGS(ref
, head_ref
, action
)
1484 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1486 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1487 struct btrfs_delayed_ref_head
*head_ref
,
1490 TP_ARGS(ref
, head_ref
, action
),
1493 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1494 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1495 ctf_integer(int, action
, action
)
1496 ctf_integer(int, is_data
, head_ref
->is_data
)
1501 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1503 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1505 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1506 u64 offset
, u64 size
),
1508 TP_ARGS(fs_info
, map
, offset
, size
),
1511 ctf_integer(int, num_stripes
, map
->num_stripes
)
1512 ctf_integer(u64
, type
, map
->type
)
1513 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1514 ctf_integer(u64
, offset
, offset
)
1515 ctf_integer(u64
, size
, size
)
1516 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1520 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1522 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1523 u64 offset
, u64 size
),
1525 TP_ARGS(fs_info
, map
, offset
, size
)
1528 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1530 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1531 u64 offset
, u64 size
),
1533 TP_ARGS(fs_info
, map
, offset
, size
)
1536 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1538 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1540 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1541 u64 offset
, u64 size
),
1543 TP_ARGS(fs_info
, map
, offset
, size
),
1546 ctf_integer(int, num_stripes
, map
->num_stripes
)
1547 ctf_integer(u64
, type
, map
->type
)
1548 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1549 ctf_integer(u64
, offset
, offset
)
1550 ctf_integer(u64
, size
, size
)
1551 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1555 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1557 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1558 u64 offset
, u64 size
),
1560 TP_ARGS(fs_info
, map
, offset
, size
)
1563 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1565 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1566 u64 offset
, u64 size
),
1568 TP_ARGS(fs_info
, map
, offset
, size
)
1571 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1572 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1573 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1574 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1576 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1578 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1579 u64 offset
, u64 size
),
1581 TP_ARGS(root
, map
, offset
, size
),
1584 ctf_integer(int, num_stripes
, map
->num_stripes
)
1585 ctf_integer(u64
, type
, map
->type
)
1586 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1587 ctf_integer(u64
, offset
, offset
)
1588 ctf_integer(u64
, size
, size
)
1589 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1593 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1595 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1596 u64 offset
, u64 size
),
1598 TP_ARGS(root
, map
, offset
, size
)
1601 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1603 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1604 u64 offset
, u64 size
),
1606 TP_ARGS(root
, map
, offset
, size
)
1609 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1611 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1613 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1614 u64 offset
, u64 size
),
1616 TP_ARGS(root
, map
, offset
, size
),
1619 ctf_integer(int, num_stripes
, map
->num_stripes
)
1620 ctf_integer(u64
, type
, map
->type
)
1621 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1622 ctf_integer(u64
, offset
, offset
)
1623 ctf_integer(u64
, size
, size
)
1624 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1628 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1630 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1631 u64 offset
, u64 size
),
1633 TP_ARGS(root
, map
, offset
, size
)
1636 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1638 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1639 u64 offset
, u64 size
),
1641 TP_ARGS(root
, map
, offset
, size
)
1644 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1646 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1647 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1648 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1649 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1650 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1651 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1653 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1654 const struct extent_buffer
*cow
),
1656 TP_ARGS(root
, buf
, cow
),
1659 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1660 ctf_integer(u64
, buf_start
, buf
->start
)
1661 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1662 ctf_integer(u64
, cow_start
, cow
->start
)
1663 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1664 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1668 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1670 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1671 struct extent_buffer
*cow
),
1673 TP_ARGS(root
, buf
, cow
),
1676 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1677 ctf_integer(u64
, buf_start
, buf
->start
)
1678 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1679 ctf_integer(u64
, cow_start
, cow
->start
)
1680 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1681 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1686 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1687 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1689 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const char *type
, u64 val
,
1690 u64 bytes
, int reserve
),
1692 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1695 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1696 ctf_string(type
, type
)
1697 ctf_integer(u64
, val
, val
)
1698 ctf_integer(u64
, bytes
, bytes
)
1699 ctf_integer(int, reserve
, reserve
)
1702 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1703 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1704 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1705 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1706 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1707 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1709 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1710 u64 bytes
, int reserve
),
1712 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1715 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1716 ctf_string(type
, type
)
1717 ctf_integer(u64
, val
, val
)
1718 ctf_integer(u64
, bytes
, bytes
)
1719 ctf_integer(int, reserve
, reserve
)
1722 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1723 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1725 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1726 u64 bytes
, int reserve
),
1728 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1731 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1732 ctf_string(type
, type
)
1733 ctf_integer(u64
, val
, val
)
1734 ctf_integer(u64
, bytes
, bytes
)
1735 ctf_integer(int, reserve
, reserve
)
1740 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1742 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1744 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1746 TP_ARGS(fs_info
, start
, len
),
1749 ctf_integer(u64
, start
, start
)
1750 ctf_integer(u64
, len
, len
)
1754 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1756 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1758 TP_ARGS(fs_info
, start
, len
)
1761 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1763 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1765 TP_ARGS(fs_info
, start
, len
)
1768 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1770 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1772 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1774 TP_ARGS(fs_info
, start
, len
),
1777 ctf_integer(u64
, start
, start
)
1778 ctf_integer(u64
, len
, len
)
1782 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1784 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1786 TP_ARGS(fs_info
, start
, len
)
1789 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1791 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1793 TP_ARGS(fs_info
, start
, len
)
1796 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1797 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1798 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1799 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1801 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1803 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1805 TP_ARGS(root
, start
, len
),
1808 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1809 ctf_integer(u64
, start
, start
)
1810 ctf_integer(u64
, len
, len
)
1814 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1816 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1818 TP_ARGS(root
, start
, len
)
1821 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1823 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1825 TP_ARGS(root
, start
, len
)
1828 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1830 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1832 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1834 TP_ARGS(root
, start
, len
),
1837 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1838 ctf_integer(u64
, start
, start
)
1839 ctf_integer(u64
, len
, len
)
1843 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1845 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1847 TP_ARGS(root
, start
, len
)
1850 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1852 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1854 TP_ARGS(root
, start
, len
)
1857 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1859 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
1860 LTTNG_KERNEL_RANGE(5,9,6, 5,10,0) || \
1861 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
1862 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1864 btrfs_find_free_extent
,
1866 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1869 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1872 ctf_array(u8
, fsid
, root
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1873 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1874 ctf_integer(u64
, num_bytes
, num_bytes
)
1875 ctf_integer(u64
, empty_size
, empty_size
)
1876 ctf_integer(u64
, data
, data
)
1880 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1882 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1884 btrfs_find_free_extent
,
1886 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1889 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1892 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1893 ctf_integer(u64
, num_bytes
, num_bytes
)
1894 ctf_integer(u64
, empty_size
, empty_size
)
1895 ctf_integer(u64
, data
, data
)
1899 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1901 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1903 btrfs_find_free_extent
,
1905 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1908 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1911 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1912 ctf_integer(u64
, num_bytes
, num_bytes
)
1913 ctf_integer(u64
, empty_size
, empty_size
)
1914 ctf_integer(u64
, data
, data
)
1918 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1920 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1922 btrfs_find_free_extent
,
1924 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1927 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1930 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1931 ctf_integer(u64
, num_bytes
, num_bytes
)
1932 ctf_integer(u64
, empty_size
, empty_size
)
1933 ctf_integer(u64
, data
, data
)
1937 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1939 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1941 btrfs_find_free_extent
,
1943 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1946 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1949 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1950 ctf_integer(u64
, num_bytes
, num_bytes
)
1951 ctf_integer(u64
, empty_size
, empty_size
)
1952 ctf_integer(u64
, data
, data
)
1956 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1957 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1958 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1959 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1961 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1963 btrfs_find_free_extent
,
1965 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1968 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1971 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1972 ctf_integer(u64
, num_bytes
, num_bytes
)
1973 ctf_integer(u64
, empty_size
, empty_size
)
1974 ctf_integer(u64
, data
, data
)
1977 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1979 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1981 btrfs_find_free_extent
,
1983 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1986 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1989 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1990 ctf_integer(u64
, num_bytes
, num_bytes
)
1991 ctf_integer(u64
, empty_size
, empty_size
)
1992 ctf_integer(u64
, data
, data
)
1997 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1998 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2000 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2003 TP_ARGS(block_group
, start
, len
),
2006 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2007 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2008 ctf_integer(u64
, flags
, block_group
->flags
)
2009 ctf_integer(u64
, start
, start
)
2010 ctf_integer(u64
, len
, len
)
2014 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2016 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2019 TP_ARGS(block_group
, start
, len
)
2022 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2024 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2027 TP_ARGS(block_group
, start
, len
)
2030 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
2032 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2034 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2037 TP_ARGS(block_group
, start
, len
),
2040 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2041 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2042 ctf_integer(u64
, flags
, block_group
->flags
)
2043 ctf_integer(u64
, start
, start
)
2044 ctf_integer(u64
, len
, len
)
2048 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2050 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2053 TP_ARGS(block_group
, start
, len
)
2056 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2058 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2061 TP_ARGS(block_group
, start
, len
)
2064 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
2066 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2068 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2069 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2072 TP_ARGS(fs_info
, block_group
, start
, len
),
2075 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
2076 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2077 ctf_integer(u64
, flags
, block_group
->flags
)
2078 ctf_integer(u64
, start
, start
)
2079 ctf_integer(u64
, len
, len
)
2083 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2085 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2086 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2089 TP_ARGS(fs_info
, block_group
, start
, len
)
2092 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2094 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
2095 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2098 TP_ARGS(fs_info
, block_group
, start
, len
)
2101 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
2103 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2105 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2106 struct btrfs_block_group_cache
*block_group
, u64 start
,
2109 TP_ARGS(fs_info
, block_group
, start
, len
),
2112 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2113 ctf_integer(u64
, flags
, block_group
->flags
)
2114 ctf_integer(u64
, start
, start
)
2115 ctf_integer(u64
, len
, len
)
2119 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2121 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2122 struct btrfs_block_group_cache
*block_group
, u64 start
,
2125 TP_ARGS(fs_info
, block_group
, start
, len
)
2128 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2130 TP_PROTO(struct btrfs_fs_info
*fs_info
,
2131 struct btrfs_block_group_cache
*block_group
, u64 start
,
2134 TP_ARGS(fs_info
, block_group
, start
, len
)
2136 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2137 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2138 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2139 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2141 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2143 TP_PROTO(const struct btrfs_root
*root
,
2144 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2147 TP_ARGS(root
, block_group
, start
, len
),
2150 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2151 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2152 ctf_integer(u64
, flags
, block_group
->flags
)
2153 ctf_integer(u64
, start
, start
)
2154 ctf_integer(u64
, len
, len
)
2158 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2160 TP_PROTO(const struct btrfs_root
*root
,
2161 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2164 TP_ARGS(root
, block_group
, start
, len
)
2167 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2169 TP_PROTO(const struct btrfs_root
*root
,
2170 const struct btrfs_block_group_cache
*block_group
, u64 start
,
2173 TP_ARGS(root
, block_group
, start
, len
)
2176 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2178 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2180 TP_PROTO(struct btrfs_root
*root
,
2181 struct btrfs_block_group_cache
*block_group
, u64 start
,
2184 TP_ARGS(root
, block_group
, start
, len
),
2187 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2188 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2189 ctf_integer(u64
, flags
, block_group
->flags
)
2190 ctf_integer(u64
, start
, start
)
2191 ctf_integer(u64
, len
, len
)
2195 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2197 TP_PROTO(struct btrfs_root
*root
,
2198 struct btrfs_block_group_cache
*block_group
, u64 start
,
2201 TP_ARGS(root
, block_group
, start
, len
)
2204 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2206 TP_PROTO(struct btrfs_root
*root
,
2207 struct btrfs_block_group_cache
*block_group
, u64 start
,
2210 TP_ARGS(root
, block_group
, start
, len
)
2213 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
2215 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
2216 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2218 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
2219 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2221 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2224 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2225 ctf_integer(u64
, flags
, block_group
->flags
)
2226 ctf_integer(u64
, start
, start
)
2227 ctf_integer(u64
, bytes
, bytes
)
2228 ctf_integer(u64
, empty_size
, empty_size
)
2229 ctf_integer(u64
, min_bytes
, min_bytes
)
2233 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2235 TP_PROTO(const struct btrfs_block_group
*block_group
),
2237 TP_ARGS(block_group
),
2240 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2244 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2246 TP_PROTO(const struct btrfs_block_group
*block_group
,
2247 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2249 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2252 ctf_integer(u64
, bg_objectid
, block_group
->start
)
2253 ctf_integer(u64
, flags
, block_group
->flags
)
2254 ctf_integer(u64
, start
, cluster
->window_start
)
2255 ctf_integer(u64
, max_size
, cluster
->max_size
)
2256 ctf_integer(u64
, size
, size
)
2257 ctf_integer(int, bitmap
, bitmap
)
2260 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2261 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2262 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2263 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2264 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2265 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2267 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2268 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2270 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2273 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2274 ctf_integer(u64
, flags
, block_group
->flags
)
2275 ctf_integer(u64
, start
, start
)
2276 ctf_integer(u64
, bytes
, bytes
)
2277 ctf_integer(u64
, empty_size
, empty_size
)
2278 ctf_integer(u64
, min_bytes
, min_bytes
)
2282 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2284 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2286 TP_ARGS(block_group
),
2289 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2293 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2295 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2296 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2298 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2301 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2302 ctf_integer(u64
, flags
, block_group
->flags
)
2303 ctf_integer(u64
, start
, cluster
->window_start
)
2304 ctf_integer(u64
, max_size
, cluster
->max_size
)
2305 ctf_integer(u64
, size
, size
)
2306 ctf_integer(int, bitmap
, bitmap
)
2309 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2310 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2312 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2313 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2315 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2318 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2319 ctf_integer(u64
, flags
, block_group
->flags
)
2320 ctf_integer(u64
, start
, start
)
2321 ctf_integer(u64
, bytes
, bytes
)
2322 ctf_integer(u64
, empty_size
, empty_size
)
2323 ctf_integer(u64
, min_bytes
, min_bytes
)
2327 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2329 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2331 TP_ARGS(block_group
),
2334 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2338 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2340 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2341 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2343 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2346 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2347 ctf_integer(u64
, flags
, block_group
->flags
)
2348 ctf_integer(u64
, start
, cluster
->window_start
)
2349 ctf_integer(u64
, max_size
, cluster
->max_size
)
2350 ctf_integer(u64
, size
, size
)
2351 ctf_integer(int, bitmap
, bitmap
)
2356 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2357 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2358 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2359 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2360 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2361 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2363 btrfs_alloc_extent_state
,
2365 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2367 TP_ARGS(state
, mask
, IP
),
2370 ctf_integer_hex(const struct extent_state
*, state
, state
)
2371 ctf_integer(gfp_t
, mask
, mask
)
2372 ctf_integer(unsigned long, ip
, IP
)
2376 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2378 btrfs_free_extent_state
,
2380 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2385 ctf_integer_hex(const struct extent_state
*, state
, state
)
2386 ctf_integer(unsigned long, ip
, IP
)
2389 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
2390 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2392 btrfs_alloc_extent_state
,
2394 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2396 TP_ARGS(state
, mask
, IP
),
2399 ctf_integer_hex(struct extent_state
*, state
, state
)
2400 ctf_integer(gfp_t
, mask
, mask
)
2401 ctf_integer(unsigned long, ip
, IP
)
2405 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2407 btrfs_free_extent_state
,
2409 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2414 ctf_integer_hex(struct extent_state
*, state
, state
)
2415 ctf_integer(unsigned long, ip
, IP
)
2420 #endif /* LTTNG_TRACE_BTRFS_H */
2422 /* This part must be outside protection */
2423 #include <probes/define_trace.h>