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(3,3,0))
24 struct btrfs_block_group_cache
;
25 struct btrfs_free_cluster
;
29 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
34 #define BTRFS_UUID_SIZE 16
36 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
37 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
38 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
39 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
40 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
41 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
43 TP_PROTO(const struct btrfs_root
*root
),
48 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
49 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
53 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
55 TP_PROTO(const struct inode
*inode
),
60 ctf_integer(ino_t
, ino
, inode
->i_ino
)
61 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
62 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
63 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
64 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
65 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
66 ctf_integer(u64
, root_objectid
,
67 BTRFS_I(inode
)->root
->root_key
.objectid
)
71 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
73 TP_PROTO(const struct inode
*inode
),
78 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
80 TP_PROTO(const struct inode
*inode
),
85 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
87 TP_PROTO(const struct inode
*inode
),
92 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
94 TP_PROTO(struct btrfs_root
*root
),
99 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
100 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
104 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
106 TP_PROTO(struct inode
*inode
),
111 ctf_integer(ino_t
, ino
, inode
->i_ino
)
112 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
113 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
114 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
115 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
116 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
117 ctf_integer(u64
, root_objectid
,
118 BTRFS_I(inode
)->root
->root_key
.objectid
)
122 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
124 TP_PROTO(struct inode
*inode
),
129 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
131 TP_PROTO(struct inode
*inode
),
136 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
138 TP_PROTO(struct inode
*inode
),
144 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
146 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
148 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
149 const struct extent_map
*map
),
151 TP_ARGS(root
, inode
, map
),
154 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
155 ctf_integer(u64
, ino
, btrfs_ino(inode
))
156 ctf_integer(u64
, start
, map
->start
)
157 ctf_integer(u64
, len
, map
->len
)
158 ctf_integer(u64
, orig_start
, map
->orig_start
)
159 ctf_integer(u64
, block_start
, map
->block_start
)
160 ctf_integer(u64
, block_len
, map
->block_len
)
161 ctf_integer(unsigned long, flags
, map
->flags
)
162 ctf_integer(int, refs
, refcount_read(&map
->refs
))
163 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
167 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
169 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
171 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
172 struct extent_map
*map
),
174 TP_ARGS(root
, inode
, map
),
177 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
178 ctf_integer(u64
, ino
, btrfs_ino(inode
))
179 ctf_integer(u64
, start
, map
->start
)
180 ctf_integer(u64
, len
, map
->len
)
181 ctf_integer(u64
, orig_start
, map
->orig_start
)
182 ctf_integer(u64
, block_start
, map
->block_start
)
183 ctf_integer(u64
, block_len
, map
->block_len
)
184 ctf_integer(unsigned long, flags
, map
->flags
)
185 ctf_integer(int, refs
, refcount_read(&map
->refs
))
186 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
190 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
192 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
194 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
195 struct extent_map
*map
),
197 TP_ARGS(root
, inode
, map
),
200 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
201 ctf_integer(u64
, ino
, btrfs_ino(inode
))
202 ctf_integer(u64
, start
, map
->start
)
203 ctf_integer(u64
, len
, map
->len
)
204 ctf_integer(u64
, orig_start
, map
->orig_start
)
205 ctf_integer(u64
, block_start
, map
->block_start
)
206 ctf_integer(u64
, block_len
, map
->block_len
)
207 ctf_integer(unsigned long, flags
, map
->flags
)
208 ctf_integer(int, refs
, atomic_read(&map
->refs
))
209 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
213 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
215 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
217 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
218 struct extent_map
*map
),
220 TP_ARGS(root
, inode
, map
),
223 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
224 ctf_integer(u64
, ino
, btrfs_ino(inode
))
225 ctf_integer(u64
, start
, map
->start
)
226 ctf_integer(u64
, len
, map
->len
)
227 ctf_integer(u64
, orig_start
, map
->orig_start
)
228 ctf_integer(u64
, block_start
, map
->block_start
)
229 ctf_integer(u64
, block_len
, map
->block_len
)
230 ctf_integer(unsigned long, flags
, map
->flags
)
231 ctf_integer(int, refs
, atomic_read(&map
->refs
))
232 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
236 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
237 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
238 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
239 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
241 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
243 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
248 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
249 ctf_integer(u64
, start
, map
->start
)
250 ctf_integer(u64
, len
, map
->len
)
251 ctf_integer(u64
, orig_start
, map
->orig_start
)
252 ctf_integer(u64
, block_start
, map
->block_start
)
253 ctf_integer(u64
, block_len
, map
->block_len
)
254 ctf_integer(unsigned long, flags
, map
->flags
)
255 ctf_integer(int, refs
, atomic_read(&map
->refs
))
256 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
260 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
262 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
264 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
269 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
270 ctf_integer(u64
, start
, map
->start
)
271 ctf_integer(u64
, len
, map
->len
)
272 ctf_integer(u64
, orig_start
, map
->orig_start
)
273 ctf_integer(u64
, block_start
, map
->block_start
)
274 ctf_integer(u64
, block_len
, map
->block_len
)
275 ctf_integer(unsigned long, flags
, map
->flags
)
276 ctf_integer(int, refs
, atomic_read(&map
->refs
))
277 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
281 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
283 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
284 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
286 TP_PROTO(struct btrfs_fs_info
*fs_info
,
287 const struct extent_map
*existing
, const struct extent_map
*map
,
290 TP_ARGS(fs_info
, existing
, map
, start
, len
),
293 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
294 ctf_integer(u64
, e_start
, existing
->start
)
295 ctf_integer(u64
, e_len
, existing
->len
)
296 ctf_integer(u64
, map_start
, map
->start
)
297 ctf_integer(u64
, map_len
, map
->len
)
298 ctf_integer(u64
, start
, start
)
299 ctf_integer(u64
, len
, len
)
302 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
303 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
305 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
307 TP_ARGS(existing
, map
, start
, len
),
310 ctf_integer(u64
, e_start
, existing
->start
)
311 ctf_integer(u64
, e_len
, existing
->len
)
312 ctf_integer(u64
, map_start
, map
->start
)
313 ctf_integer(u64
, map_len
, map
->len
)
314 ctf_integer(u64
, start
, start
)
315 ctf_integer(u64
, len
, len
)
320 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
321 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
323 TP_PROTO(const struct inode
*inode
,
324 const struct btrfs_ordered_extent
*ordered
),
326 TP_ARGS(inode
, ordered
),
329 ctf_integer(ino_t
, ino
, inode
->i_ino
)
330 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
331 ctf_integer(u64
, start
, ordered
->start
)
332 ctf_integer(u64
, len
, ordered
->len
)
333 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
334 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
335 ctf_integer(unsigned long, flags
, ordered
->flags
)
336 ctf_integer(int, compress_type
, ordered
->compress_type
)
337 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
338 ctf_integer(u64
, root_objectid
,
339 BTRFS_I(inode
)->root
->root_key
.objectid
)
342 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
343 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
345 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
347 TP_ARGS(inode
, ordered
),
350 ctf_integer(ino_t
, ino
, inode
->i_ino
)
351 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
352 ctf_integer(u64
, start
, ordered
->start
)
353 ctf_integer(u64
, len
, ordered
->len
)
354 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
355 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
356 ctf_integer(unsigned long, flags
, ordered
->flags
)
357 ctf_integer(int, compress_type
, ordered
->compress_type
)
358 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
359 ctf_integer(u64
, root_objectid
,
360 BTRFS_I(inode
)->root
->root_key
.objectid
)
363 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
364 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
365 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
366 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
367 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
369 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
371 TP_ARGS(inode
, ordered
),
374 ctf_integer(ino_t
, ino
, inode
->i_ino
)
375 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
376 ctf_integer(u64
, start
, ordered
->start
)
377 ctf_integer(u64
, len
, ordered
->len
)
378 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
379 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
380 ctf_integer(unsigned long, flags
, ordered
->flags
)
381 ctf_integer(int, compress_type
, ordered
->compress_type
)
382 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
383 ctf_integer(u64
, root_objectid
,
384 BTRFS_I(inode
)->root
->root_key
.objectid
)
388 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
390 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
392 TP_ARGS(inode
, ordered
),
395 ctf_integer(ino_t
, ino
, inode
->i_ino
)
396 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
397 ctf_integer(u64
, start
, ordered
->start
)
398 ctf_integer(u64
, len
, ordered
->len
)
399 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
400 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
401 ctf_integer(unsigned long, flags
, ordered
->flags
)
402 ctf_integer(int, compress_type
, ordered
->compress_type
)
403 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
404 ctf_integer(u64
, root_objectid
,
405 BTRFS_I(inode
)->root
->root_key
.objectid
)
410 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
411 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
412 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
413 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
414 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
415 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
417 TP_PROTO(const struct inode
*inode
,
418 const struct btrfs_ordered_extent
*ordered
),
420 TP_ARGS(inode
, ordered
)
423 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
425 TP_PROTO(const struct inode
*inode
,
426 const struct btrfs_ordered_extent
*ordered
),
428 TP_ARGS(inode
, ordered
)
431 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
433 TP_PROTO(const struct inode
*inode
,
434 const struct btrfs_ordered_extent
*ordered
),
436 TP_ARGS(inode
, ordered
)
439 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
441 TP_PROTO(const struct inode
*inode
,
442 const struct btrfs_ordered_extent
*ordered
),
444 TP_ARGS(inode
, ordered
)
447 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
449 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
450 const struct writeback_control
*wbc
),
452 TP_ARGS(page
, inode
, wbc
),
455 ctf_integer(ino_t
, ino
, inode
->i_ino
)
456 ctf_integer(pgoff_t
, index
, page
->index
)
457 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
458 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
459 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
460 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
461 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
462 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
463 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
464 ctf_integer(pgoff_t
, writeback_index
,
465 inode
->i_mapping
->writeback_index
)
466 ctf_integer(u64
, root_objectid
,
467 BTRFS_I(inode
)->root
->root_key
.objectid
)
471 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
475 btrfs__extent_writepage
,
477 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
478 const struct writeback_control
*wbc
),
480 TP_ARGS(page
, inode
, wbc
)
483 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
485 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
487 TP_ARGS(page
, start
, end
, uptodate
),
490 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
491 ctf_integer(pgoff_t
, index
, page
->index
)
492 ctf_integer(u64
, start
, start
)
493 ctf_integer(u64
, end
, end
)
494 ctf_integer(int, uptodate
, uptodate
)
495 ctf_integer(u64
, root_objectid
,
496 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
500 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
502 TP_PROTO(const struct file
*file
, int datasync
),
504 TP_ARGS(file
, datasync
),
507 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
508 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
509 ctf_integer(int, datasync
, datasync
)
510 ctf_integer(u64
, root_objectid
,
511 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
515 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
517 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
519 TP_ARGS(inode
, ordered
)
522 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
524 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
526 TP_ARGS(inode
, ordered
)
529 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
531 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
533 TP_ARGS(inode
, ordered
)
536 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
538 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
540 TP_ARGS(inode
, ordered
)
543 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
545 TP_PROTO(struct page
*page
, struct inode
*inode
,
546 struct writeback_control
*wbc
),
548 TP_ARGS(page
, inode
, wbc
),
551 ctf_integer(ino_t
, ino
, inode
->i_ino
)
552 ctf_integer(pgoff_t
, index
, page
->index
)
553 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
554 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
555 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
556 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
557 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
558 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
560 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
561 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
562 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
563 ctf_integer(pgoff_t
, writeback_index
,
564 inode
->i_mapping
->writeback_index
)
565 ctf_integer(u64
, root_objectid
,
566 BTRFS_I(inode
)->root
->root_key
.objectid
)
570 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
574 btrfs__extent_writepage
,
576 TP_PROTO(struct page
*page
, struct inode
*inode
,
577 struct writeback_control
*wbc
),
579 TP_ARGS(page
, inode
, wbc
)
582 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
584 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
586 TP_ARGS(page
, start
, end
, uptodate
),
589 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
590 ctf_integer(pgoff_t
, index
, page
->index
)
591 ctf_integer(u64
, start
, start
)
592 ctf_integer(u64
, end
, end
)
593 ctf_integer(int, uptodate
, uptodate
)
594 ctf_integer(u64
, root_objectid
,
595 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
599 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
601 TP_PROTO(struct file
*file
, int datasync
),
603 TP_ARGS(file
, datasync
),
606 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
607 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
608 ctf_integer(int, datasync
, datasync
)
609 ctf_integer(u64
, root_objectid
,
610 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
615 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
616 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
617 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
618 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
619 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
620 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
621 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
622 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
623 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
625 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
627 TP_ARGS(fs_info
, wait
),
630 ctf_integer(int, wait
, wait
)
633 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
634 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
636 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
638 TP_ARGS(fs_info
, wait
),
641 ctf_integer(int, wait
, wait
)
645 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
652 ctf_integer(int, wait
, wait
)
657 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
658 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
659 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
660 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
661 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
662 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
664 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
665 const struct btrfs_block_group_cache
*block_group
, int create
),
667 TP_ARGS(fs_info
, block_group
, create
),
670 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
671 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
672 ctf_integer(u64
, size
, block_group
->key
.offset
)
673 ctf_integer(u64
, flags
, block_group
->flags
)
674 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
675 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
676 ctf_integer(int, create
, create
)
680 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
682 TP_PROTO(struct btrfs_fs_info
*fs_info
,
683 struct btrfs_block_group_cache
*block_group
, int create
),
685 TP_ARGS(fs_info
, block_group
, create
),
688 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
689 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
690 ctf_integer(u64
, size
, block_group
->key
.offset
)
691 ctf_integer(u64
, flags
, block_group
->flags
)
692 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
693 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
694 ctf_integer(int, create
, create
)
699 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
700 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
701 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
702 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
703 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
704 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
705 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
706 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
707 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
709 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
710 const struct btrfs_delayed_ref_node
*ref
,
711 const struct btrfs_delayed_tree_ref
*full_ref
,
714 TP_ARGS(fs_info
, ref
, full_ref
, action
),
717 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
718 ctf_integer(u64
, bytenr
, ref
->bytenr
)
719 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
720 ctf_integer(int, action
, action
)
721 ctf_integer(u64
, parent
, full_ref
->parent
)
722 ctf_integer(u64
, ref_root
, full_ref
->root
)
723 ctf_integer(int, level
, full_ref
->level
)
724 ctf_integer(int, type
, ref
->type
)
725 ctf_integer(u64
, seq
, ref
->seq
)
729 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
731 add_delayed_tree_ref
,
733 btrfs_add_delayed_tree_ref
,
735 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
736 const struct btrfs_delayed_ref_node
*ref
,
737 const struct btrfs_delayed_tree_ref
*full_ref
,
740 TP_ARGS(fs_info
, ref
, full_ref
, action
)
743 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
745 run_delayed_tree_ref
,
747 btrfs_run_delayed_tree_ref
,
749 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
750 const struct btrfs_delayed_ref_node
*ref
,
751 const struct btrfs_delayed_tree_ref
*full_ref
,
754 TP_ARGS(fs_info
, ref
, full_ref
, action
)
756 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
757 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
759 TP_PROTO(struct btrfs_fs_info
*fs_info
,
760 struct btrfs_delayed_ref_node
*ref
,
761 struct btrfs_delayed_tree_ref
*full_ref
,
764 TP_ARGS(fs_info
, ref
, full_ref
, action
),
767 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
768 ctf_integer(u64
, bytenr
, ref
->bytenr
)
769 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
770 ctf_integer(int, action
, action
)
771 ctf_integer(u64
, parent
, full_ref
->parent
)
772 ctf_integer(u64
, ref_root
, full_ref
->root
)
773 ctf_integer(int, level
, full_ref
->level
)
774 ctf_integer(int, type
, ref
->type
)
775 ctf_integer(u64
, seq
, ref
->seq
)
779 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
781 add_delayed_tree_ref
,
783 btrfs_add_delayed_tree_ref
,
785 TP_PROTO(struct btrfs_fs_info
*fs_info
,
786 struct btrfs_delayed_ref_node
*ref
,
787 struct btrfs_delayed_tree_ref
*full_ref
,
790 TP_ARGS(fs_info
, ref
, full_ref
, action
)
793 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
795 run_delayed_tree_ref
,
797 btrfs_run_delayed_tree_ref
,
799 TP_PROTO(struct btrfs_fs_info
*fs_info
,
800 struct btrfs_delayed_ref_node
*ref
,
801 struct btrfs_delayed_tree_ref
*full_ref
,
804 TP_ARGS(fs_info
, ref
, full_ref
, action
)
806 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
807 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
809 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
810 const struct btrfs_delayed_tree_ref
*full_ref
,
813 TP_ARGS(ref
, full_ref
, action
),
816 ctf_integer(u64
, bytenr
, ref
->bytenr
)
817 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
818 ctf_integer(int, action
, action
)
819 ctf_integer(u64
, parent
, full_ref
->parent
)
820 ctf_integer(u64
, ref_root
, full_ref
->root
)
821 ctf_integer(int, level
, full_ref
->level
)
822 ctf_integer(int, type
, ref
->type
)
823 ctf_integer(u64
, seq
, ref
->seq
)
827 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
829 add_delayed_tree_ref
,
831 btrfs_add_delayed_tree_ref
,
833 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
834 const struct btrfs_delayed_tree_ref
*full_ref
,
837 TP_ARGS(ref
, full_ref
, action
)
840 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
842 run_delayed_tree_ref
,
844 btrfs_run_delayed_tree_ref
,
846 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
847 const struct btrfs_delayed_tree_ref
*full_ref
,
850 TP_ARGS(ref
, full_ref
, action
)
852 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
853 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
855 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
856 struct btrfs_delayed_tree_ref
*full_ref
,
859 TP_ARGS(ref
, full_ref
, action
),
862 ctf_integer(u64
, bytenr
, ref
->bytenr
)
863 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
864 ctf_integer(int, action
, action
)
865 ctf_integer(u64
, parent
, full_ref
->parent
)
866 ctf_integer(u64
, ref_root
, full_ref
->root
)
867 ctf_integer(int, level
, full_ref
->level
)
868 ctf_integer(int, type
, ref
->type
)
869 ctf_integer(u64
, seq
, ref
->seq
)
873 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
875 add_delayed_tree_ref
,
877 btrfs_add_delayed_tree_ref
,
879 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
880 struct btrfs_delayed_tree_ref
*full_ref
,
883 TP_ARGS(ref
, full_ref
, action
)
886 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref
,
888 run_delayed_tree_ref
,
890 btrfs_run_delayed_tree_ref
,
892 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
893 struct btrfs_delayed_tree_ref
*full_ref
,
896 TP_ARGS(ref
, full_ref
, action
)
898 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
899 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
901 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
902 struct btrfs_delayed_tree_ref
*full_ref
,
905 TP_ARGS(ref
, full_ref
, action
),
908 ctf_integer(u64
, bytenr
, ref
->bytenr
)
909 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
910 ctf_integer(int, action
, action
)
911 ctf_integer(u64
, parent
, full_ref
->parent
)
912 ctf_integer(u64
, ref_root
, full_ref
->root
)
913 ctf_integer(int, level
, full_ref
->level
)
914 ctf_integer(int, type
, ref
->type
)
915 ctf_integer(u64
, seq
, ref
->seq
)
919 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
921 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
922 struct btrfs_delayed_tree_ref
*full_ref
,
925 TP_ARGS(ref
, full_ref
, action
),
928 ctf_integer(u64
, bytenr
, ref
->bytenr
)
929 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
930 ctf_integer(int, action
, action
)
931 ctf_integer(u64
, parent
, full_ref
->parent
)
932 ctf_integer(u64
, ref_root
, full_ref
->root
)
933 ctf_integer(int, level
, full_ref
->level
)
934 ctf_integer(int, type
, ref
->type
)
939 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
940 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
941 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
942 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
943 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
944 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
945 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
946 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
947 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
949 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
950 const struct btrfs_delayed_ref_node
*ref
,
951 const struct btrfs_delayed_data_ref
*full_ref
,
954 TP_ARGS(fs_info
, ref
, full_ref
, action
),
957 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
958 ctf_integer(u64
, bytenr
, ref
->bytenr
)
959 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
960 ctf_integer(int, action
, action
)
961 ctf_integer(u64
, parent
, full_ref
->parent
)
962 ctf_integer(u64
, ref_root
, full_ref
->root
)
963 ctf_integer(u64
, owner
, full_ref
->objectid
)
964 ctf_integer(u64
, offset
, full_ref
->offset
)
965 ctf_integer(int, type
, ref
->type
)
966 ctf_integer(u64
, seq
, ref
->seq
)
970 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
972 add_delayed_data_ref
,
974 btrfs_add_delayed_data_ref
,
976 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
977 const struct btrfs_delayed_ref_node
*ref
,
978 const struct btrfs_delayed_data_ref
*full_ref
,
981 TP_ARGS(fs_info
, ref
, full_ref
, action
)
984 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
986 run_delayed_data_ref
,
988 btrfs_run_delayed_data_ref
,
990 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
991 const struct btrfs_delayed_ref_node
*ref
,
992 const struct btrfs_delayed_data_ref
*full_ref
,
995 TP_ARGS(fs_info
, ref
, full_ref
, action
)
997 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
998 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1000 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1001 struct btrfs_delayed_ref_node
*ref
,
1002 struct btrfs_delayed_data_ref
*full_ref
,
1005 TP_ARGS(fs_info
, ref
, full_ref
, action
),
1008 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
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(u64
, parent
, full_ref
->parent
)
1013 ctf_integer(u64
, ref_root
, full_ref
->root
)
1014 ctf_integer(u64
, owner
, full_ref
->objectid
)
1015 ctf_integer(u64
, offset
, full_ref
->offset
)
1016 ctf_integer(int, type
, ref
->type
)
1017 ctf_integer(u64
, seq
, ref
->seq
)
1021 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1023 add_delayed_data_ref
,
1025 btrfs_add_delayed_data_ref
,
1027 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1028 struct btrfs_delayed_ref_node
*ref
,
1029 struct btrfs_delayed_data_ref
*full_ref
,
1032 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1035 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1037 run_delayed_data_ref
,
1039 btrfs_run_delayed_data_ref
,
1041 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1042 struct btrfs_delayed_ref_node
*ref
,
1043 struct btrfs_delayed_data_ref
*full_ref
,
1046 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1048 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1049 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1051 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1052 const struct btrfs_delayed_data_ref
*full_ref
,
1055 TP_ARGS(ref
, full_ref
, action
),
1058 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1059 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1060 ctf_integer(int, action
, action
)
1061 ctf_integer(u64
, parent
, full_ref
->parent
)
1062 ctf_integer(u64
, ref_root
, full_ref
->root
)
1063 ctf_integer(u64
, owner
, full_ref
->objectid
)
1064 ctf_integer(u64
, offset
, full_ref
->offset
)
1065 ctf_integer(int, type
, ref
->type
)
1066 ctf_integer(u64
, seq
, ref
->seq
)
1070 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1072 add_delayed_data_ref
,
1074 btrfs_add_delayed_data_ref
,
1076 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1077 const struct btrfs_delayed_data_ref
*full_ref
,
1080 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1083 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1085 run_delayed_data_ref
,
1087 btrfs_run_delayed_data_ref
,
1089 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1090 const struct btrfs_delayed_data_ref
*full_ref
,
1093 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1095 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1096 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
1098 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1099 struct btrfs_delayed_data_ref
*full_ref
,
1102 TP_ARGS(ref
, full_ref
, action
),
1105 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1106 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1107 ctf_integer(int, action
, action
)
1108 ctf_integer(u64
, parent
, full_ref
->parent
)
1109 ctf_integer(u64
, ref_root
, full_ref
->root
)
1110 ctf_integer(u64
, owner
, full_ref
->objectid
)
1111 ctf_integer(u64
, offset
, full_ref
->offset
)
1112 ctf_integer(int, type
, ref
->type
)
1113 ctf_integer(u64
, seq
, ref
->seq
)
1117 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1119 add_delayed_data_ref
,
1121 btrfs_add_delayed_data_ref
,
1123 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1124 struct btrfs_delayed_data_ref
*full_ref
,
1127 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1130 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref
,
1132 run_delayed_data_ref
,
1134 btrfs_run_delayed_data_ref
,
1136 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1137 struct btrfs_delayed_data_ref
*full_ref
,
1140 TP_ARGS(fs_info
, ref
, full_ref
, action
)
1142 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
1143 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1145 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1146 struct btrfs_delayed_data_ref
*full_ref
,
1149 TP_ARGS(ref
, full_ref
, action
),
1152 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1153 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1154 ctf_integer(int, action
, action
)
1155 ctf_integer(u64
, parent
, full_ref
->parent
)
1156 ctf_integer(u64
, ref_root
, full_ref
->root
)
1157 ctf_integer(u64
, owner
, full_ref
->objectid
)
1158 ctf_integer(u64
, offset
, full_ref
->offset
)
1159 ctf_integer(int, type
, ref
->type
)
1160 ctf_integer(u64
, seq
, ref
->seq
)
1164 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
1166 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1167 struct btrfs_delayed_data_ref
*full_ref
,
1170 TP_ARGS(ref
, full_ref
, action
),
1173 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1174 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1175 ctf_integer(int, action
, action
)
1176 ctf_integer(u64
, parent
, full_ref
->parent
)
1177 ctf_integer(u64
, ref_root
, full_ref
->root
)
1178 ctf_integer(u64
, owner
, full_ref
->objectid
)
1179 ctf_integer(u64
, offset
, full_ref
->offset
)
1180 ctf_integer(int, type
, ref
->type
)
1185 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1186 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1188 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1189 const struct btrfs_delayed_ref_head
*head_ref
,
1192 TP_ARGS(fs_info
, head_ref
, action
),
1195 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1196 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1197 ctf_integer(int, action
, action
)
1198 ctf_integer(int, is_data
, head_ref
->is_data
)
1202 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1204 add_delayed_ref_head
,
1206 btrfs_add_delayed_ref_head
,
1208 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1209 const struct btrfs_delayed_ref_head
*head_ref
,
1212 TP_ARGS(fs_info
, head_ref
, action
)
1215 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1217 run_delayed_ref_head
,
1219 btrfs_run_delayed_ref_head
,
1221 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1222 const struct btrfs_delayed_ref_head
*head_ref
,
1225 TP_ARGS(fs_info
, head_ref
, action
)
1228 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1229 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1230 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1231 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1232 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1233 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1234 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1235 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1237 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1239 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1240 const struct btrfs_delayed_ref_node
*ref
,
1241 const struct btrfs_delayed_ref_head
*head_ref
,
1244 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1247 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1248 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1249 ctf_integer(int, action
, action
)
1250 ctf_integer(int, is_data
, head_ref
->is_data
)
1254 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1256 add_delayed_ref_head
,
1258 btrfs_add_delayed_ref_head
,
1260 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1261 const struct btrfs_delayed_ref_node
*ref
,
1262 const struct btrfs_delayed_ref_head
*head_ref
,
1265 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1268 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1270 run_delayed_ref_head
,
1272 btrfs_run_delayed_ref_head
,
1274 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1275 const struct btrfs_delayed_ref_node
*ref
,
1276 const struct btrfs_delayed_ref_head
*head_ref
,
1279 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1282 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1283 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1285 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1286 struct btrfs_delayed_ref_node
*ref
,
1287 struct btrfs_delayed_ref_head
*head_ref
,
1290 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1293 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1294 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1295 ctf_integer(int, action
, action
)
1296 ctf_integer(int, is_data
, head_ref
->is_data
)
1300 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1302 add_delayed_ref_head
,
1304 btrfs_add_delayed_ref_head
,
1306 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1307 struct btrfs_delayed_ref_node
*ref
,
1308 struct btrfs_delayed_ref_head
*head_ref
,
1311 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1314 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1316 run_delayed_ref_head
,
1318 btrfs_run_delayed_ref_head
,
1320 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1321 struct btrfs_delayed_ref_node
*ref
,
1322 struct btrfs_delayed_ref_head
*head_ref
,
1325 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1328 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1329 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1331 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1332 const struct btrfs_delayed_ref_head
*head_ref
,
1335 TP_ARGS(ref
, head_ref
, action
),
1338 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1339 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1340 ctf_integer(int, action
, action
)
1341 ctf_integer(int, is_data
, head_ref
->is_data
)
1345 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1347 add_delayed_ref_head
,
1349 btrfs_add_delayed_ref_head
,
1351 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1352 const struct btrfs_delayed_ref_head
*head_ref
,
1355 TP_ARGS(ref
, head_ref
, action
)
1358 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1360 run_delayed_ref_head
,
1362 btrfs_run_delayed_ref_head
,
1364 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1365 const struct btrfs_delayed_ref_head
*head_ref
,
1368 TP_ARGS(ref
, head_ref
, action
)
1371 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1372 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1374 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1375 struct btrfs_delayed_ref_head
*head_ref
,
1378 TP_ARGS(ref
, head_ref
, action
),
1381 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1382 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1383 ctf_integer(int, action
, action
)
1384 ctf_integer(int, is_data
, head_ref
->is_data
)
1388 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1390 add_delayed_ref_head
,
1392 btrfs_add_delayed_ref_head
,
1394 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1395 struct btrfs_delayed_ref_head
*head_ref
,
1398 TP_ARGS(ref
, head_ref
, action
)
1401 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1403 run_delayed_ref_head
,
1405 btrfs_run_delayed_ref_head
,
1407 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1408 struct btrfs_delayed_ref_head
*head_ref
,
1411 TP_ARGS(ref
, head_ref
, action
)
1415 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1417 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1418 struct btrfs_delayed_ref_head
*head_ref
,
1421 TP_ARGS(ref
, head_ref
, action
),
1424 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1425 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1426 ctf_integer(int, action
, action
)
1427 ctf_integer(int, is_data
, head_ref
->is_data
)
1432 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1434 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1436 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1437 u64 offset
, u64 size
),
1439 TP_ARGS(fs_info
, map
, offset
, size
),
1442 ctf_integer(int, num_stripes
, map
->num_stripes
)
1443 ctf_integer(u64
, type
, map
->type
)
1444 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1445 ctf_integer(u64
, offset
, offset
)
1446 ctf_integer(u64
, size
, size
)
1447 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1451 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1453 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1454 u64 offset
, u64 size
),
1456 TP_ARGS(info
, map
, offset
, size
)
1459 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1461 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1462 u64 offset
, u64 size
),
1464 TP_ARGS(info
, map
, offset
, size
)
1467 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1469 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1471 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1472 u64 offset
, u64 size
),
1474 TP_ARGS(fs_info
, map
, offset
, size
),
1477 ctf_integer(int, num_stripes
, map
->num_stripes
)
1478 ctf_integer(u64
, type
, map
->type
)
1479 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1480 ctf_integer(u64
, offset
, offset
)
1481 ctf_integer(u64
, size
, size
)
1482 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1486 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1488 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1489 u64 offset
, u64 size
),
1491 TP_ARGS(info
, map
, offset
, size
)
1494 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1496 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1497 u64 offset
, u64 size
),
1499 TP_ARGS(info
, map
, offset
, size
)
1502 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1503 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1504 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1505 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1507 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1509 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1510 u64 offset
, u64 size
),
1512 TP_ARGS(root
, map
, offset
, size
),
1515 ctf_integer(int, num_stripes
, map
->num_stripes
)
1516 ctf_integer(u64
, type
, map
->type
)
1517 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1518 ctf_integer(u64
, offset
, offset
)
1519 ctf_integer(u64
, size
, size
)
1520 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1524 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1526 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1527 u64 offset
, u64 size
),
1529 TP_ARGS(root
, map
, offset
, size
)
1532 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1534 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1535 u64 offset
, u64 size
),
1537 TP_ARGS(root
, map
, offset
, size
)
1540 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1542 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1544 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1545 u64 offset
, u64 size
),
1547 TP_ARGS(root
, map
, offset
, size
),
1550 ctf_integer(int, num_stripes
, map
->num_stripes
)
1551 ctf_integer(u64
, type
, map
->type
)
1552 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1553 ctf_integer(u64
, offset
, offset
)
1554 ctf_integer(u64
, size
, size
)
1555 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1559 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1561 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1562 u64 offset
, u64 size
),
1564 TP_ARGS(root
, map
, offset
, size
)
1567 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1569 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1570 u64 offset
, u64 size
),
1572 TP_ARGS(root
, map
, offset
, size
)
1575 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1577 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1578 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1579 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1580 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1581 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1582 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1584 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1585 const struct extent_buffer
*cow
),
1587 TP_ARGS(root
, buf
, cow
),
1590 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1591 ctf_integer(u64
, buf_start
, buf
->start
)
1592 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1593 ctf_integer(u64
, cow_start
, cow
->start
)
1594 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1595 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1599 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1601 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1602 struct extent_buffer
*cow
),
1604 TP_ARGS(root
, buf
, cow
),
1607 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1608 ctf_integer(u64
, buf_start
, buf
->start
)
1609 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1610 ctf_integer(u64
, cow_start
, cow
->start
)
1611 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1612 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1617 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1618 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1619 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1620 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1621 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1622 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1624 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1625 u64 bytes
, int reserve
),
1627 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1630 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1631 ctf_string(type
, type
)
1632 ctf_integer(u64
, val
, val
)
1633 ctf_integer(u64
, bytes
, bytes
)
1634 ctf_integer(int, reserve
, reserve
)
1637 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1638 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1640 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1641 u64 bytes
, int reserve
),
1643 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1646 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1647 ctf_string(type
, type
)
1648 ctf_integer(u64
, val
, val
)
1649 ctf_integer(u64
, bytes
, bytes
)
1650 ctf_integer(int, reserve
, reserve
)
1655 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1657 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1659 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1661 TP_ARGS(info
, start
, len
),
1664 ctf_integer(u64
, start
, start
)
1665 ctf_integer(u64
, len
, len
)
1669 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1671 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1673 TP_ARGS(info
, start
, len
)
1676 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1678 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1680 TP_ARGS(info
, start
, len
)
1683 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1685 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1687 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1689 TP_ARGS(info
, start
, len
),
1692 ctf_integer(u64
, start
, start
)
1693 ctf_integer(u64
, len
, len
)
1697 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1699 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1701 TP_ARGS(info
, start
, len
)
1704 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1706 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1708 TP_ARGS(info
, start
, len
)
1711 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1712 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1713 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1714 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1716 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1718 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1720 TP_ARGS(root
, start
, len
),
1723 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1724 ctf_integer(u64
, start
, start
)
1725 ctf_integer(u64
, len
, len
)
1729 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1731 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1733 TP_ARGS(root
, start
, len
)
1736 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1738 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1740 TP_ARGS(root
, start
, len
)
1743 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1745 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1747 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1749 TP_ARGS(root
, start
, len
),
1752 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1753 ctf_integer(u64
, start
, start
)
1754 ctf_integer(u64
, len
, len
)
1758 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1760 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1762 TP_ARGS(root
, start
, len
)
1765 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1767 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1769 TP_ARGS(root
, start
, len
)
1772 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1774 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1775 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1777 btrfs_find_free_extent
,
1779 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1782 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1785 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1786 ctf_integer(u64
, num_bytes
, num_bytes
)
1787 ctf_integer(u64
, empty_size
, empty_size
)
1788 ctf_integer(u64
, data
, data
)
1792 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1794 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1797 TP_ARGS(block_group
, start
, len
),
1800 ctf_array(u8
, fsid
, block_group
->fs_info
->fsid
, BTRFS_UUID_SIZE
)
1801 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1802 ctf_integer(u64
, flags
, block_group
->flags
)
1803 ctf_integer(u64
, start
, start
)
1804 ctf_integer(u64
, len
, len
)
1808 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1810 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1813 TP_ARGS(block_group
, start
, len
)
1816 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1818 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1821 TP_ARGS(block_group
, start
, len
)
1824 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1825 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1827 btrfs_find_free_extent
,
1829 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1832 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1835 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1836 ctf_integer(u64
, num_bytes
, num_bytes
)
1837 ctf_integer(u64
, empty_size
, empty_size
)
1838 ctf_integer(u64
, data
, data
)
1842 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1844 TP_PROTO(const struct btrfs_fs_info
*info
,
1845 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1848 TP_ARGS(info
, block_group
, start
, len
),
1851 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1852 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1853 ctf_integer(u64
, flags
, block_group
->flags
)
1854 ctf_integer(u64
, start
, start
)
1855 ctf_integer(u64
, len
, len
)
1859 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1861 TP_PROTO(const struct btrfs_fs_info
*info
,
1862 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1865 TP_ARGS(info
, block_group
, start
, len
)
1868 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1870 TP_PROTO(const struct btrfs_fs_info
*info
,
1871 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1874 TP_ARGS(info
, block_group
, start
, len
)
1877 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1879 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1881 btrfs_find_free_extent
,
1883 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1886 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1889 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1890 ctf_integer(u64
, num_bytes
, num_bytes
)
1891 ctf_integer(u64
, empty_size
, empty_size
)
1892 ctf_integer(u64
, data
, data
)
1896 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1898 TP_PROTO(struct btrfs_fs_info
*info
,
1899 struct btrfs_block_group_cache
*block_group
, u64 start
,
1902 TP_ARGS(info
, block_group
, start
, len
),
1905 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1906 ctf_integer(u64
, flags
, block_group
->flags
)
1907 ctf_integer(u64
, start
, start
)
1908 ctf_integer(u64
, len
, len
)
1912 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1914 TP_PROTO(struct btrfs_fs_info
*info
,
1915 struct btrfs_block_group_cache
*block_group
, u64 start
,
1918 TP_ARGS(info
, block_group
, start
, len
)
1921 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1923 TP_PROTO(struct btrfs_fs_info
*info
,
1924 struct btrfs_block_group_cache
*block_group
, u64 start
,
1927 TP_ARGS(info
, block_group
, start
, len
)
1929 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1930 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1931 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1932 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1934 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1936 btrfs_find_free_extent
,
1938 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1941 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1944 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1945 ctf_integer(u64
, num_bytes
, num_bytes
)
1946 ctf_integer(u64
, empty_size
, empty_size
)
1947 ctf_integer(u64
, data
, data
)
1951 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1953 TP_PROTO(const struct btrfs_root
*root
,
1954 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1957 TP_ARGS(root
, block_group
, start
, len
),
1960 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1961 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1962 ctf_integer(u64
, flags
, block_group
->flags
)
1963 ctf_integer(u64
, start
, start
)
1964 ctf_integer(u64
, len
, len
)
1968 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1970 TP_PROTO(const struct btrfs_root
*root
,
1971 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1974 TP_ARGS(root
, block_group
, start
, len
)
1977 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1979 TP_PROTO(const struct btrfs_root
*root
,
1980 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1983 TP_ARGS(root
, block_group
, start
, len
)
1986 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1988 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1990 btrfs_find_free_extent
,
1992 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1995 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1998 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1999 ctf_integer(u64
, num_bytes
, num_bytes
)
2000 ctf_integer(u64
, empty_size
, empty_size
)
2001 ctf_integer(u64
, data
, data
)
2005 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
2007 TP_PROTO(struct btrfs_root
*root
,
2008 struct btrfs_block_group_cache
*block_group
, u64 start
,
2011 TP_ARGS(root
, block_group
, start
, len
),
2014 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
2015 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2016 ctf_integer(u64
, flags
, block_group
->flags
)
2017 ctf_integer(u64
, start
, start
)
2018 ctf_integer(u64
, len
, len
)
2022 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
2024 TP_PROTO(struct btrfs_root
*root
,
2025 struct btrfs_block_group_cache
*block_group
, u64 start
,
2028 TP_ARGS(root
, block_group
, start
, len
)
2031 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
2033 TP_PROTO(struct btrfs_root
*root
,
2034 struct btrfs_block_group_cache
*block_group
, u64 start
,
2037 TP_ARGS(root
, block_group
, start
, len
)
2040 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
2042 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2043 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2044 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2045 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2046 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2047 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2049 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
2050 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2052 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2055 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2056 ctf_integer(u64
, flags
, block_group
->flags
)
2057 ctf_integer(u64
, start
, start
)
2058 ctf_integer(u64
, bytes
, bytes
)
2059 ctf_integer(u64
, empty_size
, empty_size
)
2060 ctf_integer(u64
, min_bytes
, min_bytes
)
2064 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2066 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
2068 TP_ARGS(block_group
),
2071 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2075 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2077 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
2078 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2080 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2083 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2084 ctf_integer(u64
, flags
, block_group
->flags
)
2085 ctf_integer(u64
, start
, cluster
->window_start
)
2086 ctf_integer(u64
, max_size
, cluster
->max_size
)
2087 ctf_integer(u64
, size
, size
)
2088 ctf_integer(int, bitmap
, bitmap
)
2091 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
2092 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
2094 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
2095 u64 bytes
, u64 empty_size
, u64 min_bytes
),
2097 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
2100 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2101 ctf_integer(u64
, flags
, block_group
->flags
)
2102 ctf_integer(u64
, start
, start
)
2103 ctf_integer(u64
, bytes
, bytes
)
2104 ctf_integer(u64
, empty_size
, empty_size
)
2105 ctf_integer(u64
, min_bytes
, min_bytes
)
2109 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
2111 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
2113 TP_ARGS(block_group
),
2116 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2120 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
2122 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
2123 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
2125 TP_ARGS(block_group
, cluster
, size
, bitmap
),
2128 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
2129 ctf_integer(u64
, flags
, block_group
->flags
)
2130 ctf_integer(u64
, start
, cluster
->window_start
)
2131 ctf_integer(u64
, max_size
, cluster
->max_size
)
2132 ctf_integer(u64
, size
, size
)
2133 ctf_integer(int, bitmap
, bitmap
)
2138 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
2139 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2140 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2141 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2142 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2143 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2145 btrfs_alloc_extent_state
,
2147 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2149 TP_ARGS(state
, mask
, IP
),
2152 ctf_integer_hex(const struct extent_state
*, state
, state
)
2153 ctf_integer(gfp_t
, mask
, mask
)
2154 ctf_integer(unsigned long, ip
, IP
)
2158 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2160 btrfs_free_extent_state
,
2162 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
2167 ctf_integer_hex(const struct extent_state
*, state
, state
)
2168 ctf_integer(unsigned long, ip
, IP
)
2171 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
2172 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
2174 btrfs_alloc_extent_state
,
2176 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
2178 TP_ARGS(state
, mask
, IP
),
2181 ctf_integer_hex(struct extent_state
*, state
, state
)
2182 ctf_integer(gfp_t
, mask
, mask
)
2183 ctf_integer(unsigned long, ip
, IP
)
2187 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
2189 btrfs_free_extent_state
,
2191 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
2196 ctf_integer_hex(struct extent_state
*, state
, state
)
2197 ctf_integer(unsigned long, ip
, IP
)
2202 #endif /* LTTNG_TRACE_BTRFS_H */
2204 /* This part must be outside protection */
2205 #include <probes/define_trace.h>