Fix: btrfs_chunk tracepoints changed in linux 6.8.0-rc1
[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(6,8,0))
1575
1576 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1577
1578 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_chunk_map *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 btrfs_chunk_map *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 btrfs_chunk_map *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,14,0))
1610
1611 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1612
1613 TP_PROTO(const struct btrfs_fs_info *fs_info, const 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(const struct btrfs_fs_info *fs_info, const 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(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1639 u64 offset, u64 size),
1640
1641 TP_ARGS(fs_info, map, offset, size)
1642 )
1643
1644 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1645
1646 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1647
1648 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1649 u64 offset, u64 size),
1650
1651 TP_ARGS(fs_info, map, offset, size),
1652
1653 TP_FIELDS(
1654 ctf_integer(int, num_stripes, map->num_stripes)
1655 ctf_integer(u64, type, map->type)
1656 ctf_integer(int, sub_stripes, map->sub_stripes)
1657 ctf_integer(u64, offset, offset)
1658 ctf_integer(u64, size, size)
1659 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
1660 )
1661 )
1662
1663 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1664
1665 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1666 u64 offset, u64 size),
1667
1668 TP_ARGS(fs_info, map, offset, size)
1669 )
1670
1671 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1672
1673 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
1674 u64 offset, u64 size),
1675
1676 TP_ARGS(fs_info, map, offset, size)
1677 )
1678
1679 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1680 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1681 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1682 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1683
1684 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1685
1686 TP_PROTO(const struct btrfs_root *root, const 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(const struct btrfs_root *root, const 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(const struct btrfs_root *root, const struct map_lookup *map,
1712 u64 offset, u64 size),
1713
1714 TP_ARGS(root, map, offset, size)
1715 )
1716
1717 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1718
1719 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1720
1721 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1722 u64 offset, u64 size),
1723
1724 TP_ARGS(root, map, offset, size),
1725
1726 TP_FIELDS(
1727 ctf_integer(int, num_stripes, map->num_stripes)
1728 ctf_integer(u64, type, map->type)
1729 ctf_integer(int, sub_stripes, map->sub_stripes)
1730 ctf_integer(u64, offset, offset)
1731 ctf_integer(u64, size, size)
1732 ctf_integer(u64, root_objectid, root->root_key.objectid)
1733 )
1734 )
1735
1736 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1737
1738 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1739 u64 offset, u64 size),
1740
1741 TP_ARGS(root, map, offset, size)
1742 )
1743
1744 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1745
1746 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1747 u64 offset, u64 size),
1748
1749 TP_ARGS(root, map, offset, size)
1750 )
1751
1752 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1753
1754 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1755 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1756 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1757 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1758 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1759 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1760
1761 TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
1762 const struct extent_buffer *cow),
1763
1764 TP_ARGS(root, buf, cow),
1765
1766 TP_FIELDS(
1767 ctf_integer(u64, root_objectid, root->root_key.objectid)
1768 ctf_integer(u64, buf_start, buf->start)
1769 ctf_integer(int, refs, atomic_read(&buf->refs))
1770 ctf_integer(u64, cow_start, cow->start)
1771 ctf_integer(int, buf_level, btrfs_header_level(buf))
1772 ctf_integer(int, cow_level, btrfs_header_level(cow))
1773 )
1774 )
1775 #else
1776 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1777
1778 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
1779 struct extent_buffer *cow),
1780
1781 TP_ARGS(root, buf, cow),
1782
1783 TP_FIELDS(
1784 ctf_integer(u64, root_objectid, root->root_key.objectid)
1785 ctf_integer(u64, buf_start, buf->start)
1786 ctf_integer(int, refs, atomic_read(&buf->refs))
1787 ctf_integer(u64, cow_start, cow->start)
1788 ctf_integer(int, buf_level, btrfs_header_level(buf))
1789 ctf_integer(int, cow_level, btrfs_header_level(cow))
1790 )
1791 )
1792 #endif
1793
1794 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
1795 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1796
1797 TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val,
1798 u64 bytes, int reserve),
1799
1800 TP_ARGS(fs_info, type, val, bytes, reserve),
1801
1802 TP_FIELDS(
1803 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1804 ctf_string(type, type)
1805 ctf_integer(u64, val, val)
1806 ctf_integer(u64, bytes, bytes)
1807 ctf_integer(int, reserve, reserve)
1808 )
1809 )
1810 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
1811 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1812 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1813 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1814 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1815 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1816
1817 TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
1818 u64 bytes, int reserve),
1819
1820 TP_ARGS(fs_info, type, val, bytes, reserve),
1821
1822 TP_FIELDS(
1823 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1824 ctf_string(type, type)
1825 ctf_integer(u64, val, val)
1826 ctf_integer(u64, bytes, bytes)
1827 ctf_integer(int, reserve, reserve)
1828 )
1829 )
1830 #else
1831 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1832
1833 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
1834 u64 bytes, int reserve),
1835
1836 TP_ARGS(fs_info, type, val, bytes, reserve),
1837
1838 TP_FIELDS(
1839 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1840 ctf_string(type, type)
1841 ctf_integer(u64, val, val)
1842 ctf_integer(u64, bytes, bytes)
1843 ctf_integer(int, reserve, reserve)
1844 )
1845 )
1846 #endif
1847
1848 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1849
1850 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1851
1852 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1853
1854 TP_ARGS(fs_info, start, len),
1855
1856 TP_FIELDS(
1857 ctf_integer(u64, start, start)
1858 ctf_integer(u64, len, len)
1859 )
1860 )
1861
1862 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1863
1864 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1865
1866 TP_ARGS(fs_info, start, len)
1867 )
1868
1869 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1870
1871 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1872
1873 TP_ARGS(fs_info, start, len)
1874 )
1875
1876 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1877
1878 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1879
1880 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1881
1882 TP_ARGS(fs_info, start, len),
1883
1884 TP_FIELDS(
1885 ctf_integer(u64, start, start)
1886 ctf_integer(u64, len, len)
1887 )
1888 )
1889
1890 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1891
1892 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1893
1894 TP_ARGS(fs_info, start, len)
1895 )
1896
1897 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1898
1899 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
1900
1901 TP_ARGS(fs_info, start, len)
1902 )
1903
1904 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1905 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1906 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1907 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1908
1909 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1910
1911 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1912
1913 TP_ARGS(root, start, len),
1914
1915 TP_FIELDS(
1916 ctf_integer(u64, root_objectid, root->root_key.objectid)
1917 ctf_integer(u64, start, start)
1918 ctf_integer(u64, len, len)
1919 )
1920 )
1921
1922 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1923
1924 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1925
1926 TP_ARGS(root, start, len)
1927 )
1928
1929 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1930
1931 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1932
1933 TP_ARGS(root, start, len)
1934 )
1935
1936 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1937
1938 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1939
1940 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1941
1942 TP_ARGS(root, start, len),
1943
1944 TP_FIELDS(
1945 ctf_integer(u64, root_objectid, root->root_key.objectid)
1946 ctf_integer(u64, start, start)
1947 ctf_integer(u64, len, len)
1948 )
1949 )
1950
1951 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1952
1953 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1954
1955 TP_ARGS(root, start, len)
1956 )
1957
1958 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1959
1960 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1961
1962 TP_ARGS(root, start, len)
1963 )
1964
1965 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
1966
1967 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
1968 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1969
1970 btrfs_find_free_extent,
1971
1972 TP_PROTO(const struct btrfs_root *root,
1973 const struct find_free_extent_ctl *ffe_ctl),
1974
1975 TP_ARGS(root, ffe_ctl),
1976
1977 TP_FIELDS(
1978 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1979 ctf_integer(u64, root_objectid, root->root_key.objectid)
1980 ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
1981 ctf_integer(u64, empty_size, ffe_ctl->empty_size)
1982 ctf_integer(u64, flags, ffe_ctl->flags)
1983 )
1984 )
1985
1986 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
1987 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
1988 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
1989 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
1990 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1991
1992 btrfs_find_free_extent,
1993
1994 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
1995 u64 data),
1996
1997 TP_ARGS(root, num_bytes, empty_size, data),
1998
1999 TP_FIELDS(
2000 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2001 ctf_integer(u64, root_objectid, root->root_key.objectid)
2002 ctf_integer(u64, num_bytes, num_bytes)
2003 ctf_integer(u64, empty_size, empty_size)
2004 ctf_integer(u64, data, data)
2005 )
2006 )
2007
2008 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2009
2010 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2011
2012 btrfs_find_free_extent,
2013
2014 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2015 u64 data),
2016
2017 TP_ARGS(fs_info, num_bytes, empty_size, data),
2018
2019 TP_FIELDS(
2020 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2021 ctf_integer(u64, num_bytes, num_bytes)
2022 ctf_integer(u64, empty_size, empty_size)
2023 ctf_integer(u64, data, data)
2024 )
2025 )
2026
2027 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2028
2029 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2030
2031 btrfs_find_free_extent,
2032
2033 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2034 u64 data),
2035
2036 TP_ARGS(fs_info, num_bytes, empty_size, data),
2037
2038 TP_FIELDS(
2039 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2040 ctf_integer(u64, num_bytes, num_bytes)
2041 ctf_integer(u64, empty_size, empty_size)
2042 ctf_integer(u64, data, data)
2043 )
2044 )
2045
2046 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2047
2048 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2049
2050 btrfs_find_free_extent,
2051
2052 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2053 u64 data),
2054
2055 TP_ARGS(fs_info, num_bytes, empty_size, data),
2056
2057 TP_FIELDS(
2058 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2059 ctf_integer(u64, num_bytes, num_bytes)
2060 ctf_integer(u64, empty_size, empty_size)
2061 ctf_integer(u64, data, data)
2062 )
2063 )
2064
2065 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2066
2067 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2068
2069 btrfs_find_free_extent,
2070
2071 TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2072 u64 data),
2073
2074 TP_ARGS(fs_info, num_bytes, empty_size, data),
2075
2076 TP_FIELDS(
2077 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2078 ctf_integer(u64, num_bytes, num_bytes)
2079 ctf_integer(u64, empty_size, empty_size)
2080 ctf_integer(u64, data, data)
2081 )
2082 )
2083
2084 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2085 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2086 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2087 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2088
2089 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2090
2091 btrfs_find_free_extent,
2092
2093 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2094 u64 data),
2095
2096 TP_ARGS(root, num_bytes, empty_size, data),
2097
2098 TP_FIELDS(
2099 ctf_integer(u64, root_objectid, root->root_key.objectid)
2100 ctf_integer(u64, num_bytes, num_bytes)
2101 ctf_integer(u64, empty_size, empty_size)
2102 ctf_integer(u64, data, data)
2103 )
2104 )
2105 #else
2106
2107 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2108
2109 btrfs_find_free_extent,
2110
2111 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2112 u64 data),
2113
2114 TP_ARGS(root, num_bytes, empty_size, data),
2115
2116 TP_FIELDS(
2117 ctf_integer(u64, root_objectid, root->root_key.objectid)
2118 ctf_integer(u64, num_bytes, num_bytes)
2119 ctf_integer(u64, empty_size, empty_size)
2120 ctf_integer(u64, data, data)
2121 )
2122 )
2123 #endif
2124
2125 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2126 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2127
2128 TP_PROTO(const struct btrfs_block_group *block_group,
2129 const struct find_free_extent_ctl *ffe_ctl),
2130
2131 TP_ARGS(block_group, ffe_ctl),
2132
2133 TP_FIELDS(
2134 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2135 ctf_integer(u64, bg_objectid, block_group->start)
2136 ctf_integer(u64, flags, block_group->flags)
2137 ctf_integer(u64, start, ffe_ctl->search_start)
2138 ctf_integer(u64, len, ffe_ctl->num_bytes)
2139 )
2140 )
2141
2142 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2143
2144 TP_PROTO(const struct btrfs_block_group *block_group,
2145 const struct find_free_extent_ctl *ffe_ctl),
2146
2147 TP_ARGS(block_group, ffe_ctl)
2148 )
2149
2150 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2151
2152 TP_PROTO(const struct btrfs_block_group *block_group,
2153 const struct find_free_extent_ctl *ffe_ctl),
2154
2155 TP_ARGS(block_group, ffe_ctl)
2156 )
2157
2158 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2159 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2160
2161 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2162 u64 len),
2163
2164 TP_ARGS(block_group, start, len),
2165
2166 TP_FIELDS(
2167 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2168 ctf_integer(u64, bg_objectid, block_group->start)
2169 ctf_integer(u64, flags, block_group->flags)
2170 ctf_integer(u64, start, start)
2171 ctf_integer(u64, len, len)
2172 )
2173 )
2174
2175 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2176
2177 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2178 u64 len),
2179
2180 TP_ARGS(block_group, start, len)
2181 )
2182
2183 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2184
2185 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2186 u64 len),
2187
2188 TP_ARGS(block_group, start, len)
2189 )
2190
2191 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
2192
2193 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2194
2195 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2196 u64 len),
2197
2198 TP_ARGS(block_group, start, len),
2199
2200 TP_FIELDS(
2201 ctf_array(u8, fsid, block_group->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_block_group_cache *block_group, u64 start,
2212 u64 len),
2213
2214 TP_ARGS(block_group, start, len)
2215 )
2216
2217 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2218
2219 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2220 u64 len),
2221
2222 TP_ARGS(block_group, start, len)
2223 )
2224
2225 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
2226
2227 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2228
2229 TP_PROTO(const struct btrfs_fs_info *fs_info,
2230 const struct btrfs_block_group_cache *block_group, u64 start,
2231 u64 len),
2232
2233 TP_ARGS(fs_info, block_group, start, len),
2234
2235 TP_FIELDS(
2236 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2237 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2238 ctf_integer(u64, flags, block_group->flags)
2239 ctf_integer(u64, start, start)
2240 ctf_integer(u64, len, len)
2241 )
2242 )
2243
2244 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2245
2246 TP_PROTO(const struct btrfs_fs_info *fs_info,
2247 const struct btrfs_block_group_cache *block_group, u64 start,
2248 u64 len),
2249
2250 TP_ARGS(fs_info, block_group, start, len)
2251 )
2252
2253 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2254
2255 TP_PROTO(const struct btrfs_fs_info *fs_info,
2256 const struct btrfs_block_group_cache *block_group, u64 start,
2257 u64 len),
2258
2259 TP_ARGS(fs_info, block_group, start, len)
2260 )
2261
2262 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
2263
2264 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2265
2266 TP_PROTO(struct btrfs_fs_info *fs_info,
2267 struct btrfs_block_group_cache *block_group, u64 start,
2268 u64 len),
2269
2270 TP_ARGS(fs_info, block_group, start, len),
2271
2272 TP_FIELDS(
2273 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2274 ctf_integer(u64, flags, block_group->flags)
2275 ctf_integer(u64, start, start)
2276 ctf_integer(u64, len, len)
2277 )
2278 )
2279
2280 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2281
2282 TP_PROTO(struct btrfs_fs_info *fs_info,
2283 struct btrfs_block_group_cache *block_group, u64 start,
2284 u64 len),
2285
2286 TP_ARGS(fs_info, block_group, start, len)
2287 )
2288
2289 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2290
2291 TP_PROTO(struct btrfs_fs_info *fs_info,
2292 struct btrfs_block_group_cache *block_group, u64 start,
2293 u64 len),
2294
2295 TP_ARGS(fs_info, block_group, start, len)
2296 )
2297 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2298 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2299 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2300 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2301
2302 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2303
2304 TP_PROTO(const struct btrfs_root *root,
2305 const struct btrfs_block_group_cache *block_group, u64 start,
2306 u64 len),
2307
2308 TP_ARGS(root, block_group, start, len),
2309
2310 TP_FIELDS(
2311 ctf_integer(u64, root_objectid, root->root_key.objectid)
2312 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2313 ctf_integer(u64, flags, block_group->flags)
2314 ctf_integer(u64, start, start)
2315 ctf_integer(u64, len, len)
2316 )
2317 )
2318
2319 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2320
2321 TP_PROTO(const struct btrfs_root *root,
2322 const struct btrfs_block_group_cache *block_group, u64 start,
2323 u64 len),
2324
2325 TP_ARGS(root, block_group, start, len)
2326 )
2327
2328 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2329
2330 TP_PROTO(const struct btrfs_root *root,
2331 const struct btrfs_block_group_cache *block_group, u64 start,
2332 u64 len),
2333
2334 TP_ARGS(root, block_group, start, len)
2335 )
2336
2337 #else
2338
2339 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2340
2341 TP_PROTO(struct btrfs_root *root,
2342 struct btrfs_block_group_cache *block_group, u64 start,
2343 u64 len),
2344
2345 TP_ARGS(root, block_group, start, len),
2346
2347 TP_FIELDS(
2348 ctf_integer(u64, root_objectid, root->root_key.objectid)
2349 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2350 ctf_integer(u64, flags, block_group->flags)
2351 ctf_integer(u64, start, start)
2352 ctf_integer(u64, len, len)
2353 )
2354 )
2355
2356 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2357
2358 TP_PROTO(struct btrfs_root *root,
2359 struct btrfs_block_group_cache *block_group, u64 start,
2360 u64 len),
2361
2362 TP_ARGS(root, block_group, start, len)
2363 )
2364
2365 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2366
2367 TP_PROTO(struct btrfs_root *root,
2368 struct btrfs_block_group_cache *block_group, u64 start,
2369 u64 len),
2370
2371 TP_ARGS(root, block_group, start, len)
2372 )
2373
2374 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
2375
2376 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
2377 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2378
2379 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2380 u64 bytes, u64 empty_size, u64 min_bytes),
2381
2382 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2383
2384 TP_FIELDS(
2385 ctf_integer(u64, bg_objectid, block_group->start)
2386 ctf_integer(u64, flags, block_group->flags)
2387 ctf_integer(u64, start, start)
2388 ctf_integer(u64, bytes, bytes)
2389 ctf_integer(u64, empty_size, empty_size)
2390 ctf_integer(u64, min_bytes, min_bytes)
2391 )
2392 )
2393
2394 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2395
2396 TP_PROTO(const struct btrfs_block_group *block_group),
2397
2398 TP_ARGS(block_group),
2399
2400 TP_FIELDS(
2401 ctf_integer(u64, bg_objectid, block_group->start)
2402 )
2403 )
2404
2405 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2406
2407 TP_PROTO(const struct btrfs_block_group *block_group,
2408 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2409
2410 TP_ARGS(block_group, cluster, size, bitmap),
2411
2412 TP_FIELDS(
2413 ctf_integer(u64, bg_objectid, block_group->start)
2414 ctf_integer(u64, flags, block_group->flags)
2415 ctf_integer(u64, start, cluster->window_start)
2416 ctf_integer(u64, max_size, cluster->max_size)
2417 ctf_integer(u64, size, size)
2418 ctf_integer(int, bitmap, bitmap)
2419 )
2420 )
2421 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2422 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2423 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2424 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2425 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2426 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2427
2428 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2429 u64 bytes, u64 empty_size, u64 min_bytes),
2430
2431 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2432
2433 TP_FIELDS(
2434 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2435 ctf_integer(u64, flags, block_group->flags)
2436 ctf_integer(u64, start, start)
2437 ctf_integer(u64, bytes, bytes)
2438 ctf_integer(u64, empty_size, empty_size)
2439 ctf_integer(u64, min_bytes, min_bytes)
2440 )
2441 )
2442
2443 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2444
2445 TP_PROTO(const struct btrfs_block_group_cache *block_group),
2446
2447 TP_ARGS(block_group),
2448
2449 TP_FIELDS(
2450 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2451 )
2452 )
2453
2454 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2455
2456 TP_PROTO(const struct btrfs_block_group_cache *block_group,
2457 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2458
2459 TP_ARGS(block_group, cluster, size, bitmap),
2460
2461 TP_FIELDS(
2462 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2463 ctf_integer(u64, flags, block_group->flags)
2464 ctf_integer(u64, start, cluster->window_start)
2465 ctf_integer(u64, max_size, cluster->max_size)
2466 ctf_integer(u64, size, size)
2467 ctf_integer(int, bitmap, bitmap)
2468 )
2469 )
2470 #else
2471 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2472
2473 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
2474 u64 bytes, u64 empty_size, u64 min_bytes),
2475
2476 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2477
2478 TP_FIELDS(
2479 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2480 ctf_integer(u64, flags, block_group->flags)
2481 ctf_integer(u64, start, start)
2482 ctf_integer(u64, bytes, bytes)
2483 ctf_integer(u64, empty_size, empty_size)
2484 ctf_integer(u64, min_bytes, min_bytes)
2485 )
2486 )
2487
2488 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2489
2490 TP_PROTO(struct btrfs_block_group_cache *block_group),
2491
2492 TP_ARGS(block_group),
2493
2494 TP_FIELDS(
2495 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2496 )
2497 )
2498
2499 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2500
2501 TP_PROTO(struct btrfs_block_group_cache *block_group,
2502 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2503
2504 TP_ARGS(block_group, cluster, size, bitmap),
2505
2506 TP_FIELDS(
2507 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2508 ctf_integer(u64, flags, block_group->flags)
2509 ctf_integer(u64, start, cluster->window_start)
2510 ctf_integer(u64, max_size, cluster->max_size)
2511 ctf_integer(u64, size, size)
2512 ctf_integer(int, bitmap, bitmap)
2513 )
2514 )
2515 #endif
2516
2517 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
2518 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2519 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2520 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2521 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2522 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2523
2524 btrfs_alloc_extent_state,
2525
2526 TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
2527
2528 TP_ARGS(state, mask, IP),
2529
2530 TP_FIELDS(
2531 ctf_integer_hex(const struct extent_state *, state, state)
2532 ctf_integer(gfp_t, mask, mask)
2533 ctf_integer_hex(unsigned long, ip, IP)
2534 )
2535 )
2536
2537 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2538
2539 btrfs_free_extent_state,
2540
2541 TP_PROTO(const struct extent_state *state, unsigned long IP),
2542
2543 TP_ARGS(state, IP),
2544
2545 TP_FIELDS(
2546 ctf_integer_hex(const struct extent_state *, state, state)
2547 ctf_integer_hex(unsigned long, ip, IP)
2548 )
2549 )
2550 #else
2551 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2552
2553 btrfs_alloc_extent_state,
2554
2555 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
2556
2557 TP_ARGS(state, mask, IP),
2558
2559 TP_FIELDS(
2560 ctf_integer_hex(struct extent_state *, state, state)
2561 ctf_integer(gfp_t, mask, mask)
2562 ctf_integer_hex(unsigned long, ip, IP)
2563 )
2564 )
2565
2566 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2567
2568 btrfs_free_extent_state,
2569
2570 TP_PROTO(struct extent_state *state, unsigned long IP),
2571
2572 TP_ARGS(state, IP),
2573
2574 TP_FIELDS(
2575 ctf_integer_hex(struct extent_state *, state, state)
2576 ctf_integer_hex(unsigned long, ip, IP)
2577 )
2578 )
2579 #endif
2580
2581 #endif /* LTTNG_TRACE_BTRFS_H */
2582
2583 /* This part must be outside protection */
2584 #include <lttng/define_trace.h>
This page took 0.157997 seconds and 4 git commands to generate.