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(5,5,0))
23 struct btrfs_block_group
;
24 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
25 struct btrfs_block_group_cache
;
27 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
28 struct btrfs_free_cluster
;
32 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
37 #define BTRFS_UUID_SIZE 16
39 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
40 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
42 #define lttng_fs_info_fsid fs_info->fsid
45 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
46 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
47 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
48 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
49 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
50 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
52 TP_PROTO(const struct btrfs_root
*root
),
57 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
58 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
62 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
64 TP_PROTO(const struct inode
*inode
),
69 ctf_integer(ino_t
, ino
, inode
->i_ino
)
70 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
71 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
72 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
73 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
74 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
75 ctf_integer(u64
, root_objectid
,
76 BTRFS_I(inode
)->root
->root_key
.objectid
)
80 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
82 TP_PROTO(const struct inode
*inode
),
87 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
89 TP_PROTO(const struct inode
*inode
),
94 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
96 TP_PROTO(const struct inode
*inode
),
101 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
103 TP_PROTO(struct btrfs_root
*root
),
108 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
109 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
113 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
115 TP_PROTO(struct inode
*inode
),
120 ctf_integer(ino_t
, ino
, inode
->i_ino
)
121 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
122 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
123 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
124 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
125 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
126 ctf_integer(u64
, root_objectid
,
127 BTRFS_I(inode
)->root
->root_key
.objectid
)
131 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
133 TP_PROTO(struct inode
*inode
),
138 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
140 TP_PROTO(struct inode
*inode
),
145 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
147 TP_PROTO(struct inode
*inode
),
153 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
155 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
157 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
158 const struct extent_map
*map
),
160 TP_ARGS(root
, inode
, map
),
163 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
164 ctf_integer(u64
, ino
, btrfs_ino(inode
))
165 ctf_integer(u64
, start
, map
->start
)
166 ctf_integer(u64
, len
, map
->len
)
167 ctf_integer(u64
, orig_start
, map
->orig_start
)
168 ctf_integer(u64
, block_start
, map
->block_start
)
169 ctf_integer(u64
, block_len
, map
->block_len
)
170 ctf_integer(unsigned long, flags
, map
->flags
)
171 ctf_integer(int, refs
, refcount_read(&map
->refs
))
172 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
176 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
178 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
180 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
181 struct extent_map
*map
),
183 TP_ARGS(root
, inode
, map
),
186 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
187 ctf_integer(u64
, ino
, btrfs_ino(inode
))
188 ctf_integer(u64
, start
, map
->start
)
189 ctf_integer(u64
, len
, map
->len
)
190 ctf_integer(u64
, orig_start
, map
->orig_start
)
191 ctf_integer(u64
, block_start
, map
->block_start
)
192 ctf_integer(u64
, block_len
, map
->block_len
)
193 ctf_integer(unsigned long, flags
, map
->flags
)
194 ctf_integer(int, refs
, refcount_read(&map
->refs
))
195 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
199 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
201 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
203 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
204 struct extent_map
*map
),
206 TP_ARGS(root
, inode
, map
),
209 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
210 ctf_integer(u64
, ino
, btrfs_ino(inode
))
211 ctf_integer(u64
, start
, map
->start
)
212 ctf_integer(u64
, len
, map
->len
)
213 ctf_integer(u64
, orig_start
, map
->orig_start
)
214 ctf_integer(u64
, block_start
, map
->block_start
)
215 ctf_integer(u64
, block_len
, map
->block_len
)
216 ctf_integer(unsigned long, flags
, map
->flags
)
217 ctf_integer(int, refs
, atomic_read(&map
->refs
))
218 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
222 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
224 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
226 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
227 struct extent_map
*map
),
229 TP_ARGS(root
, inode
, map
),
232 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
233 ctf_integer(u64
, ino
, btrfs_ino(inode
))
234 ctf_integer(u64
, start
, map
->start
)
235 ctf_integer(u64
, len
, map
->len
)
236 ctf_integer(u64
, orig_start
, map
->orig_start
)
237 ctf_integer(u64
, block_start
, map
->block_start
)
238 ctf_integer(u64
, block_len
, map
->block_len
)
239 ctf_integer(unsigned long, flags
, map
->flags
)
240 ctf_integer(int, refs
, atomic_read(&map
->refs
))
241 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
245 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
246 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
247 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
248 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
250 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
252 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
257 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
258 ctf_integer(u64
, start
, map
->start
)
259 ctf_integer(u64
, len
, map
->len
)
260 ctf_integer(u64
, orig_start
, map
->orig_start
)
261 ctf_integer(u64
, block_start
, map
->block_start
)
262 ctf_integer(u64
, block_len
, map
->block_len
)
263 ctf_integer(unsigned long, flags
, map
->flags
)
264 ctf_integer(int, refs
, atomic_read(&map
->refs
))
265 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
269 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
271 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
273 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
278 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
279 ctf_integer(u64
, start
, map
->start
)
280 ctf_integer(u64
, len
, map
->len
)
281 ctf_integer(u64
, orig_start
, map
->orig_start
)
282 ctf_integer(u64
, block_start
, map
->block_start
)
283 ctf_integer(u64
, block_len
, map
->block_len
)
284 ctf_integer(unsigned long, flags
, map
->flags
)
285 ctf_integer(int, refs
, atomic_read(&map
->refs
))
286 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
290 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
292 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
293 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
295 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
296 const struct extent_map
*existing
, const struct extent_map
*map
,
299 TP_ARGS(fs_info
, existing
, map
, start
, len
),
302 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
303 ctf_integer(u64
, e_start
, existing
->start
)
304 ctf_integer(u64
, e_len
, existing
->len
)
305 ctf_integer(u64
, map_start
, map
->start
)
306 ctf_integer(u64
, map_len
, map
->len
)
307 ctf_integer(u64
, start
, start
)
308 ctf_integer(u64
, len
, len
)
311 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
312 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
314 TP_PROTO(struct btrfs_fs_info
*fs_info
,
315 const struct extent_map
*existing
, const struct extent_map
*map
,
318 TP_ARGS(fs_info
, existing
, map
, start
, len
),
321 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
322 ctf_integer(u64
, e_start
, existing
->start
)
323 ctf_integer(u64
, e_len
, existing
->len
)
324 ctf_integer(u64
, map_start
, map
->start
)
325 ctf_integer(u64
, map_len
, map
->len
)
326 ctf_integer(u64
, start
, start
)
327 ctf_integer(u64
, len
, len
)
330 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
331 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
333 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
335 TP_ARGS(existing
, map
, start
, len
),
338 ctf_integer(u64
, e_start
, existing
->start
)
339 ctf_integer(u64
, e_len
, existing
->len
)
340 ctf_integer(u64
, map_start
, map
->start
)
341 ctf_integer(u64
, map_len
, map
->len
)
342 ctf_integer(u64
, start
, start
)
343 ctf_integer(u64
, len
, len
)
348 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
349 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
351 TP_PROTO(const struct inode
*inode
,
352 const struct btrfs_ordered_extent
*ordered
),
354 TP_ARGS(inode
, ordered
),
357 ctf_integer(ino_t
, ino
, inode
->i_ino
)
358 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
359 ctf_integer(u64
, start
, ordered
->disk_bytenr
)
360 ctf_integer(u64
, len
, ordered
->num_bytes
)
361 ctf_integer(u64
, disk_len
, ordered
->disk_num_bytes
)
362 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
363 ctf_integer(unsigned long, flags
, ordered
->flags
)
364 ctf_integer(int, compress_type
, ordered
->compress_type
)
365 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
366 ctf_integer(u64
, root_objectid
,
367 BTRFS_I(inode
)->root
->root_key
.objectid
)
370 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
371 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
373 TP_PROTO(const struct inode
*inode
,
374 const struct btrfs_ordered_extent
*ordered
),
376 TP_ARGS(inode
, ordered
),
379 ctf_integer(ino_t
, ino
, inode
->i_ino
)
380 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
381 ctf_integer(u64
, start
, ordered
->start
)
382 ctf_integer(u64
, len
, ordered
->len
)
383 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
384 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
385 ctf_integer(unsigned long, flags
, ordered
->flags
)
386 ctf_integer(int, compress_type
, ordered
->compress_type
)
387 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
388 ctf_integer(u64
, root_objectid
,
389 BTRFS_I(inode
)->root
->root_key
.objectid
)
392 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
393 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
395 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
397 TP_ARGS(inode
, ordered
),
400 ctf_integer(ino_t
, ino
, inode
->i_ino
)
401 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
402 ctf_integer(u64
, start
, ordered
->start
)
403 ctf_integer(u64
, len
, ordered
->len
)
404 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
405 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
406 ctf_integer(unsigned long, flags
, ordered
->flags
)
407 ctf_integer(int, compress_type
, ordered
->compress_type
)
408 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
409 ctf_integer(u64
, root_objectid
,
410 BTRFS_I(inode
)->root
->root_key
.objectid
)
413 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
414 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
415 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
416 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
417 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
419 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
421 TP_ARGS(inode
, ordered
),
424 ctf_integer(ino_t
, ino
, inode
->i_ino
)
425 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
426 ctf_integer(u64
, start
, ordered
->start
)
427 ctf_integer(u64
, len
, ordered
->len
)
428 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
429 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
430 ctf_integer(unsigned long, flags
, ordered
->flags
)
431 ctf_integer(int, compress_type
, ordered
->compress_type
)
432 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
433 ctf_integer(u64
, root_objectid
,
434 BTRFS_I(inode
)->root
->root_key
.objectid
)
438 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
440 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
442 TP_ARGS(inode
, ordered
),
445 ctf_integer(ino_t
, ino
, inode
->i_ino
)
446 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
447 ctf_integer(u64
, start
, ordered
->start
)
448 ctf_integer(u64
, len
, ordered
->len
)
449 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
450 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
451 ctf_integer(unsigned long, flags
, ordered
->flags
)
452 ctf_integer(int, compress_type
, ordered
->compress_type
)
453 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
454 ctf_integer(u64
, root_objectid
,
455 BTRFS_I(inode
)->root
->root_key
.objectid
)
460 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
461 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
462 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
463 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
464 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
465 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
467 TP_PROTO(const struct inode
*inode
,
468 const struct btrfs_ordered_extent
*ordered
),
470 TP_ARGS(inode
, ordered
)
473 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
475 TP_PROTO(const struct inode
*inode
,
476 const struct btrfs_ordered_extent
*ordered
),
478 TP_ARGS(inode
, ordered
)
481 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
483 TP_PROTO(const struct inode
*inode
,
484 const struct btrfs_ordered_extent
*ordered
),
486 TP_ARGS(inode
, ordered
)
489 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
491 TP_PROTO(const struct inode
*inode
,
492 const struct btrfs_ordered_extent
*ordered
),
494 TP_ARGS(inode
, ordered
)
497 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
499 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
500 const struct writeback_control
*wbc
),
502 TP_ARGS(page
, inode
, wbc
),
505 ctf_integer(ino_t
, ino
, inode
->i_ino
)
506 ctf_integer(pgoff_t
, index
, page
->index
)
507 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
508 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
509 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
510 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
511 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
512 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
513 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
514 ctf_integer(pgoff_t
, writeback_index
,
515 inode
->i_mapping
->writeback_index
)
516 ctf_integer(u64
, root_objectid
,
517 BTRFS_I(inode
)->root
->root_key
.objectid
)
521 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
525 btrfs__extent_writepage
,
527 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
528 const struct writeback_control
*wbc
),
530 TP_ARGS(page
, inode
, wbc
)
533 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
535 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
537 TP_ARGS(page
, start
, end
, uptodate
),
540 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
541 ctf_integer(pgoff_t
, index
, page
->index
)
542 ctf_integer(u64
, start
, start
)
543 ctf_integer(u64
, end
, end
)
544 ctf_integer(int, uptodate
, uptodate
)
545 ctf_integer(u64
, root_objectid
,
546 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
550 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
552 TP_PROTO(const struct file
*file
, int datasync
),
554 TP_ARGS(file
, datasync
),
557 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
558 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
559 ctf_integer(int, datasync
, datasync
)
560 ctf_integer(u64
, root_objectid
,
561 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
565 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
567 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
569 TP_ARGS(inode
, ordered
)
572 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
574 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
576 TP_ARGS(inode
, ordered
)
579 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
581 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
583 TP_ARGS(inode
, ordered
)
586 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
588 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
590 TP_ARGS(inode
, ordered
)
593 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
595 TP_PROTO(struct page
*page
, struct inode
*inode
,
596 struct writeback_control
*wbc
),
598 TP_ARGS(page
, inode
, wbc
),
601 ctf_integer(ino_t
, ino
, inode
->i_ino
)
602 ctf_integer(pgoff_t
, index
, page
->index
)
603 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
604 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
605 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
606 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
607 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
608 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
610 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
611 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
612 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
613 ctf_integer(pgoff_t
, writeback_index
,
614 inode
->i_mapping
->writeback_index
)
615 ctf_integer(u64
, root_objectid
,
616 BTRFS_I(inode
)->root
->root_key
.objectid
)
620 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
624 btrfs__extent_writepage
,
626 TP_PROTO(struct page
*page
, struct inode
*inode
,
627 struct writeback_control
*wbc
),
629 TP_ARGS(page
, inode
, wbc
)
632 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
634 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
636 TP_ARGS(page
, start
, end
, uptodate
),
639 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
640 ctf_integer(pgoff_t
, index
, page
->index
)
641 ctf_integer(u64
, start
, start
)
642 ctf_integer(u64
, end
, end
)
643 ctf_integer(int, uptodate
, uptodate
)
644 ctf_integer(u64
, root_objectid
,
645 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
649 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
651 TP_PROTO(struct file
*file
, int datasync
),
653 TP_ARGS(file
, datasync
),
656 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
657 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
658 ctf_integer(int, datasync
, datasync
)
659 ctf_integer(u64
, root_objectid
,
660 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
665 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
666 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
667 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
668 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
669 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
670 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
671 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
672 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
673 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
675 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
677 TP_ARGS(fs_info
, wait
),
680 ctf_integer(int, wait
, wait
)
683 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
684 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
686 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
688 TP_ARGS(fs_info
, wait
),
691 ctf_integer(int, wait
, wait
)
695 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
702 ctf_integer(int, wait
, wait
)
707 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
708 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
710 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
711 const struct btrfs_block_group
*block_group
, int create
),
713 TP_ARGS(fs_info
, block_group
, create
),
716 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
717 ctf_integer(u64
, offset
, block_group
->start
)
718 ctf_integer(u64
, size
, block_group
->length
)
719 ctf_integer(u64
, flags
, block_group
->flags
)
720 ctf_integer(u64
, bytes_used
, block_group
->used
)
721 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
722 ctf_integer(int, create
, create
)
725 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
726 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
727 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
728 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
729 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
730 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
732 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
733 const struct btrfs_block_group_cache
*block_group
, int create
),
735 TP_ARGS(fs_info
, block_group
, create
),
738 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
739 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
740 ctf_integer(u64
, size
, block_group
->key
.offset
)
741 ctf_integer(u64
, flags
, block_group
->flags
)
742 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
743 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
744 ctf_integer(int, create
, create
)
748 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
750 TP_PROTO(struct btrfs_fs_info
*fs_info
,
751 struct btrfs_block_group_cache
*block_group
, int create
),
753 TP_ARGS(fs_info
, block_group
, create
),
756 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
757 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
758 ctf_integer(u64
, size
, block_group
->key
.offset
)
759 ctf_integer(u64
, flags
, block_group
->flags
)
760 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
761 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
762 ctf_integer(int, create
, create
)
767 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
768 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
770 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
771 const struct btrfs_delayed_ref_node
*ref
,
772 const struct btrfs_delayed_tree_ref
*full_ref
,
775 TP_ARGS(fs_info
, ref
, full_ref
, action
),
778 ctf_integer(u64
, bytenr
, ref
->bytenr
)
779 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
780 ctf_integer(int, action
, action
)
781 ctf_integer(u64
, parent
, full_ref
->parent
)
782 ctf_integer(u64
, ref_root
, full_ref
->root
)
783 ctf_integer(int, level
, full_ref
->level
)
784 ctf_integer(int, type
, ref
->type
)
785 ctf_integer(u64
, seq
, ref
->seq
)
788 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
789 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
791 TP_PROTO(struct btrfs_fs_info
*fs_info
,
792 struct btrfs_delayed_ref_node
*ref
,
793 struct btrfs_delayed_tree_ref
*full_ref
,
796 TP_ARGS(fs_info
, ref
, full_ref
, action
),
799 ctf_integer(u64
, bytenr
, ref
->bytenr
)
800 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
801 ctf_integer(int, action
, action
)
802 ctf_integer(u64
, parent
, full_ref
->parent
)
803 ctf_integer(u64
, ref_root
, full_ref
->root
)
804 ctf_integer(int, level
, full_ref
->level
)
805 ctf_integer(int, type
, ref
->type
)
806 ctf_integer(u64
, seq
, ref
->seq
)
810 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
812 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
813 struct btrfs_delayed_tree_ref
*full_ref
,
816 TP_ARGS(ref
, full_ref
, action
),
819 ctf_integer(u64
, bytenr
, ref
->bytenr
)
820 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
821 ctf_integer(int, action
, action
)
822 ctf_integer(u64
, parent
, full_ref
->parent
)
823 ctf_integer(u64
, ref_root
, full_ref
->root
)
824 ctf_integer(int, level
, full_ref
->level
)
825 ctf_integer(int, type
, ref
->type
)
826 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
827 ctf_integer(u64
, seq
, ref
->seq
)
833 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
835 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
836 struct btrfs_delayed_data_ref
*full_ref
,
839 TP_ARGS(ref
, full_ref
, action
),
842 ctf_integer(u64
, bytenr
, ref
->bytenr
)
843 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
844 ctf_integer(int, action
, action
)
845 ctf_integer(u64
, parent
, full_ref
->parent
)
846 ctf_integer(u64
, ref_root
, full_ref
->root
)
847 ctf_integer(u64
, owner
, full_ref
->objectid
)
848 ctf_integer(u64
, offset
, full_ref
->offset
)
849 ctf_integer(int, type
, ref
->type
)
850 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
851 ctf_integer(u64
, seq
, ref
->seq
)
856 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
857 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
859 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
860 const struct btrfs_delayed_ref_head
*head_ref
,
863 TP_ARGS(fs_info
, head_ref
, action
),
866 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
867 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
868 ctf_integer(int, action
, action
)
869 ctf_integer(int, is_data
, head_ref
->is_data
)
873 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
875 add_delayed_ref_head
,
877 btrfs_add_delayed_ref_head
,
879 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
880 const struct btrfs_delayed_ref_head
*head_ref
,
883 TP_ARGS(fs_info
, head_ref
, action
)
886 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
888 run_delayed_ref_head
,
890 btrfs_run_delayed_ref_head
,
892 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
893 const struct btrfs_delayed_ref_head
*head_ref
,
896 TP_ARGS(fs_info
, head_ref
, action
)
899 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
900 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
901 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
902 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
903 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
904 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
905 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
906 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
908 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
910 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
911 const struct btrfs_delayed_ref_node
*ref
,
912 const struct btrfs_delayed_ref_head
*head_ref
,
915 TP_ARGS(fs_info
, ref
, head_ref
, action
),
918 ctf_integer(u64
, bytenr
, ref
->bytenr
)
919 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
920 ctf_integer(int, action
, action
)
921 ctf_integer(int, is_data
, head_ref
->is_data
)
925 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
927 add_delayed_ref_head
,
929 btrfs_add_delayed_ref_head
,
931 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
932 const struct btrfs_delayed_ref_node
*ref
,
933 const struct btrfs_delayed_ref_head
*head_ref
,
936 TP_ARGS(fs_info
, ref
, head_ref
, action
)
939 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
941 run_delayed_ref_head
,
943 btrfs_run_delayed_ref_head
,
945 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
946 const struct btrfs_delayed_ref_node
*ref
,
947 const struct btrfs_delayed_ref_head
*head_ref
,
950 TP_ARGS(fs_info
, ref
, head_ref
, action
)
953 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
954 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
956 TP_PROTO(struct btrfs_fs_info
*fs_info
,
957 struct btrfs_delayed_ref_node
*ref
,
958 struct btrfs_delayed_ref_head
*head_ref
,
961 TP_ARGS(fs_info
, ref
, head_ref
, action
),
964 ctf_integer(u64
, bytenr
, ref
->bytenr
)
965 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
966 ctf_integer(int, action
, action
)
967 ctf_integer(int, is_data
, head_ref
->is_data
)
971 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
973 add_delayed_ref_head
,
975 btrfs_add_delayed_ref_head
,
977 TP_PROTO(struct btrfs_fs_info
*fs_info
,
978 struct btrfs_delayed_ref_node
*ref
,
979 struct btrfs_delayed_ref_head
*head_ref
,
982 TP_ARGS(fs_info
, ref
, head_ref
, action
)
985 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
987 run_delayed_ref_head
,
989 btrfs_run_delayed_ref_head
,
991 TP_PROTO(struct btrfs_fs_info
*fs_info
,
992 struct btrfs_delayed_ref_node
*ref
,
993 struct btrfs_delayed_ref_head
*head_ref
,
996 TP_ARGS(fs_info
, ref
, head_ref
, action
)
999 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1000 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1002 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1003 const struct btrfs_delayed_ref_head
*head_ref
,
1006 TP_ARGS(ref
, head_ref
, action
),
1009 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1010 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1011 ctf_integer(int, action
, action
)
1012 ctf_integer(int, is_data
, head_ref
->is_data
)
1016 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1018 add_delayed_ref_head
,
1020 btrfs_add_delayed_ref_head
,
1022 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1023 const struct btrfs_delayed_ref_head
*head_ref
,
1026 TP_ARGS(ref
, head_ref
, action
)
1029 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1031 run_delayed_ref_head
,
1033 btrfs_run_delayed_ref_head
,
1035 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1036 const struct btrfs_delayed_ref_head
*head_ref
,
1039 TP_ARGS(ref
, head_ref
, action
)
1042 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1043 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1045 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1046 struct btrfs_delayed_ref_head
*head_ref
,
1049 TP_ARGS(ref
, head_ref
, action
),
1052 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1053 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1054 ctf_integer(int, action
, action
)
1055 ctf_integer(int, is_data
, head_ref
->is_data
)
1059 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1061 add_delayed_ref_head
,
1063 btrfs_add_delayed_ref_head
,
1065 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1066 struct btrfs_delayed_ref_head
*head_ref
,
1069 TP_ARGS(ref
, head_ref
, action
)
1072 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1074 run_delayed_ref_head
,
1076 btrfs_run_delayed_ref_head
,
1078 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1079 struct btrfs_delayed_ref_head
*head_ref
,
1082 TP_ARGS(ref
, head_ref
, action
)
1086 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1088 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1089 struct btrfs_delayed_ref_head
*head_ref
,
1092 TP_ARGS(ref
, head_ref
, action
),
1095 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1096 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1097 ctf_integer(int, action
, action
)
1098 ctf_integer(int, is_data
, head_ref
->is_data
)
1103 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1105 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1107 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1108 u64 offset
, u64 size
),
1110 TP_ARGS(fs_info
, map
, offset
, size
),
1113 ctf_integer(int, num_stripes
, map
->num_stripes
)
1114 ctf_integer(u64
, type
, map
->type
)
1115 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1116 ctf_integer(u64
, offset
, offset
)
1117 ctf_integer(u64
, size
, size
)
1118 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1122 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1124 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1125 u64 offset
, u64 size
),
1127 TP_ARGS(fs_info
, map
, offset
, size
)
1130 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1132 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1133 u64 offset
, u64 size
),
1135 TP_ARGS(fs_info
, map
, offset
, size
)
1138 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1140 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1142 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1143 u64 offset
, u64 size
),
1145 TP_ARGS(fs_info
, map
, offset
, size
),
1148 ctf_integer(int, num_stripes
, map
->num_stripes
)
1149 ctf_integer(u64
, type
, map
->type
)
1150 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1151 ctf_integer(u64
, offset
, offset
)
1152 ctf_integer(u64
, size
, size
)
1153 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1157 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1159 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1160 u64 offset
, u64 size
),
1162 TP_ARGS(fs_info
, map
, offset
, size
)
1165 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1167 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1168 u64 offset
, u64 size
),
1170 TP_ARGS(fs_info
, map
, offset
, size
)
1173 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1174 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1175 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1176 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1178 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1180 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1181 u64 offset
, u64 size
),
1183 TP_ARGS(root
, map
, offset
, size
),
1186 ctf_integer(int, num_stripes
, map
->num_stripes
)
1187 ctf_integer(u64
, type
, map
->type
)
1188 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1189 ctf_integer(u64
, offset
, offset
)
1190 ctf_integer(u64
, size
, size
)
1191 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1195 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1197 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1198 u64 offset
, u64 size
),
1200 TP_ARGS(root
, map
, offset
, size
)
1203 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1205 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1206 u64 offset
, u64 size
),
1208 TP_ARGS(root
, map
, offset
, size
)
1211 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1213 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1215 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1216 u64 offset
, u64 size
),
1218 TP_ARGS(root
, map
, offset
, size
),
1221 ctf_integer(int, num_stripes
, map
->num_stripes
)
1222 ctf_integer(u64
, type
, map
->type
)
1223 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1224 ctf_integer(u64
, offset
, offset
)
1225 ctf_integer(u64
, size
, size
)
1226 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1230 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1232 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1233 u64 offset
, u64 size
),
1235 TP_ARGS(root
, map
, offset
, size
)
1238 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1240 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1241 u64 offset
, u64 size
),
1243 TP_ARGS(root
, map
, offset
, size
)
1246 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1248 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1249 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1250 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1251 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1252 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1253 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1255 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1256 const struct extent_buffer
*cow
),
1258 TP_ARGS(root
, buf
, cow
),
1261 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1262 ctf_integer(u64
, buf_start
, buf
->start
)
1263 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1264 ctf_integer(u64
, cow_start
, cow
->start
)
1265 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1266 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1270 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1272 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1273 struct extent_buffer
*cow
),
1275 TP_ARGS(root
, buf
, cow
),
1278 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1279 ctf_integer(u64
, buf_start
, buf
->start
)
1280 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1281 ctf_integer(u64
, cow_start
, cow
->start
)
1282 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1283 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1288 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1289 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1291 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const char *type
, u64 val
,
1292 u64 bytes
, int reserve
),
1294 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1297 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1298 ctf_string(type
, type
)
1299 ctf_integer(u64
, val
, val
)
1300 ctf_integer(u64
, bytes
, bytes
)
1301 ctf_integer(int, reserve
, reserve
)
1304 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1305 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1306 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1307 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1308 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1309 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1311 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1312 u64 bytes
, int reserve
),
1314 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1317 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1318 ctf_string(type
, type
)
1319 ctf_integer(u64
, val
, val
)
1320 ctf_integer(u64
, bytes
, bytes
)
1321 ctf_integer(int, reserve
, reserve
)
1324 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1325 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1327 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1328 u64 bytes
, int reserve
),
1330 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1333 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1334 ctf_string(type
, type
)
1335 ctf_integer(u64
, val
, val
)
1336 ctf_integer(u64
, bytes
, bytes
)
1337 ctf_integer(int, reserve
, reserve
)
1342 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1344 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1346 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1348 TP_ARGS(fs_info
, start
, len
),
1351 ctf_integer(u64
, start
, start
)
1352 ctf_integer(u64
, len
, len
)
1356 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1358 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1360 TP_ARGS(fs_info
, start
, len
)
1363 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1365 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1367 TP_ARGS(fs_info
, start
, len
)
1370 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1372 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1374 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1376 TP_ARGS(fs_info
, start
, len
),
1379 ctf_integer(u64
, start
, start
)
1380 ctf_integer(u64
, len
, len
)
1384 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1386 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1388 TP_ARGS(fs_info
, start
, len
)
1391 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1393 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 start
, u64 len
),
1395 TP_ARGS(fs_info
, start
, len
)
1398 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1399 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1400 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1401 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1403 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1405 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1407 TP_ARGS(root
, start
, len
),
1410 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1411 ctf_integer(u64
, start
, start
)
1412 ctf_integer(u64
, len
, len
)
1416 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1418 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1420 TP_ARGS(root
, start
, len
)
1423 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1425 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1427 TP_ARGS(root
, start
, len
)
1430 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1432 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1434 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1436 TP_ARGS(root
, start
, len
),
1439 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1440 ctf_integer(u64
, start
, start
)
1441 ctf_integer(u64
, len
, len
)
1445 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1447 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1449 TP_ARGS(root
, start
, len
)
1452 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1454 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1456 TP_ARGS(root
, start
, len
)
1459 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1461 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1462 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1464 btrfs_find_free_extent
,
1466 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1469 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1472 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1473 ctf_integer(u64
, num_bytes
, num_bytes
)
1474 ctf_integer(u64
, empty_size
, empty_size
)
1475 ctf_integer(u64
, data
, data
)
1479 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1481 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1484 TP_ARGS(block_group
, start
, len
),
1487 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1488 ctf_integer(u64
, bg_objectid
, block_group
->start
)
1489 ctf_integer(u64
, flags
, block_group
->flags
)
1490 ctf_integer(u64
, start
, start
)
1491 ctf_integer(u64
, len
, len
)
1495 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1497 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1500 TP_ARGS(block_group
, start
, len
)
1503 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1505 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1508 TP_ARGS(block_group
, start
, len
)
1511 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1512 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1514 btrfs_find_free_extent
,
1516 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1519 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1522 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1523 ctf_integer(u64
, num_bytes
, num_bytes
)
1524 ctf_integer(u64
, empty_size
, empty_size
)
1525 ctf_integer(u64
, data
, data
)
1529 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1531 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1534 TP_ARGS(block_group
, start
, len
),
1537 ctf_array(u8
, fsid
, block_group
->lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1538 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1539 ctf_integer(u64
, flags
, block_group
->flags
)
1540 ctf_integer(u64
, start
, start
)
1541 ctf_integer(u64
, len
, len
)
1545 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1547 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1550 TP_ARGS(block_group
, start
, len
)
1553 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1555 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1558 TP_ARGS(block_group
, start
, len
)
1561 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1562 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1564 btrfs_find_free_extent
,
1566 TP_PROTO(const struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1569 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1572 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1573 ctf_integer(u64
, num_bytes
, num_bytes
)
1574 ctf_integer(u64
, empty_size
, empty_size
)
1575 ctf_integer(u64
, data
, data
)
1579 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1581 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1582 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1585 TP_ARGS(fs_info
, block_group
, start
, len
),
1588 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1589 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1590 ctf_integer(u64
, flags
, block_group
->flags
)
1591 ctf_integer(u64
, start
, start
)
1592 ctf_integer(u64
, len
, len
)
1596 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1598 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1599 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1602 TP_ARGS(fs_info
, block_group
, start
, len
)
1605 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1607 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1608 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1611 TP_ARGS(fs_info
, block_group
, start
, len
)
1614 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1616 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1618 btrfs_find_free_extent
,
1620 TP_PROTO(struct btrfs_fs_info
*fs_info
, u64 num_bytes
, u64 empty_size
,
1623 TP_ARGS(fs_info
, num_bytes
, empty_size
, data
),
1626 ctf_array(u8
, fsid
, lttng_fs_info_fsid
, BTRFS_UUID_SIZE
)
1627 ctf_integer(u64
, num_bytes
, num_bytes
)
1628 ctf_integer(u64
, empty_size
, empty_size
)
1629 ctf_integer(u64
, data
, data
)
1633 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1635 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1636 struct btrfs_block_group_cache
*block_group
, u64 start
,
1639 TP_ARGS(fs_info
, block_group
, start
, len
),
1642 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1643 ctf_integer(u64
, flags
, block_group
->flags
)
1644 ctf_integer(u64
, start
, start
)
1645 ctf_integer(u64
, len
, len
)
1649 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1651 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1652 struct btrfs_block_group_cache
*block_group
, u64 start
,
1655 TP_ARGS(fs_info
, block_group
, start
, len
)
1658 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1660 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1661 struct btrfs_block_group_cache
*block_group
, u64 start
,
1664 TP_ARGS(fs_info
, block_group
, start
, len
)
1666 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1667 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1668 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1669 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1671 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1673 btrfs_find_free_extent
,
1675 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1678 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1681 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1682 ctf_integer(u64
, num_bytes
, num_bytes
)
1683 ctf_integer(u64
, empty_size
, empty_size
)
1684 ctf_integer(u64
, data
, data
)
1688 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1690 TP_PROTO(const struct btrfs_root
*root
,
1691 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1694 TP_ARGS(root
, block_group
, start
, len
),
1697 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1698 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1699 ctf_integer(u64
, flags
, block_group
->flags
)
1700 ctf_integer(u64
, start
, start
)
1701 ctf_integer(u64
, len
, len
)
1705 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1707 TP_PROTO(const struct btrfs_root
*root
,
1708 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1711 TP_ARGS(root
, block_group
, start
, len
)
1714 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1716 TP_PROTO(const struct btrfs_root
*root
,
1717 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1720 TP_ARGS(root
, block_group
, start
, len
)
1723 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1725 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1727 btrfs_find_free_extent
,
1729 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1732 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1735 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1736 ctf_integer(u64
, num_bytes
, num_bytes
)
1737 ctf_integer(u64
, empty_size
, empty_size
)
1738 ctf_integer(u64
, data
, data
)
1742 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1744 TP_PROTO(struct btrfs_root
*root
,
1745 struct btrfs_block_group_cache
*block_group
, u64 start
,
1748 TP_ARGS(root
, block_group
, start
, len
),
1751 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1752 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1753 ctf_integer(u64
, flags
, block_group
->flags
)
1754 ctf_integer(u64
, start
, start
)
1755 ctf_integer(u64
, len
, len
)
1759 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1761 TP_PROTO(struct btrfs_root
*root
,
1762 struct btrfs_block_group_cache
*block_group
, u64 start
,
1765 TP_ARGS(root
, block_group
, start
, len
)
1768 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1770 TP_PROTO(struct btrfs_root
*root
,
1771 struct btrfs_block_group_cache
*block_group
, u64 start
,
1774 TP_ARGS(root
, block_group
, start
, len
)
1777 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1779 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1780 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1782 TP_PROTO(const struct btrfs_block_group
*block_group
, u64 start
,
1783 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1785 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1788 ctf_integer(u64
, bg_objectid
, block_group
->start
)
1789 ctf_integer(u64
, flags
, block_group
->flags
)
1790 ctf_integer(u64
, start
, start
)
1791 ctf_integer(u64
, bytes
, bytes
)
1792 ctf_integer(u64
, empty_size
, empty_size
)
1793 ctf_integer(u64
, min_bytes
, min_bytes
)
1797 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1799 TP_PROTO(const struct btrfs_block_group
*block_group
),
1801 TP_ARGS(block_group
),
1804 ctf_integer(u64
, bg_objectid
, block_group
->start
)
1808 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1810 TP_PROTO(const struct btrfs_block_group
*block_group
,
1811 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1813 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1816 ctf_integer(u64
, bg_objectid
, block_group
->start
)
1817 ctf_integer(u64
, flags
, block_group
->flags
)
1818 ctf_integer(u64
, start
, cluster
->window_start
)
1819 ctf_integer(u64
, max_size
, cluster
->max_size
)
1820 ctf_integer(u64
, size
, size
)
1821 ctf_integer(int, bitmap
, bitmap
)
1824 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1825 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1826 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1827 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1828 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1829 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1831 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1832 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1834 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1837 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1838 ctf_integer(u64
, flags
, block_group
->flags
)
1839 ctf_integer(u64
, start
, start
)
1840 ctf_integer(u64
, bytes
, bytes
)
1841 ctf_integer(u64
, empty_size
, empty_size
)
1842 ctf_integer(u64
, min_bytes
, min_bytes
)
1846 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1848 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1850 TP_ARGS(block_group
),
1853 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1857 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1859 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1860 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1862 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1865 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1866 ctf_integer(u64
, flags
, block_group
->flags
)
1867 ctf_integer(u64
, start
, cluster
->window_start
)
1868 ctf_integer(u64
, max_size
, cluster
->max_size
)
1869 ctf_integer(u64
, size
, size
)
1870 ctf_integer(int, bitmap
, bitmap
)
1873 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1874 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1876 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1877 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1879 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1882 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1883 ctf_integer(u64
, flags
, block_group
->flags
)
1884 ctf_integer(u64
, start
, start
)
1885 ctf_integer(u64
, bytes
, bytes
)
1886 ctf_integer(u64
, empty_size
, empty_size
)
1887 ctf_integer(u64
, min_bytes
, min_bytes
)
1891 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1893 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1895 TP_ARGS(block_group
),
1898 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1902 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1904 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1905 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1907 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1910 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1911 ctf_integer(u64
, flags
, block_group
->flags
)
1912 ctf_integer(u64
, start
, cluster
->window_start
)
1913 ctf_integer(u64
, max_size
, cluster
->max_size
)
1914 ctf_integer(u64
, size
, size
)
1915 ctf_integer(int, bitmap
, bitmap
)
1920 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1921 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1922 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1923 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1924 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1925 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1927 btrfs_alloc_extent_state
,
1929 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1931 TP_ARGS(state
, mask
, IP
),
1934 ctf_integer_hex(const struct extent_state
*, state
, state
)
1935 ctf_integer(gfp_t
, mask
, mask
)
1936 ctf_integer(unsigned long, ip
, IP
)
1940 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1942 btrfs_free_extent_state
,
1944 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1949 ctf_integer_hex(const struct extent_state
*, state
, state
)
1950 ctf_integer(unsigned long, ip
, IP
)
1953 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1954 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1956 btrfs_alloc_extent_state
,
1958 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1960 TP_ARGS(state
, mask
, IP
),
1963 ctf_integer_hex(struct extent_state
*, state
, state
)
1964 ctf_integer(gfp_t
, mask
, mask
)
1965 ctf_integer(unsigned long, ip
, IP
)
1969 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1971 btrfs_free_extent_state
,
1973 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
1978 ctf_integer_hex(struct extent_state
*, state
, state
)
1979 ctf_integer(unsigned long, ip
, IP
)
1984 #endif /* LTTNG_TRACE_BTRFS_H */
1986 /* This part must be outside protection */
1987 #include <probes/define_trace.h>