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