Add ordered extents tracepoints to btrfs probe
[lttng-modules.git] / include / instrumentation / events / btrfs.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM btrfs
4
5 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_BTRFS_H
7
8 #include <lttng/tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <lttng/kernel-version.h>
11
12 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
13 #include <../fs/btrfs/accessors.h>
14 #endif
15
16 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
17 #include <../fs/btrfs/extent-tree.h>
18 #endif
19
20 #ifndef _TRACE_BTRFS_DEF_
21 #define _TRACE_BTRFS_DEF_
22 struct btrfs_root;
23 struct btrfs_fs_info;
24 struct btrfs_inode;
25 struct extent_map;
26 struct btrfs_ordered_extent;
27 struct btrfs_delayed_ref_node;
28 struct btrfs_delayed_tree_ref;
29 struct btrfs_delayed_data_ref;
30 struct btrfs_delayed_ref_head;
31 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
32 struct btrfs_block_group;
33 #else
34 struct btrfs_block_group_cache;
35 #endif
36 struct btrfs_free_cluster;
37 struct map_lookup;
38 struct extent_buffer;
39 struct extent_state;
40 #endif
41
42 #define BTRFS_UUID_SIZE 16
43
44 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
45 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
46 #else
47 #define lttng_fs_info_fsid fs_info->fsid
48 #endif
49
50 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
51 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
52
53 TP_PROTO(const struct btrfs_fs_info *fs_info),
54
55 TP_ARGS(fs_info),
56
57 TP_FIELDS(
58 ctf_integer(u64, generation, fs_info->generation)
59 ctf_integer(u64, root_objectid, BTRFS_ROOT_TREE_OBJECTID)
60 )
61 )
62 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
63 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
64 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
65 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
66 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
67 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
68
69 TP_PROTO(const struct btrfs_root *root),
70
71 TP_ARGS(root),
72
73 TP_FIELDS(
74 ctf_integer(u64, generation, root->fs_info->generation)
75 ctf_integer(u64, root_objectid, root->root_key.objectid)
76 )
77 )
78 #else
79 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
80
81 TP_PROTO(struct btrfs_root *root),
82
83 TP_ARGS(root),
84
85 TP_FIELDS(
86 ctf_integer(u64, generation, root->fs_info->generation)
87 ctf_integer(u64, root_objectid, root->root_key.objectid)
88 )
89 )
90 #endif
91
92 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
93 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
94 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
95 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
96 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
97 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
98
99 TP_PROTO(const struct inode *inode),
100
101 TP_ARGS(inode),
102
103 TP_FIELDS(
104 ctf_integer(ino_t, ino, inode->i_ino)
105 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
106 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
107 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
108 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
109 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
110 ctf_integer(u64, root_objectid,
111 BTRFS_I(inode)->root->root_key.objectid)
112 )
113 )
114
115 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
116
117 TP_PROTO(const struct inode *inode),
118
119 TP_ARGS(inode)
120 )
121
122 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
123
124 TP_PROTO(const struct inode *inode),
125
126 TP_ARGS(inode)
127 )
128
129 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
130
131 TP_PROTO(const struct inode *inode),
132
133 TP_ARGS(inode)
134 )
135 #else
136 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
137
138 TP_PROTO(struct inode *inode),
139
140 TP_ARGS(inode),
141
142 TP_FIELDS(
143 ctf_integer(ino_t, ino, inode->i_ino)
144 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
145 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
146 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
147 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
148 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
149 ctf_integer(u64, root_objectid,
150 BTRFS_I(inode)->root->root_key.objectid)
151 )
152 )
153
154 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
155
156 TP_PROTO(struct inode *inode),
157
158 TP_ARGS(inode)
159 )
160
161 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
162
163 TP_PROTO(struct inode *inode),
164
165 TP_ARGS(inode)
166 )
167
168 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
169
170 TP_PROTO(struct inode *inode),
171
172 TP_ARGS(inode)
173 )
174 #endif
175
176 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
177
178 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
179
180 TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
181 const struct extent_map *map),
182
183 TP_ARGS(root, inode, map),
184
185 TP_FIELDS(
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)
196 )
197 )
198
199 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
200
201 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
202
203 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
204 struct extent_map *map),
205
206 TP_ARGS(root, inode, map),
207
208 TP_FIELDS(
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, refcount_read(&map->refs))
218 ctf_integer(unsigned int, compress_type, map->compress_type)
219 )
220 )
221
222 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
223
224 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
225
226 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
227 struct extent_map *map),
228
229 TP_ARGS(root, inode, map),
230
231 TP_FIELDS(
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)
242 )
243 )
244
245 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
246
247 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
248
249 TP_PROTO(struct btrfs_root *root, struct inode *inode,
250 struct extent_map *map),
251
252 TP_ARGS(root, inode, map),
253
254 TP_FIELDS(
255 ctf_integer(u64, root_objectid, root->root_key.objectid)
256 ctf_integer(u64, ino, btrfs_ino(inode))
257 ctf_integer(u64, start, map->start)
258 ctf_integer(u64, len, map->len)
259 ctf_integer(u64, orig_start, map->orig_start)
260 ctf_integer(u64, block_start, map->block_start)
261 ctf_integer(u64, block_len, map->block_len)
262 ctf_integer(unsigned long, flags, map->flags)
263 ctf_integer(int, refs, atomic_read(&map->refs))
264 ctf_integer(unsigned int, compress_type, map->compress_type)
265 )
266 )
267
268 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
269 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
270 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
271 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
272
273 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
274
275 TP_PROTO(const struct btrfs_root *root, const struct extent_map *map),
276
277 TP_ARGS(root, map),
278
279 TP_FIELDS(
280 ctf_integer(u64, root_objectid, root->root_key.objectid)
281 ctf_integer(u64, start, map->start)
282 ctf_integer(u64, len, map->len)
283 ctf_integer(u64, orig_start, map->orig_start)
284 ctf_integer(u64, block_start, map->block_start)
285 ctf_integer(u64, block_len, map->block_len)
286 ctf_integer(unsigned long, flags, map->flags)
287 ctf_integer(int, refs, atomic_read(&map->refs))
288 ctf_integer(unsigned int, compress_type, map->compress_type)
289 )
290 )
291
292 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
293
294 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
295
296 TP_PROTO(struct btrfs_root *root, struct extent_map *map),
297
298 TP_ARGS(root, map),
299
300 TP_FIELDS(
301 ctf_integer(u64, root_objectid, root->root_key.objectid)
302 ctf_integer(u64, start, map->start)
303 ctf_integer(u64, len, map->len)
304 ctf_integer(u64, orig_start, map->orig_start)
305 ctf_integer(u64, block_start, map->block_start)
306 ctf_integer(u64, block_len, map->block_len)
307 ctf_integer(unsigned long, flags, map->flags)
308 ctf_integer(int, refs, atomic_read(&map->refs))
309 ctf_integer(unsigned int, compress_type, map->compress_type)
310 )
311 )
312
313 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
314
315 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
316 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
317
318 TP_PROTO(const struct btrfs_fs_info *fs_info,
319 const struct extent_map *existing, const struct extent_map *map,
320 u64 start, u64 len),
321
322 TP_ARGS(fs_info, existing, map, start, len),
323
324 TP_FIELDS(
325 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
326 ctf_integer(u64, e_start, existing->start)
327 ctf_integer(u64, e_len, existing->len)
328 ctf_integer(u64, map_start, map->start)
329 ctf_integer(u64, map_len, map->len)
330 ctf_integer(u64, start, start)
331 ctf_integer(u64, len, len)
332 )
333 )
334 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
335 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
336
337 TP_PROTO(struct btrfs_fs_info *fs_info,
338 const struct extent_map *existing, const struct extent_map *map,
339 u64 start, u64 len),
340
341 TP_ARGS(fs_info, existing, map, start, len),
342
343 TP_FIELDS(
344 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
345 ctf_integer(u64, e_start, existing->start)
346 ctf_integer(u64, e_len, existing->len)
347 ctf_integer(u64, map_start, map->start)
348 ctf_integer(u64, map_len, map->len)
349 ctf_integer(u64, start, start)
350 ctf_integer(u64, len, len)
351 )
352 )
353 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
354 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
355
356 TP_PROTO(const struct extent_map *existing, const struct extent_map *map, u64 start, u64 len),
357
358 TP_ARGS(existing, map, start, len),
359
360 TP_FIELDS(
361 ctf_integer(u64, e_start, existing->start)
362 ctf_integer(u64, e_len, existing->len)
363 ctf_integer(u64, map_start, map->start)
364 ctf_integer(u64, map_len, map->len)
365 ctf_integer(u64, start, start)
366 ctf_integer(u64, len, len)
367 )
368 )
369 #endif
370
371 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
372 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
373
374 TP_PROTO(const struct btrfs_inode *inode,
375 const struct btrfs_ordered_extent *ordered),
376
377 TP_ARGS(inode, ordered),
378
379 TP_FIELDS(
380 ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
381 ctf_integer(ino_t, ino, btrfs_ino(inode))
382 ctf_integer(u64, file_offset, ordered->file_offset)
383 ctf_integer(u64, start, ordered->disk_bytenr)
384 ctf_integer(u64, len, ordered->num_bytes)
385 ctf_integer(u64, disk_len, ordered->disk_num_bytes)
386 ctf_integer(u64, bytes_left, ordered->bytes_left)
387 ctf_integer(unsigned long, flags, ordered->flags)
388 ctf_integer(int, compress_type, ordered->compress_type)
389 ctf_integer(int, refs, refcount_read(&ordered->refs))
390 ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
391 )
392 )
393 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
394 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
395
396 TP_PROTO(const struct inode *inode,
397 const struct btrfs_ordered_extent *ordered),
398
399 TP_ARGS(inode, ordered),
400
401 TP_FIELDS(
402 ctf_integer(ino_t, ino, inode->i_ino)
403 ctf_integer(u64, file_offset, ordered->file_offset)
404 ctf_integer(u64, start, ordered->disk_bytenr)
405 ctf_integer(u64, len, ordered->num_bytes)
406 ctf_integer(u64, disk_len, ordered->disk_num_bytes)
407 ctf_integer(u64, bytes_left, ordered->bytes_left)
408 ctf_integer(unsigned long, flags, ordered->flags)
409 ctf_integer(int, compress_type, ordered->compress_type)
410 ctf_integer(int, refs, refcount_read(&ordered->refs))
411 ctf_integer(u64, root_objectid,
412 BTRFS_I(inode)->root->root_key.objectid)
413 )
414 )
415 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
416 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
417
418 TP_PROTO(const struct inode *inode,
419 const struct btrfs_ordered_extent *ordered),
420
421 TP_ARGS(inode, ordered),
422
423 TP_FIELDS(
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, refcount_read(&ordered->refs))
433 ctf_integer(u64, root_objectid,
434 BTRFS_I(inode)->root->root_key.objectid)
435 )
436 )
437 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
438 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
439
440 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
441
442 TP_ARGS(inode, ordered),
443
444 TP_FIELDS(
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, refcount_read(&ordered->refs))
454 ctf_integer(u64, root_objectid,
455 BTRFS_I(inode)->root->root_key.objectid)
456 )
457 )
458 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
459 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
460 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
461 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
462 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
463
464 TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered),
465
466 TP_ARGS(inode, ordered),
467
468 TP_FIELDS(
469 ctf_integer(ino_t, ino, inode->i_ino)
470 ctf_integer(u64, file_offset, ordered->file_offset)
471 ctf_integer(u64, start, ordered->start)
472 ctf_integer(u64, len, ordered->len)
473 ctf_integer(u64, disk_len, ordered->disk_len)
474 ctf_integer(u64, bytes_left, ordered->bytes_left)
475 ctf_integer(unsigned long, flags, ordered->flags)
476 ctf_integer(int, compress_type, ordered->compress_type)
477 ctf_integer(int, refs, atomic_read(&ordered->refs))
478 ctf_integer(u64, root_objectid,
479 BTRFS_I(inode)->root->root_key.objectid)
480 )
481 )
482 #else
483 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
484
485 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
486
487 TP_ARGS(inode, ordered),
488
489 TP_FIELDS(
490 ctf_integer(ino_t, ino, inode->i_ino)
491 ctf_integer(u64, file_offset, ordered->file_offset)
492 ctf_integer(u64, start, ordered->start)
493 ctf_integer(u64, len, ordered->len)
494 ctf_integer(u64, disk_len, ordered->disk_len)
495 ctf_integer(u64, bytes_left, ordered->bytes_left)
496 ctf_integer(unsigned long, flags, ordered->flags)
497 ctf_integer(int, compress_type, ordered->compress_type)
498 ctf_integer(int, refs, atomic_read(&ordered->refs))
499 ctf_integer(u64, root_objectid,
500 BTRFS_I(inode)->root->root_key.objectid)
501 )
502 )
503 #endif
504
505 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
506 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
507
508 TP_PROTO(const struct btrfs_inode *inode,
509 const struct btrfs_ordered_extent *ordered),
510
511 TP_ARGS(inode, ordered)
512 )
513
514 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
515
516 TP_PROTO(const struct btrfs_inode *inode,
517 const struct btrfs_ordered_extent *ordered),
518
519 TP_ARGS(inode, ordered)
520 )
521
522 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
523
524 TP_PROTO(const struct btrfs_inode *inode,
525 const struct btrfs_ordered_extent *ordered),
526
527 TP_ARGS(inode, ordered)
528 )
529
530 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
531
532 TP_PROTO(const struct btrfs_inode *inode,
533 const struct btrfs_ordered_extent *ordered),
534
535 TP_ARGS(inode, ordered)
536 )
537 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
538 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
539 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
540 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
541 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
542 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
543
544 TP_PROTO(const struct inode *inode,
545 const struct btrfs_ordered_extent *ordered),
546
547 TP_ARGS(inode, ordered)
548 )
549
550 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
551
552 TP_PROTO(const struct inode *inode,
553 const struct btrfs_ordered_extent *ordered),
554
555 TP_ARGS(inode, ordered)
556 )
557
558 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
559
560 TP_PROTO(const struct inode *inode,
561 const struct btrfs_ordered_extent *ordered),
562
563 TP_ARGS(inode, ordered)
564 )
565
566 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
567
568 TP_PROTO(const struct inode *inode,
569 const struct btrfs_ordered_extent *ordered),
570
571 TP_ARGS(inode, ordered)
572 )
573 #else
574 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
575
576 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
577
578 TP_ARGS(inode, ordered)
579 )
580
581 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
582
583 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
584
585 TP_ARGS(inode, ordered)
586 )
587
588 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
589
590 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
591
592 TP_ARGS(inode, ordered)
593 )
594
595 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
596
597 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
598
599 TP_ARGS(inode, ordered)
600 )
601 #endif
602
603 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
604 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup,
605
606 TP_PROTO(const struct btrfs_inode *inode,
607 const struct btrfs_ordered_extent *ordered),
608
609 TP_ARGS(inode, ordered)
610 )
611
612 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_range,
613
614 TP_PROTO(const struct btrfs_inode *inode,
615 const struct btrfs_ordered_extent *ordered),
616
617 TP_ARGS(inode, ordered)
618 )
619
620 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first_range,
621
622 TP_PROTO(const struct btrfs_inode *inode,
623 const struct btrfs_ordered_extent *ordered),
624
625 TP_ARGS(inode, ordered)
626 )
627
628 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_for_logging,
629
630 TP_PROTO(const struct btrfs_inode *inode,
631 const struct btrfs_ordered_extent *ordered),
632
633 TP_ARGS(inode, ordered)
634 )
635
636 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first,
637
638 TP_PROTO(const struct btrfs_inode *inode,
639 const struct btrfs_ordered_extent *ordered),
640
641 TP_ARGS(inode, ordered)
642 )
643
644 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_split,
645
646 TP_PROTO(const struct btrfs_inode *inode,
647 const struct btrfs_ordered_extent *ordered),
648
649 TP_ARGS(inode, ordered)
650 )
651
652 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_dec_test_pending,
653
654 TP_PROTO(const struct btrfs_inode *inode,
655 const struct btrfs_ordered_extent *ordered),
656
657 TP_ARGS(inode, ordered)
658 )
659
660 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_mark_finished,
661
662 TP_PROTO(const struct btrfs_inode *inode,
663 const struct btrfs_ordered_extent *ordered),
664
665 TP_ARGS(inode, ordered)
666 )
667 #endif
668
669 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
670 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
671
672 TP_PROTO(const struct btrfs_inode *inode, u64 start, u64 end, int uptodate),
673
674 TP_ARGS(inode, start, end, uptodate),
675
676 TP_FIELDS(
677 ctf_integer(u64, ino, btrfs_ino(inode))
678 ctf_integer(u64, start, start)
679 ctf_integer(u64, end, end)
680 ctf_integer(int, uptodate, uptodate)
681 ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
682 )
683 )
684
685 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
686 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
687 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
688 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
689 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
690
691 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
692
693 TP_PROTO(const struct page *page, u64 start, u64 end, int uptodate),
694
695 TP_ARGS(page, start, end, uptodate),
696
697 TP_FIELDS(
698 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
699 ctf_integer(pgoff_t, index, page->index)
700 ctf_integer(u64, start, start)
701 ctf_integer(u64, end, end)
702 ctf_integer(int, uptodate, uptodate)
703 ctf_integer(u64, root_objectid,
704 BTRFS_I(page->mapping->host)->root->root_key.objectid)
705 )
706 )
707
708 #else
709
710 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
711
712 TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
713
714 TP_ARGS(page, start, end, uptodate),
715
716 TP_FIELDS(
717 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
718 ctf_integer(pgoff_t, index, page->index)
719 ctf_integer(u64, start, start)
720 ctf_integer(u64, end, end)
721 ctf_integer(int, uptodate, uptodate)
722 ctf_integer(u64, root_objectid,
723 BTRFS_I(page->mapping->host)->root->root_key.objectid)
724 )
725 )
726 #endif
727
728 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
729 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
730 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
731 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
732 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
733 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
734
735 TP_PROTO(const struct page *page, const struct inode *inode,
736 const struct writeback_control *wbc),
737
738 TP_ARGS(page, inode, wbc),
739
740 TP_FIELDS(
741 ctf_integer(ino_t, ino, inode->i_ino)
742 ctf_integer(pgoff_t, index, page->index)
743 ctf_integer(long, nr_to_write, wbc->nr_to_write)
744 ctf_integer(long, pages_skipped, wbc->pages_skipped)
745 ctf_integer(loff_t, range_start, wbc->range_start)
746 ctf_integer(loff_t, range_end, wbc->range_end)
747 ctf_integer(char, for_kupdate, wbc->for_kupdate)
748 ctf_integer(char, for_reclaim, wbc->for_reclaim)
749 ctf_integer(char, range_cyclic, wbc->range_cyclic)
750 ctf_integer(pgoff_t, writeback_index,
751 inode->i_mapping->writeback_index)
752 ctf_integer(u64, root_objectid,
753 BTRFS_I(inode)->root->root_key.objectid)
754 )
755 )
756
757 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
758
759 __extent_writepage,
760
761 btrfs__extent_writepage,
762
763 TP_PROTO(const struct page *page, const struct inode *inode,
764 const struct writeback_control *wbc),
765
766 TP_ARGS(page, inode, wbc)
767 )
768
769 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
770
771 TP_PROTO(const struct file *file, int datasync),
772
773 TP_ARGS(file, datasync),
774
775 TP_FIELDS(
776 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
777 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
778 ctf_integer(int, datasync, datasync)
779 ctf_integer(u64, root_objectid,
780 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
781 )
782 )
783 #else
784 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
785
786 TP_PROTO(struct page *page, struct inode *inode,
787 struct writeback_control *wbc),
788
789 TP_ARGS(page, inode, wbc),
790
791 TP_FIELDS(
792 ctf_integer(ino_t, ino, inode->i_ino)
793 ctf_integer(pgoff_t, index, page->index)
794 ctf_integer(long, nr_to_write, wbc->nr_to_write)
795 ctf_integer(long, pages_skipped, wbc->pages_skipped)
796 ctf_integer(loff_t, range_start, wbc->range_start)
797 ctf_integer(loff_t, range_end, wbc->range_end)
798 ctf_integer(char, for_kupdate, wbc->for_kupdate)
799 ctf_integer(char, for_reclaim, wbc->for_reclaim)
800 ctf_integer(char, range_cyclic, wbc->range_cyclic)
801 ctf_integer(pgoff_t, writeback_index,
802 inode->i_mapping->writeback_index)
803 ctf_integer(u64, root_objectid,
804 BTRFS_I(inode)->root->root_key.objectid)
805 )
806 )
807
808 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
809
810 __extent_writepage,
811
812 btrfs__extent_writepage,
813
814 TP_PROTO(struct page *page, struct inode *inode,
815 struct writeback_control *wbc),
816
817 TP_ARGS(page, inode, wbc)
818 )
819
820 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
821
822 TP_PROTO(struct file *file, int datasync),
823
824 TP_ARGS(file, datasync),
825
826 TP_FIELDS(
827 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
828 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
829 ctf_integer(int, datasync, datasync)
830 ctf_integer(u64, root_objectid,
831 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
832 )
833 )
834 #endif
835
836 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
837 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
838 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
839 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
840 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
841 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
842 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
843 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
844 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
845
846 TP_PROTO(const struct btrfs_fs_info *fs_info, int wait),
847
848 TP_ARGS(fs_info, wait),
849
850 TP_FIELDS(
851 ctf_integer(int, wait, wait)
852 )
853 )
854 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
855 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
856
857 TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
858
859 TP_ARGS(fs_info, wait),
860
861 TP_FIELDS(
862 ctf_integer(int, wait, wait)
863 )
864 )
865 #else
866 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
867
868 TP_PROTO(int wait),
869
870 TP_ARGS(wait),
871
872 TP_FIELDS(
873 ctf_integer(int, wait, wait)
874 )
875 )
876 #endif
877
878 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
879 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
880
881 TP_PROTO(const struct btrfs_fs_info *fs_info,
882 const struct btrfs_block_group *block_group, int create),
883
884 TP_ARGS(fs_info, block_group, create),
885
886 TP_FIELDS(
887 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
888 ctf_integer(u64, offset, block_group->start)
889 ctf_integer(u64, size, block_group->length)
890 ctf_integer(u64, flags, block_group->flags)
891 ctf_integer(u64, bytes_used, block_group->used)
892 ctf_integer(u64, bytes_super, block_group->bytes_super)
893 ctf_integer(int, create, create)
894 )
895 )
896 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
897 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
898 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
899 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
900 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
901 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
902
903 TP_PROTO(const struct btrfs_fs_info *fs_info,
904 const struct btrfs_block_group_cache *block_group, int create),
905
906 TP_ARGS(fs_info, block_group, create),
907
908 TP_FIELDS(
909 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
910 ctf_integer(u64, offset, block_group->key.objectid)
911 ctf_integer(u64, size, block_group->key.offset)
912 ctf_integer(u64, flags, block_group->flags)
913 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
914 ctf_integer(u64, bytes_super, block_group->bytes_super)
915 ctf_integer(int, create, create)
916 )
917 )
918 #else
919 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
920
921 TP_PROTO(struct btrfs_fs_info *fs_info,
922 struct btrfs_block_group_cache *block_group, int create),
923
924 TP_ARGS(fs_info, block_group, create),
925
926 TP_FIELDS(
927 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
928 ctf_integer(u64, offset, block_group->key.objectid)
929 ctf_integer(u64, size, block_group->key.offset)
930 ctf_integer(u64, flags, block_group->flags)
931 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
932 ctf_integer(u64, bytes_super, block_group->bytes_super)
933 ctf_integer(int, create, create)
934 )
935 )
936 #endif
937
938 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
939 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
940 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
941 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
942 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
943 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
944 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
945 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
946 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
947
948 TP_PROTO(const struct btrfs_fs_info *fs_info,
949 const struct btrfs_delayed_ref_node *ref,
950 const struct btrfs_delayed_tree_ref *full_ref,
951 int action),
952
953 TP_ARGS(fs_info, ref, full_ref, action),
954
955 TP_FIELDS(
956 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
957 ctf_integer(u64, bytenr, ref->bytenr)
958 ctf_integer(u64, num_bytes, ref->num_bytes)
959 ctf_integer(int, action, action)
960 ctf_integer(u64, parent, full_ref->parent)
961 ctf_integer(u64, ref_root, full_ref->root)
962 ctf_integer(int, level, full_ref->level)
963 ctf_integer(int, type, ref->type)
964 ctf_integer(u64, seq, ref->seq)
965 )
966 )
967
968 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
969
970 add_delayed_tree_ref,
971
972 btrfs_add_delayed_tree_ref,
973
974 TP_PROTO(const struct btrfs_fs_info *fs_info,
975 const struct btrfs_delayed_ref_node *ref,
976 const struct btrfs_delayed_tree_ref *full_ref,
977 int action),
978
979 TP_ARGS(fs_info, ref, full_ref, action)
980 )
981
982 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
983
984 run_delayed_tree_ref,
985
986 btrfs_run_delayed_tree_ref,
987
988 TP_PROTO(const struct btrfs_fs_info *fs_info,
989 const struct btrfs_delayed_ref_node *ref,
990 const struct btrfs_delayed_tree_ref *full_ref,
991 int action),
992
993 TP_ARGS(fs_info, ref, full_ref, action)
994 )
995 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
996 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
997
998 TP_PROTO(struct btrfs_fs_info *fs_info,
999 struct btrfs_delayed_ref_node *ref,
1000 struct btrfs_delayed_tree_ref *full_ref,
1001 int action),
1002
1003 TP_ARGS(fs_info, ref, full_ref, action),
1004
1005 TP_FIELDS(
1006 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1007 ctf_integer(u64, bytenr, ref->bytenr)
1008 ctf_integer(u64, num_bytes, ref->num_bytes)
1009 ctf_integer(int, action, action)
1010 ctf_integer(u64, parent, full_ref->parent)
1011 ctf_integer(u64, ref_root, full_ref->root)
1012 ctf_integer(int, level, full_ref->level)
1013 ctf_integer(int, type, ref->type)
1014 ctf_integer(u64, seq, ref->seq)
1015 )
1016 )
1017
1018 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1019
1020 add_delayed_tree_ref,
1021
1022 btrfs_add_delayed_tree_ref,
1023
1024 TP_PROTO(struct btrfs_fs_info *fs_info,
1025 struct btrfs_delayed_ref_node *ref,
1026 struct btrfs_delayed_tree_ref *full_ref,
1027 int action),
1028
1029 TP_ARGS(fs_info, ref, full_ref, action)
1030 )
1031
1032 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1033
1034 run_delayed_tree_ref,
1035
1036 btrfs_run_delayed_tree_ref,
1037
1038 TP_PROTO(struct btrfs_fs_info *fs_info,
1039 struct btrfs_delayed_ref_node *ref,
1040 struct btrfs_delayed_tree_ref *full_ref,
1041 int action),
1042
1043 TP_ARGS(fs_info, ref, full_ref, action)
1044 )
1045 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1046 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1047
1048 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1049 const struct btrfs_delayed_tree_ref *full_ref,
1050 int action),
1051
1052 TP_ARGS(ref, full_ref, action),
1053
1054 TP_FIELDS(
1055 ctf_integer(u64, bytenr, ref->bytenr)
1056 ctf_integer(u64, num_bytes, ref->num_bytes)
1057 ctf_integer(int, action, action)
1058 ctf_integer(u64, parent, full_ref->parent)
1059 ctf_integer(u64, ref_root, full_ref->root)
1060 ctf_integer(int, level, full_ref->level)
1061 ctf_integer(int, type, ref->type)
1062 ctf_integer(u64, seq, ref->seq)
1063 )
1064 )
1065
1066 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1067
1068 add_delayed_tree_ref,
1069
1070 btrfs_add_delayed_tree_ref,
1071
1072 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1073 const struct btrfs_delayed_tree_ref *full_ref,
1074 int action),
1075
1076 TP_ARGS(ref, full_ref, action)
1077 )
1078
1079 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1080
1081 run_delayed_tree_ref,
1082
1083 btrfs_run_delayed_tree_ref,
1084
1085 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1086 const struct btrfs_delayed_tree_ref *full_ref,
1087 int action),
1088
1089 TP_ARGS(ref, full_ref, action)
1090 )
1091 #else
1092 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1093
1094 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1095 struct btrfs_delayed_tree_ref *full_ref,
1096 int action),
1097
1098 TP_ARGS(ref, full_ref, action),
1099
1100 TP_FIELDS(
1101 ctf_integer(u64, bytenr, ref->bytenr)
1102 ctf_integer(u64, num_bytes, ref->num_bytes)
1103 ctf_integer(int, action, action)
1104 ctf_integer(u64, parent, full_ref->parent)
1105 ctf_integer(u64, ref_root, full_ref->root)
1106 ctf_integer(int, level, full_ref->level)
1107 ctf_integer(int, type, ref->type)
1108 ctf_integer(u64, seq, ref->seq)
1109 )
1110 )
1111
1112 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1113
1114 add_delayed_tree_ref,
1115
1116 btrfs_add_delayed_tree_ref,
1117
1118 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1119 struct btrfs_delayed_tree_ref *full_ref,
1120 int action),
1121
1122 TP_ARGS(ref, full_ref, action)
1123 )
1124
1125 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1126
1127 run_delayed_tree_ref,
1128
1129 btrfs_run_delayed_tree_ref,
1130
1131 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1132 struct btrfs_delayed_tree_ref *full_ref,
1133 int action),
1134
1135 TP_ARGS(ref, full_ref, action)
1136 )
1137 #endif
1138
1139 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1140 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1141 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1142 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1143 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1144 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1145 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1146 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1147 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1148
1149 TP_PROTO(const struct btrfs_fs_info *fs_info,
1150 const struct btrfs_delayed_ref_node *ref,
1151 const struct btrfs_delayed_data_ref *full_ref,
1152 int action),
1153
1154 TP_ARGS(fs_info, ref, full_ref, action),
1155
1156 TP_FIELDS(
1157 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1158 ctf_integer(u64, bytenr, ref->bytenr)
1159 ctf_integer(u64, num_bytes, ref->num_bytes)
1160 ctf_integer(int, action, action)
1161 ctf_integer(u64, parent, full_ref->parent)
1162 ctf_integer(u64, ref_root, full_ref->root)
1163 ctf_integer(u64, owner, full_ref->objectid)
1164 ctf_integer(u64, offset, full_ref->offset)
1165 ctf_integer(int, type, ref->type)
1166 ctf_integer(u64, seq, ref->seq)
1167 )
1168 )
1169
1170 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1171
1172 add_delayed_data_ref,
1173
1174 btrfs_add_delayed_data_ref,
1175
1176 TP_PROTO(const struct btrfs_fs_info *fs_info,
1177 const struct btrfs_delayed_ref_node *ref,
1178 const struct btrfs_delayed_data_ref *full_ref,
1179 int action),
1180
1181 TP_ARGS(fs_info, ref, full_ref, action)
1182 )
1183
1184 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1185
1186 run_delayed_data_ref,
1187
1188 btrfs_run_delayed_data_ref,
1189
1190 TP_PROTO(const struct btrfs_fs_info *fs_info,
1191 const struct btrfs_delayed_ref_node *ref,
1192 const struct btrfs_delayed_data_ref *full_ref,
1193 int action),
1194
1195 TP_ARGS(fs_info, ref, full_ref, action)
1196 )
1197 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1198 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1199
1200 TP_PROTO(struct btrfs_fs_info *fs_info,
1201 struct btrfs_delayed_ref_node *ref,
1202 struct btrfs_delayed_data_ref *full_ref,
1203 int action),
1204
1205 TP_ARGS(fs_info, ref, full_ref, action),
1206
1207 TP_FIELDS(
1208 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1209 ctf_integer(u64, bytenr, ref->bytenr)
1210 ctf_integer(u64, num_bytes, ref->num_bytes)
1211 ctf_integer(int, action, action)
1212 ctf_integer(u64, parent, full_ref->parent)
1213 ctf_integer(u64, ref_root, full_ref->root)
1214 ctf_integer(u64, owner, full_ref->objectid)
1215 ctf_integer(u64, offset, full_ref->offset)
1216 ctf_integer(int, type, ref->type)
1217 ctf_integer(u64, seq, ref->seq)
1218 )
1219 )
1220
1221 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1222
1223 add_delayed_data_ref,
1224
1225 btrfs_add_delayed_data_ref,
1226
1227 TP_PROTO(struct btrfs_fs_info *fs_info,
1228 struct btrfs_delayed_ref_node *ref,
1229 struct btrfs_delayed_data_ref *full_ref,
1230 int action),
1231
1232 TP_ARGS(fs_info, ref, full_ref, action)
1233 )
1234
1235 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1236
1237 run_delayed_data_ref,
1238
1239 btrfs_run_delayed_data_ref,
1240
1241 TP_PROTO(struct btrfs_fs_info *fs_info,
1242 struct btrfs_delayed_ref_node *ref,
1243 struct btrfs_delayed_data_ref *full_ref,
1244 int action),
1245
1246 TP_ARGS(fs_info, ref, full_ref, action)
1247 )
1248 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1249 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1250
1251 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1252 const struct btrfs_delayed_data_ref *full_ref,
1253 int action),
1254
1255 TP_ARGS(ref, full_ref, action),
1256
1257 TP_FIELDS(
1258 ctf_integer(u64, bytenr, ref->bytenr)
1259 ctf_integer(u64, num_bytes, ref->num_bytes)
1260 ctf_integer(int, action, action)
1261 ctf_integer(u64, parent, full_ref->parent)
1262 ctf_integer(u64, ref_root, full_ref->root)
1263 ctf_integer(u64, owner, full_ref->objectid)
1264 ctf_integer(u64, offset, full_ref->offset)
1265 ctf_integer(int, type, ref->type)
1266 ctf_integer(u64, seq, ref->seq)
1267 )
1268 )
1269
1270 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1271
1272 add_delayed_data_ref,
1273
1274 btrfs_add_delayed_data_ref,
1275
1276 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1277 const struct btrfs_delayed_data_ref *full_ref,
1278 int action),
1279
1280 TP_ARGS(fs_info, ref, full_ref, action)
1281 )
1282
1283 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1284
1285 run_delayed_data_ref,
1286
1287 btrfs_run_delayed_data_ref,
1288
1289 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1290 const struct btrfs_delayed_data_ref *full_ref,
1291 int action),
1292
1293 TP_ARGS(fs_info, ref, full_ref, action)
1294 )
1295 #else
1296 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
1297
1298 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1299 struct btrfs_delayed_data_ref *full_ref,
1300 int action),
1301
1302 TP_ARGS(ref, full_ref, action),
1303
1304 TP_FIELDS(
1305 ctf_integer(u64, bytenr, ref->bytenr)
1306 ctf_integer(u64, num_bytes, ref->num_bytes)
1307 ctf_integer(int, action, action)
1308 ctf_integer(u64, parent, full_ref->parent)
1309 ctf_integer(u64, ref_root, full_ref->root)
1310 ctf_integer(u64, owner, full_ref->objectid)
1311 ctf_integer(u64, offset, full_ref->offset)
1312 ctf_integer(int, type, ref->type)
1313 ctf_integer(u64, seq, ref->seq)
1314 )
1315 )
1316
1317 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1318
1319 add_delayed_data_ref,
1320
1321 btrfs_add_delayed_data_ref,
1322
1323 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1324 struct btrfs_delayed_data_ref *full_ref,
1325 int action),
1326
1327 TP_ARGS(fs_info, ref, full_ref, action)
1328 )
1329
1330 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1331
1332 run_delayed_data_ref,
1333
1334 btrfs_run_delayed_data_ref,
1335
1336 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1337 struct btrfs_delayed_data_ref *full_ref,
1338 int action),
1339
1340 TP_ARGS(fs_info, ref, full_ref, action)
1341 )
1342 #endif
1343
1344 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
1345 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1346
1347 TP_PROTO(const struct btrfs_fs_info *fs_info,
1348 const struct btrfs_delayed_ref_head *head_ref,
1349 int action),
1350
1351 TP_ARGS(fs_info, head_ref, action),
1352
1353 TP_FIELDS(
1354 ctf_integer(u64, bytenr, head_ref->bytenr)
1355 ctf_integer(u64, num_bytes, head_ref->num_bytes)
1356 ctf_integer(int, action, action)
1357 ctf_integer(int, is_data, head_ref->is_data)
1358 )
1359 )
1360
1361 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1362
1363 add_delayed_ref_head,
1364
1365 btrfs_add_delayed_ref_head,
1366
1367 TP_PROTO(const struct btrfs_fs_info *fs_info,
1368 const struct btrfs_delayed_ref_head *head_ref,
1369 int action),
1370
1371 TP_ARGS(fs_info, head_ref, action)
1372 )
1373
1374 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1375
1376 run_delayed_ref_head,
1377
1378 btrfs_run_delayed_ref_head,
1379
1380 TP_PROTO(const struct btrfs_fs_info *fs_info,
1381 const struct btrfs_delayed_ref_head *head_ref,
1382 int action),
1383
1384 TP_ARGS(fs_info, head_ref, action)
1385 )
1386
1387 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1388 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1389 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1390 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1391 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \
1392 LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \
1393 LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \
1394 LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0))
1395
1396 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1397
1398 TP_PROTO(const struct btrfs_fs_info *fs_info,
1399 const struct btrfs_delayed_ref_node *ref,
1400 const struct btrfs_delayed_ref_head *head_ref,
1401 int action),
1402
1403 TP_ARGS(fs_info, ref, head_ref, action),
1404
1405 TP_FIELDS(
1406 ctf_integer(u64, bytenr, ref->bytenr)
1407 ctf_integer(u64, num_bytes, ref->num_bytes)
1408 ctf_integer(int, action, action)
1409 ctf_integer(int, is_data, head_ref->is_data)
1410 )
1411 )
1412
1413 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1414
1415 add_delayed_ref_head,
1416
1417 btrfs_add_delayed_ref_head,
1418
1419 TP_PROTO(const struct btrfs_fs_info *fs_info,
1420 const struct btrfs_delayed_ref_node *ref,
1421 const struct btrfs_delayed_ref_head *head_ref,
1422 int action),
1423
1424 TP_ARGS(fs_info, ref, head_ref, action)
1425 )
1426
1427 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1428
1429 run_delayed_ref_head,
1430
1431 btrfs_run_delayed_ref_head,
1432
1433 TP_PROTO(const struct btrfs_fs_info *fs_info,
1434 const struct btrfs_delayed_ref_node *ref,
1435 const struct btrfs_delayed_ref_head *head_ref,
1436 int action),
1437
1438 TP_ARGS(fs_info, ref, head_ref, action)
1439 )
1440
1441 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
1442 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1443
1444 TP_PROTO(struct btrfs_fs_info *fs_info,
1445 struct btrfs_delayed_ref_node *ref,
1446 struct btrfs_delayed_ref_head *head_ref,
1447 int action),
1448
1449 TP_ARGS(fs_info, ref, head_ref, action),
1450
1451 TP_FIELDS(
1452 ctf_integer(u64, bytenr, ref->bytenr)
1453 ctf_integer(u64, num_bytes, ref->num_bytes)
1454 ctf_integer(int, action, action)
1455 ctf_integer(int, is_data, head_ref->is_data)
1456 )
1457 )
1458
1459 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1460
1461 add_delayed_ref_head,
1462
1463 btrfs_add_delayed_ref_head,
1464
1465 TP_PROTO(struct btrfs_fs_info *fs_info,
1466 struct btrfs_delayed_ref_node *ref,
1467 struct btrfs_delayed_ref_head *head_ref,
1468 int action),
1469
1470 TP_ARGS(fs_info, ref, head_ref, action)
1471 )
1472
1473 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1474
1475 run_delayed_ref_head,
1476
1477 btrfs_run_delayed_ref_head,
1478
1479 TP_PROTO(struct btrfs_fs_info *fs_info,
1480 struct btrfs_delayed_ref_node *ref,
1481 struct btrfs_delayed_ref_head *head_ref,
1482 int action),
1483
1484 TP_ARGS(fs_info, ref, head_ref, action)
1485 )
1486
1487 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1488 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1489
1490 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1491 const struct btrfs_delayed_ref_head *head_ref,
1492 int action),
1493
1494 TP_ARGS(ref, head_ref, action),
1495
1496 TP_FIELDS(
1497 ctf_integer(u64, bytenr, ref->bytenr)
1498 ctf_integer(u64, num_bytes, ref->num_bytes)
1499 ctf_integer(int, action, action)
1500 ctf_integer(int, is_data, head_ref->is_data)
1501 )
1502 )
1503
1504 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1505
1506 add_delayed_ref_head,
1507
1508 btrfs_add_delayed_ref_head,
1509
1510 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1511 const struct btrfs_delayed_ref_head *head_ref,
1512 int action),
1513
1514 TP_ARGS(ref, head_ref, action)
1515 )
1516
1517 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1518
1519 run_delayed_ref_head,
1520
1521 btrfs_run_delayed_ref_head,
1522
1523 TP_PROTO(const struct btrfs_delayed_ref_node *ref,
1524 const struct btrfs_delayed_ref_head *head_ref,
1525 int action),
1526
1527 TP_ARGS(ref, head_ref, action)
1528 )
1529
1530 #else
1531 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
1532
1533 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1534 struct btrfs_delayed_ref_head *head_ref,
1535 int action),
1536
1537 TP_ARGS(ref, head_ref, action),
1538
1539 TP_FIELDS(
1540 ctf_integer(u64, bytenr, ref->bytenr)
1541 ctf_integer(u64, num_bytes, ref->num_bytes)
1542 ctf_integer(int, action, action)
1543 ctf_integer(int, is_data, head_ref->is_data)
1544 )
1545 )
1546
1547 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1548
1549 add_delayed_ref_head,
1550
1551 btrfs_add_delayed_ref_head,
1552
1553 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1554 struct btrfs_delayed_ref_head *head_ref,
1555 int action),
1556
1557 TP_ARGS(ref, head_ref, action)
1558 )
1559
1560 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1561
1562 run_delayed_ref_head,
1563
1564 btrfs_run_delayed_ref_head,
1565
1566 TP_PROTO(struct btrfs_delayed_ref_node *ref,
1567 struct btrfs_delayed_ref_head *head_ref,
1568 int action),
1569
1570 TP_ARGS(ref, head_ref, action)
1571 )
1572 #endif
1573
1574 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1575
1576 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1577
1578 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1579 u64 offset, u64 size),
1580
1581 TP_ARGS(fs_info, map, offset, size),
1582
1583 TP_FIELDS(
1584 ctf_integer(int, num_stripes, map->num_stripes)
1585 ctf_integer(u64, type, map->type)
1586 ctf_integer(int, sub_stripes, map->sub_stripes)
1587 ctf_integer(u64, offset, offset)
1588 ctf_integer(u64, size, size)
1589 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1590 )
1591 )
1592
1593 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1594
1595 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1596 u64 offset, u64 size),
1597
1598 TP_ARGS(fs_info, map, offset, size)
1599 )
1600
1601 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1602
1603 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1604 u64 offset, u64 size),
1605
1606 TP_ARGS(fs_info, map, offset, size)
1607 )
1608
1609 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1610
1611 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1612
1613 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1614 u64 offset, u64 size),
1615
1616 TP_ARGS(fs_info, map, offset, size),
1617
1618 TP_FIELDS(
1619 ctf_integer(int, num_stripes, map->num_stripes)
1620 ctf_integer(u64, type, map->type)
1621 ctf_integer(int, sub_stripes, map->sub_stripes)
1622 ctf_integer(u64, offset, offset)
1623 ctf_integer(u64, size, size)
1624 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1625 )
1626 )
1627
1628 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1629
1630 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1631 u64 offset, u64 size),
1632
1633 TP_ARGS(fs_info, map, offset, size)
1634 )
1635
1636 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1637
1638 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1639 u64 offset, u64 size),
1640
1641 TP_ARGS(fs_info, map, offset, size)
1642 )
1643
1644 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1645 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1646 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1647 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1648
1649 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1650
1651 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1652 u64 offset, u64 size),
1653
1654 TP_ARGS(root, map, offset, size),
1655
1656 TP_FIELDS(
1657 ctf_integer(int, num_stripes, map->num_stripes)
1658 ctf_integer(u64, type, map->type)
1659 ctf_integer(int, sub_stripes, map->sub_stripes)
1660 ctf_integer(u64, offset, offset)
1661 ctf_integer(u64, size, size)
1662 ctf_integer(u64, root_objectid, root->root_key.objectid)
1663 )
1664 )
1665
1666 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1667
1668 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1669 u64 offset, u64 size),
1670
1671 TP_ARGS(root, map, offset, size)
1672 )
1673
1674 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1675
1676 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1677 u64 offset, u64 size),
1678
1679 TP_ARGS(root, map, offset, size)
1680 )
1681
1682 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1683
1684 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1685
1686 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1687 u64 offset, u64 size),
1688
1689 TP_ARGS(root, map, offset, size),
1690
1691 TP_FIELDS(
1692 ctf_integer(int, num_stripes, map->num_stripes)
1693 ctf_integer(u64, type, map->type)
1694 ctf_integer(int, sub_stripes, map->sub_stripes)
1695 ctf_integer(u64, offset, offset)
1696 ctf_integer(u64, size, size)
1697 ctf_integer(u64, root_objectid, root->root_key.objectid)
1698 )
1699 )
1700
1701 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1702
1703 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1704 u64 offset, u64 size),
1705
1706 TP_ARGS(root, map, offset, size)
1707 )
1708
1709 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1710
1711 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1712 u64 offset, u64 size),
1713
1714 TP_ARGS(root, map, offset, size)
1715 )
1716
1717 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1718
1719 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1720 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1721 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1722 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1723 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1724 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1725
1726 TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
1727 const struct extent_buffer *cow),
1728
1729 TP_ARGS(root, buf, cow),
1730
1731 TP_FIELDS(
1732 ctf_integer(u64, root_objectid, root->root_key.objectid)
1733 ctf_integer(u64, buf_start, buf->start)
1734 ctf_integer(int, refs, atomic_read(&buf->refs))
1735 ctf_integer(u64, cow_start, cow->start)
1736 ctf_integer(int, buf_level, btrfs_header_level(buf))
1737 ctf_integer(int, cow_level, btrfs_header_level(cow))
1738 )
1739 )
1740 #else
1741 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1742
1743 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
1744 struct extent_buffer *cow),
1745
1746 TP_ARGS(root, buf, cow),
1747
1748 TP_FIELDS(
1749 ctf_integer(u64, root_objectid, root->root_key.objectid)
1750 ctf_integer(u64, buf_start, buf->start)
1751 ctf_integer(int, refs, atomic_read(&buf->refs))
1752 ctf_integer(u64, cow_start, cow->start)
1753 ctf_integer(int, buf_level, btrfs_header_level(buf))
1754 ctf_integer(int, cow_level, btrfs_header_level(cow))
1755 )
1756 )
1757 #endif
1758
1759 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1760 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1761
1762 TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val,
1763 u64 bytes, int reserve),
1764
1765 TP_ARGS(fs_info, type, val, bytes, reserve),
1766
1767 TP_FIELDS(
1768 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1769 ctf_string(type, type)
1770 ctf_integer(u64, val, val)
1771 ctf_integer(u64, bytes, bytes)
1772 ctf_integer(int, reserve, reserve)
1773 )
1774 )
1775 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1776 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1777 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1778 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1779 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1780 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1781
1782 TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
1783 u64 bytes, int reserve),
1784
1785 TP_ARGS(fs_info, type, val, bytes, reserve),
1786
1787 TP_FIELDS(
1788 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1789 ctf_string(type, type)
1790 ctf_integer(u64, val, val)
1791 ctf_integer(u64, bytes, bytes)
1792 ctf_integer(int, reserve, reserve)
1793 )
1794 )
1795 #else
1796 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1797
1798 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
1799 u64 bytes, int reserve),
1800
1801 TP_ARGS(fs_info, type, val, bytes, reserve),
1802
1803 TP_FIELDS(
1804 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1805 ctf_string(type, type)
1806 ctf_integer(u64, val, val)
1807 ctf_integer(u64, bytes, bytes)
1808 ctf_integer(int, reserve, reserve)
1809 )
1810 )
1811 #endif
1812
1813 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1814
1815 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1816
1817 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1818
1819 TP_ARGS(fs_info, start, len),
1820
1821 TP_FIELDS(
1822 ctf_integer(u64, start, start)
1823 ctf_integer(u64, len, len)
1824 )
1825 )
1826
1827 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1828
1829 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1830
1831 TP_ARGS(fs_info, start, len)
1832 )
1833
1834 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1835
1836 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1837
1838 TP_ARGS(fs_info, start, len)
1839 )
1840
1841 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1842
1843 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1844
1845 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1846
1847 TP_ARGS(fs_info, start, len),
1848
1849 TP_FIELDS(
1850 ctf_integer(u64, start, start)
1851 ctf_integer(u64, len, len)
1852 )
1853 )
1854
1855 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1856
1857 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1858
1859 TP_ARGS(fs_info, start, len)
1860 )
1861
1862 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1863
1864 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1865
1866 TP_ARGS(fs_info, start, len)
1867 )
1868
1869 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1870 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1871 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1872 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1873
1874 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1875
1876 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1877
1878 TP_ARGS(root, start, len),
1879
1880 TP_FIELDS(
1881 ctf_integer(u64, root_objectid, root->root_key.objectid)
1882 ctf_integer(u64, start, start)
1883 ctf_integer(u64, len, len)
1884 )
1885 )
1886
1887 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1888
1889 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1890
1891 TP_ARGS(root, start, len)
1892 )
1893
1894 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1895
1896 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1897
1898 TP_ARGS(root, start, len)
1899 )
1900
1901 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1902
1903 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1904
1905 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1906
1907 TP_ARGS(root, start, len),
1908
1909 TP_FIELDS(
1910 ctf_integer(u64, root_objectid, root->root_key.objectid)
1911 ctf_integer(u64, start, start)
1912 ctf_integer(u64, len, len)
1913 )
1914 )
1915
1916 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1917
1918 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1919
1920 TP_ARGS(root, start, len)
1921 )
1922
1923 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1924
1925 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1926
1927 TP_ARGS(root, start, len)
1928 )
1929
1930 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1931
1932 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
1933 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1934
1935 btrfs_find_free_extent,
1936
1937 TP_PROTO(const struct btrfs_root *root,
1938 const struct find_free_extent_ctl *ffe_ctl),
1939
1940 TP_ARGS(root, ffe_ctl),
1941
1942 TP_FIELDS(
1943 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1944 ctf_integer(u64, root_objectid, root->root_key.objectid)
1945 ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
1946 ctf_integer(u64, empty_size, ffe_ctl->empty_size)
1947 ctf_integer(u64, flags, ffe_ctl->flags)
1948 )
1949 )
1950
1951 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
1952 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
1953 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
1954 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
1955 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1956
1957 btrfs_find_free_extent,
1958
1959 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
1960 u64 data),
1961
1962 TP_ARGS(root, num_bytes, empty_size, data),
1963
1964 TP_FIELDS(
1965 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1966 ctf_integer(u64, root_objectid, root->root_key.objectid)
1967 ctf_integer(u64, num_bytes, num_bytes)
1968 ctf_integer(u64, empty_size, empty_size)
1969 ctf_integer(u64, data, data)
1970 )
1971 )
1972
1973 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1974
1975 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1976
1977 btrfs_find_free_extent,
1978
1979 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
1980 u64 data),
1981
1982 TP_ARGS(fs_info, num_bytes, empty_size, data),
1983
1984 TP_FIELDS(
1985 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1986 ctf_integer(u64, num_bytes, num_bytes)
1987 ctf_integer(u64, empty_size, empty_size)
1988 ctf_integer(u64, data, data)
1989 )
1990 )
1991
1992 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
1993
1994 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1995
1996 btrfs_find_free_extent,
1997
1998 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
1999 u64 data),
2000
2001 TP_ARGS(fs_info, num_bytes, empty_size, data),
2002
2003 TP_FIELDS(
2004 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2005 ctf_integer(u64, num_bytes, num_bytes)
2006 ctf_integer(u64, empty_size, empty_size)
2007 ctf_integer(u64, data, data)
2008 )
2009 )
2010
2011 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2012
2013 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2014
2015 btrfs_find_free_extent,
2016
2017 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2018 u64 data),
2019
2020 TP_ARGS(fs_info, num_bytes, empty_size, data),
2021
2022 TP_FIELDS(
2023 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2024 ctf_integer(u64, num_bytes, num_bytes)
2025 ctf_integer(u64, empty_size, empty_size)
2026 ctf_integer(u64, data, data)
2027 )
2028 )
2029
2030 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2031
2032 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2033
2034 btrfs_find_free_extent,
2035
2036 TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2037 u64 data),
2038
2039 TP_ARGS(fs_info, num_bytes, empty_size, data),
2040
2041 TP_FIELDS(
2042 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2043 ctf_integer(u64, num_bytes, num_bytes)
2044 ctf_integer(u64, empty_size, empty_size)
2045 ctf_integer(u64, data, data)
2046 )
2047 )
2048
2049 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2050 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2051 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2052 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2053
2054 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2055
2056 btrfs_find_free_extent,
2057
2058 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2059 u64 data),
2060
2061 TP_ARGS(root, num_bytes, empty_size, data),
2062
2063 TP_FIELDS(
2064 ctf_integer(u64, root_objectid, root->root_key.objectid)
2065 ctf_integer(u64, num_bytes, num_bytes)
2066 ctf_integer(u64, empty_size, empty_size)
2067 ctf_integer(u64, data, data)
2068 )
2069 )
2070 #else
2071
2072 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2073
2074 btrfs_find_free_extent,
2075
2076 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2077 u64 data),
2078
2079 TP_ARGS(root, num_bytes, empty_size, data),
2080
2081 TP_FIELDS(
2082 ctf_integer(u64, root_objectid, root->root_key.objectid)
2083 ctf_integer(u64, num_bytes, num_bytes)
2084 ctf_integer(u64, empty_size, empty_size)
2085 ctf_integer(u64, data, data)
2086 )
2087 )
2088 #endif
2089
2090 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2091 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2092
2093 TP_PROTO(const struct btrfs_block_group *block_group,
2094 const struct find_free_extent_ctl *ffe_ctl),
2095
2096 TP_ARGS(block_group, ffe_ctl),
2097
2098 TP_FIELDS(
2099 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2100 ctf_integer(u64, bg_objectid, block_group->start)
2101 ctf_integer(u64, flags, block_group->flags)
2102 ctf_integer(u64, start, ffe_ctl->search_start)
2103 ctf_integer(u64, len, ffe_ctl->num_bytes)
2104 )
2105 )
2106
2107 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2108
2109 TP_PROTO(const struct btrfs_block_group *block_group,
2110 const struct find_free_extent_ctl *ffe_ctl),
2111
2112 TP_ARGS(block_group, ffe_ctl)
2113 )
2114
2115 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2116
2117 TP_PROTO(const struct btrfs_block_group *block_group,
2118 const struct find_free_extent_ctl *ffe_ctl),
2119
2120 TP_ARGS(block_group, ffe_ctl)
2121 )
2122
2123 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2124 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2125
2126 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2127 u64 len),
2128
2129 TP_ARGS(block_group, start, len),
2130
2131 TP_FIELDS(
2132 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2133 ctf_integer(u64, bg_objectid, block_group->start)
2134 ctf_integer(u64, flags, block_group->flags)
2135 ctf_integer(u64, start, start)
2136 ctf_integer(u64, len, len)
2137 )
2138 )
2139
2140 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2141
2142 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2143 u64 len),
2144
2145 TP_ARGS(block_group, start, len)
2146 )
2147
2148 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2149
2150 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2151 u64 len),
2152
2153 TP_ARGS(block_group, start, len)
2154 )
2155
2156 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2157
2158 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2159
2160 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2161 u64 len),
2162
2163 TP_ARGS(block_group, start, len),
2164
2165 TP_FIELDS(
2166 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2167 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2168 ctf_integer(u64, flags, block_group->flags)
2169 ctf_integer(u64, start, start)
2170 ctf_integer(u64, len, len)
2171 )
2172 )
2173
2174 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2175
2176 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2177 u64 len),
2178
2179 TP_ARGS(block_group, start, len)
2180 )
2181
2182 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2183
2184 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2185 u64 len),
2186
2187 TP_ARGS(block_group, start, len)
2188 )
2189
2190 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2191
2192 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2193
2194 TP_PROTO(const struct btrfs_fs_info *fs_info,
2195 const struct btrfs_block_group_cache *block_group, u64 start,
2196 u64 len),
2197
2198 TP_ARGS(fs_info, block_group, start, len),
2199
2200 TP_FIELDS(
2201 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2202 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2203 ctf_integer(u64, flags, block_group->flags)
2204 ctf_integer(u64, start, start)
2205 ctf_integer(u64, len, len)
2206 )
2207 )
2208
2209 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2210
2211 TP_PROTO(const struct btrfs_fs_info *fs_info,
2212 const struct btrfs_block_group_cache *block_group, u64 start,
2213 u64 len),
2214
2215 TP_ARGS(fs_info, block_group, start, len)
2216 )
2217
2218 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2219
2220 TP_PROTO(const struct btrfs_fs_info *fs_info,
2221 const struct btrfs_block_group_cache *block_group, u64 start,
2222 u64 len),
2223
2224 TP_ARGS(fs_info, block_group, start, len)
2225 )
2226
2227 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2228
2229 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2230
2231 TP_PROTO(struct btrfs_fs_info *fs_info,
2232 struct btrfs_block_group_cache *block_group, u64 start,
2233 u64 len),
2234
2235 TP_ARGS(fs_info, block_group, start, len),
2236
2237 TP_FIELDS(
2238 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2239 ctf_integer(u64, flags, block_group->flags)
2240 ctf_integer(u64, start, start)
2241 ctf_integer(u64, len, len)
2242 )
2243 )
2244
2245 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2246
2247 TP_PROTO(struct btrfs_fs_info *fs_info,
2248 struct btrfs_block_group_cache *block_group, u64 start,
2249 u64 len),
2250
2251 TP_ARGS(fs_info, block_group, start, len)
2252 )
2253
2254 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2255
2256 TP_PROTO(struct btrfs_fs_info *fs_info,
2257 struct btrfs_block_group_cache *block_group, u64 start,
2258 u64 len),
2259
2260 TP_ARGS(fs_info, block_group, start, len)
2261 )
2262 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2263 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2264 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2265 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2266
2267 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2268
2269 TP_PROTO(const struct btrfs_root *root,
2270 const struct btrfs_block_group_cache *block_group, u64 start,
2271 u64 len),
2272
2273 TP_ARGS(root, block_group, start, len),
2274
2275 TP_FIELDS(
2276 ctf_integer(u64, root_objectid, root->root_key.objectid)
2277 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2278 ctf_integer(u64, flags, block_group->flags)
2279 ctf_integer(u64, start, start)
2280 ctf_integer(u64, len, len)
2281 )
2282 )
2283
2284 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2285
2286 TP_PROTO(const struct btrfs_root *root,
2287 const struct btrfs_block_group_cache *block_group, u64 start,
2288 u64 len),
2289
2290 TP_ARGS(root, block_group, start, len)
2291 )
2292
2293 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2294
2295 TP_PROTO(const struct btrfs_root *root,
2296 const struct btrfs_block_group_cache *block_group, u64 start,
2297 u64 len),
2298
2299 TP_ARGS(root, block_group, start, len)
2300 )
2301
2302 #else
2303
2304 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2305
2306 TP_PROTO(struct btrfs_root *root,
2307 struct btrfs_block_group_cache *block_group, u64 start,
2308 u64 len),
2309
2310 TP_ARGS(root, block_group, start, len),
2311
2312 TP_FIELDS(
2313 ctf_integer(u64, root_objectid, root->root_key.objectid)
2314 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2315 ctf_integer(u64, flags, block_group->flags)
2316 ctf_integer(u64, start, start)
2317 ctf_integer(u64, len, len)
2318 )
2319 )
2320
2321 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2322
2323 TP_PROTO(struct btrfs_root *root,
2324 struct btrfs_block_group_cache *block_group, u64 start,
2325 u64 len),
2326
2327 TP_ARGS(root, block_group, start, len)
2328 )
2329
2330 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2331
2332 TP_PROTO(struct btrfs_root *root,
2333 struct btrfs_block_group_cache *block_group, u64 start,
2334 u64 len),
2335
2336 TP_ARGS(root, block_group, start, len)
2337 )
2338
2339 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2340
2341 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2342 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2343
2344 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2345 u64 bytes, u64 empty_size, u64 min_bytes),
2346
2347 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2348
2349 TP_FIELDS(
2350 ctf_integer(u64, bg_objectid, block_group->start)
2351 ctf_integer(u64, flags, block_group->flags)
2352 ctf_integer(u64, start, start)
2353 ctf_integer(u64, bytes, bytes)
2354 ctf_integer(u64, empty_size, empty_size)
2355 ctf_integer(u64, min_bytes, min_bytes)
2356 )
2357 )
2358
2359 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2360
2361 TP_PROTO(const struct btrfs_block_group *block_group),
2362
2363 TP_ARGS(block_group),
2364
2365 TP_FIELDS(
2366 ctf_integer(u64, bg_objectid, block_group->start)
2367 )
2368 )
2369
2370 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2371
2372 TP_PROTO(const struct btrfs_block_group *block_group,
2373 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2374
2375 TP_ARGS(block_group, cluster, size, bitmap),
2376
2377 TP_FIELDS(
2378 ctf_integer(u64, bg_objectid, block_group->start)
2379 ctf_integer(u64, flags, block_group->flags)
2380 ctf_integer(u64, start, cluster->window_start)
2381 ctf_integer(u64, max_size, cluster->max_size)
2382 ctf_integer(u64, size, size)
2383 ctf_integer(int, bitmap, bitmap)
2384 )
2385 )
2386 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2387 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2388 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2389 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2390 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2391 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2392
2393 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2394 u64 bytes, u64 empty_size, u64 min_bytes),
2395
2396 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2397
2398 TP_FIELDS(
2399 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2400 ctf_integer(u64, flags, block_group->flags)
2401 ctf_integer(u64, start, start)
2402 ctf_integer(u64, bytes, bytes)
2403 ctf_integer(u64, empty_size, empty_size)
2404 ctf_integer(u64, min_bytes, min_bytes)
2405 )
2406 )
2407
2408 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2409
2410 TP_PROTO(const struct btrfs_block_group_cache *block_group),
2411
2412 TP_ARGS(block_group),
2413
2414 TP_FIELDS(
2415 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2416 )
2417 )
2418
2419 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2420
2421 TP_PROTO(const struct btrfs_block_group_cache *block_group,
2422 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2423
2424 TP_ARGS(block_group, cluster, size, bitmap),
2425
2426 TP_FIELDS(
2427 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2428 ctf_integer(u64, flags, block_group->flags)
2429 ctf_integer(u64, start, cluster->window_start)
2430 ctf_integer(u64, max_size, cluster->max_size)
2431 ctf_integer(u64, size, size)
2432 ctf_integer(int, bitmap, bitmap)
2433 )
2434 )
2435 #else
2436 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2437
2438 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
2439 u64 bytes, u64 empty_size, u64 min_bytes),
2440
2441 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2442
2443 TP_FIELDS(
2444 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2445 ctf_integer(u64, flags, block_group->flags)
2446 ctf_integer(u64, start, start)
2447 ctf_integer(u64, bytes, bytes)
2448 ctf_integer(u64, empty_size, empty_size)
2449 ctf_integer(u64, min_bytes, min_bytes)
2450 )
2451 )
2452
2453 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2454
2455 TP_PROTO(struct btrfs_block_group_cache *block_group),
2456
2457 TP_ARGS(block_group),
2458
2459 TP_FIELDS(
2460 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2461 )
2462 )
2463
2464 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2465
2466 TP_PROTO(struct btrfs_block_group_cache *block_group,
2467 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2468
2469 TP_ARGS(block_group, cluster, size, bitmap),
2470
2471 TP_FIELDS(
2472 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2473 ctf_integer(u64, flags, block_group->flags)
2474 ctf_integer(u64, start, cluster->window_start)
2475 ctf_integer(u64, max_size, cluster->max_size)
2476 ctf_integer(u64, size, size)
2477 ctf_integer(int, bitmap, bitmap)
2478 )
2479 )
2480 #endif
2481
2482 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2483 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2484 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2485 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2486 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2487 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2488
2489 btrfs_alloc_extent_state,
2490
2491 TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
2492
2493 TP_ARGS(state, mask, IP),
2494
2495 TP_FIELDS(
2496 ctf_integer_hex(const struct extent_state *, state, state)
2497 ctf_integer(gfp_t, mask, mask)
2498 ctf_integer_hex(unsigned long, ip, IP)
2499 )
2500 )
2501
2502 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2503
2504 btrfs_free_extent_state,
2505
2506 TP_PROTO(const struct extent_state *state, unsigned long IP),
2507
2508 TP_ARGS(state, IP),
2509
2510 TP_FIELDS(
2511 ctf_integer_hex(const struct extent_state *, state, state)
2512 ctf_integer_hex(unsigned long, ip, IP)
2513 )
2514 )
2515 #else
2516 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2517
2518 btrfs_alloc_extent_state,
2519
2520 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
2521
2522 TP_ARGS(state, mask, IP),
2523
2524 TP_FIELDS(
2525 ctf_integer_hex(struct extent_state *, state, state)
2526 ctf_integer(gfp_t, mask, mask)
2527 ctf_integer_hex(unsigned long, ip, IP)
2528 )
2529 )
2530
2531 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2532
2533 btrfs_free_extent_state,
2534
2535 TP_PROTO(struct extent_state *state, unsigned long IP),
2536
2537 TP_ARGS(state, IP),
2538
2539 TP_FIELDS(
2540 ctf_integer_hex(struct extent_state *, state, state)
2541 ctf_integer_hex(unsigned long, ip, IP)
2542 )
2543 )
2544 #endif
2545
2546 #endif /* LTTNG_TRACE_BTRFS_H */
2547
2548 /* This part must be outside protection */
2549 #include <lttng/define_trace.h>
This page took 0.119833 seconds and 4 git commands to generate.