fix: btrfs: pass find_free_extent_ctl to allocator tracepoints (v6.3)
[lttng-modules.git] / include / instrumentation / events / btrfs.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
b87700e3
AG
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM btrfs
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_BTRFS_H
b87700e3 7
3b4aafcb 8#include <lttng/tracepoint-event.h>
b87700e3 9#include <linux/writeback.h>
5f4c791e 10#include <lttng/kernel-version.h>
b87700e3 11
69d3aa79
MJ
12#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,2,0))
13#include <../fs/btrfs/accessors.h>
14#endif
15
d0eeda3f
MJ
16#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
17#include <../fs/btrfs/extent-tree.h>
18#endif
19
b87700e3
AG
20#ifndef _TRACE_BTRFS_DEF_
21#define _TRACE_BTRFS_DEF_
22struct btrfs_root;
23struct btrfs_fs_info;
24struct btrfs_inode;
25struct extent_map;
26struct btrfs_ordered_extent;
27struct btrfs_delayed_ref_node;
28struct btrfs_delayed_tree_ref;
29struct btrfs_delayed_data_ref;
30struct btrfs_delayed_ref_head;
5f4c791e 31#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816 32struct btrfs_block_group;
5f4c791e 33#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
b87700e3 34struct btrfs_block_group_cache;
5809d816 35#endif
5f4c791e 36#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
b87700e3
AG
37struct btrfs_free_cluster;
38#endif
39struct map_lookup;
40struct extent_buffer;
5f4c791e 41#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
b87700e3
AG
42struct extent_state;
43#endif
44#endif
45
b87700e3
AG
46#define BTRFS_UUID_SIZE 16
47
5f4c791e 48#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
9d2f1147
MJ
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
c8f96e77
MJ
54#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
55LTTNG_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) || \
0badc02f
MJ
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) || \
7ca7cd6e 70 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
71LTTNG_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)
c8f96e77
MJ
82#else
83LTTNG_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
1f1ec4ed 95
c8f96e77
MJ
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))
1f1ec4ed
MJ
101LTTNG_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
119LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
120
121 TP_PROTO(const struct inode *inode),
122
123 TP_ARGS(inode)
124)
125
126LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
127
128 TP_PROTO(const struct inode *inode),
129
130 TP_ARGS(inode)
131)
132
133LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
134
135 TP_PROTO(const struct inode *inode),
136
137 TP_ARGS(inode)
138)
139#else
3bc29f0a 140LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
b87700e3
AG
141
142 TP_PROTO(struct inode *inode),
143
144 TP_ARGS(inode),
145
f127e61e
MD
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,
b87700e3 154 BTRFS_I(inode)->root->root_key.objectid)
f127e61e 155 )
b87700e3
AG
156)
157
3bc29f0a 158LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
b87700e3
AG
159
160 TP_PROTO(struct inode *inode),
161
162 TP_ARGS(inode)
163)
164
3bc29f0a 165LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
b87700e3
AG
166
167 TP_PROTO(struct inode *inode),
168
169 TP_ARGS(inode)
170)
171
3bc29f0a 172LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
b87700e3
AG
173
174 TP_PROTO(struct inode *inode),
175
176 TP_ARGS(inode)
177)
1f1ec4ed
MJ
178#endif
179
5f4c791e 180#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
181
182LTTNG_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)
b87700e3 202
5f4c791e 203#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
5807b1af
MJ
204
205LTTNG_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
5f4c791e 226#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
e52717ea
FD
227
228LTTNG_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
5f4c791e 249#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
f1a87e24 250
3bc29f0a 251LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
b87700e3 252
f3166f27
MD
253 TP_PROTO(struct btrfs_root *root, struct inode *inode,
254 struct extent_map *map),
b87700e3 255
f3166f27 256 TP_ARGS(root, inode, map),
b87700e3 257
f127e61e
MD
258 TP_FIELDS(
259 ctf_integer(u64, root_objectid, root->root_key.objectid)
f3166f27 260 ctf_integer(u64, ino, btrfs_ino(inode))
f127e61e
MD
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 )
b87700e3
AG
270)
271
0badc02f
MJ
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))
7ca7cd6e
MJ
276
277LTTNG_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
5f4c791e 296#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
f1a87e24
MD
297
298LTTNG_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
5f4c791e 317#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
f1a87e24 318
5f4c791e 319#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ae5af8ea
MJ
320LTTNG_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)
5f4c791e 338#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
354b9790
MJ
339LTTNG_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(
9d2f1147 348 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
354b9790
MJ
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)
5f4c791e 357#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
22df20ca
MJ
358LTTNG_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
5f4c791e 375#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
7dc44138
MJ
376LTTNG_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)
5f4c791e 397#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
f7afb954
MJ
398LTTNG_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)
5f4c791e 419#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
420LTTNG_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)
5f4c791e 441#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
5807b1af
MJ
442LTTNG_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)
0badc02f
MJ
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))
7ca7cd6e
MJ
466LTTNG_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)
5807b1af 486#else
3bc29f0a 487LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
b87700e3
AG
488
489 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
490
491 TP_ARGS(inode, ordered),
492
f127e61e
MD
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,
b87700e3 504 BTRFS_I(inode)->root->root_key.objectid)
f127e61e 505 )
b87700e3 506)
5807b1af 507#endif
b87700e3 508
5f4c791e 509#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
7dc44138
MJ
510LTTNG_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
518LTTNG_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
526LTTNG_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
534LTTNG_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)
5f4c791e 541#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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) || \
7ca7cd6e 545 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
546LTTNG_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
554LTTNG_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
562LTTNG_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
570LTTNG_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)
7dc44138
MJ
577#else
578LTTNG_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
585LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
1f1ec4ed 586
7dc44138
MJ
587 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
588
589 TP_ARGS(inode, ordered)
590)
591
592LTTNG_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
599LTTNG_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
98c05bb5
MJ
607#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
608LTTNG_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
629LTTNG_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
648LTTNG_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
5f4c791e 666#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
7dc44138
MJ
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))
1f1ec4ed
MJ
671LTTNG_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
695LTTNG_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
1f1ec4ed
MJ
707LTTNG_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
3bc29f0a 722LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
b87700e3
AG
723
724 TP_PROTO(struct page *page, struct inode *inode,
725 struct writeback_control *wbc),
726
727 TP_ARGS(page, inode, wbc),
728
f127e61e
MD
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)
5f4c791e 736#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
f127e61e 737 ctf_integer(char, nonblocking, wbc->nonblocking)
b87700e3 738#endif
f127e61e
MD
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 )
b87700e3
AG
747)
748
9bbf98da
MD
749LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
750
751 __extent_writepage,
752
753 btrfs__extent_writepage,
b87700e3
AG
754
755 TP_PROTO(struct page *page, struct inode *inode,
756 struct writeback_control *wbc),
757
758 TP_ARGS(page, inode, wbc)
759)
760
3bc29f0a 761LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
b87700e3
AG
762
763 TP_PROTO(struct file *file, int datasync),
764
765 TP_ARGS(file, datasync),
766
f127e61e
MD
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,
b87700e3 772 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
f127e61e 773 )
b87700e3 774)
1f1ec4ed 775#endif
b87700e3 776
5f4c791e 777#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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))
1f1ec4ed
MJ
785LTTNG_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)
5f4c791e 795#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fcd0a11c
MD
796LTTNG_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
3bc29f0a 807LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
b87700e3
AG
808
809 TP_PROTO(int wait),
810
811 TP_ARGS(wait),
812
f127e61e
MD
813 TP_FIELDS(
814 ctf_integer(int, wait, wait)
815 )
b87700e3 816)
fcd0a11c
MD
817#endif
818
5f4c791e 819#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
820LTTNG_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)
5f4c791e 837#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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) || \
7ca7cd6e 841 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
842LTTNG_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(
9d2f1147 850 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
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
fcd0a11c 860LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
b87700e3 861
fcd0a11c
MD
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(
9d2f1147 868 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fcd0a11c
MD
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)
1f1ec4ed 877#endif
fcd0a11c 878
5f4c791e 879#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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))
fde8b34a 887LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
1f1ec4ed
MJ
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(
9d2f1147 897 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
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)
fde8b34a 908
426eff93
MD
909LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
910
911 add_delayed_tree_ref,
912
913 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
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
426eff93
MD
923LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
924
925 run_delayed_tree_ref,
926
927 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
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)
5f4c791e 936#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fde8b34a 937LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
fcd0a11c
MD
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(
9d2f1147 947 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fcd0a11c
MD
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)
fde8b34a 958
426eff93
MD
959LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
960
961 add_delayed_tree_ref,
962
963 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
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
426eff93
MD
973LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
974
975 run_delayed_tree_ref,
976
977 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
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)
0badc02f
MJ
986#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
987LTTNG_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
426eff93
MD
1007LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1008
1009 add_delayed_tree_ref,
1010
1011 btrfs_add_delayed_tree_ref,
0badc02f
MJ
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
426eff93
MD
1020LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1021
1022 run_delayed_tree_ref,
1023
1024 btrfs_run_delayed_tree_ref,
0badc02f
MJ
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)
5f4c791e 1032#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
fde8b34a
MJ
1033LTTNG_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
426eff93
MD
1053LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1054
1055 add_delayed_tree_ref,
1056
1057 btrfs_add_delayed_tree_ref,
fde8b34a
MJ
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
426eff93
MD
1066LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
1067
1068 run_delayed_tree_ref,
1069
1070 btrfs_run_delayed_tree_ref,
fde8b34a
MJ
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)
5f4c791e 1078#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
3bc29f0a 1079LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
b87700e3
AG
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
f127e61e
MD
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)
f127e61e 1095 ctf_integer(u64, seq, ref->seq)
fde8b34a
MJ
1096 )
1097)
1098#else
1099LTTNG_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)
f127e61e 1115 )
b87700e3 1116)
fcd0a11c 1117#endif
b87700e3 1118
5f4c791e 1119#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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))
fde8b34a
MJ
1127LTTNG_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(
9d2f1147 1137 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fde8b34a
MJ
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
426eff93
MD
1150LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1151
1152 add_delayed_data_ref,
1153
1154 btrfs_add_delayed_data_ref,
fde8b34a
MJ
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
426eff93
MD
1164LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1165
1166 run_delayed_data_ref,
1167
1168 btrfs_run_delayed_data_ref,
fde8b34a
MJ
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)
5f4c791e 1177#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
fde8b34a
MJ
1178LTTNG_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(
9d2f1147 1188 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
fde8b34a
MJ
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
426eff93
MD
1201LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1202
1203 add_delayed_data_ref,
1204
1205 btrfs_add_delayed_data_ref,
fde8b34a
MJ
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
426eff93
MD
1215LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1216
1217 run_delayed_data_ref,
1218
1219 btrfs_run_delayed_data_ref,
fde8b34a
MJ
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)
0badc02f
MJ
1228#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
1229LTTNG_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
426eff93
MD
1250LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1251
1252 add_delayed_data_ref,
1253
1254 btrfs_add_delayed_data_ref,
0badc02f
MJ
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
426eff93
MD
1263LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1264
1265 run_delayed_data_ref,
1266
1267 btrfs_run_delayed_data_ref,
0badc02f
MJ
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)
5f4c791e 1275#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
fde8b34a
MJ
1276LTTNG_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
426eff93
MD
1297LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1298
1299 add_delayed_data_ref,
1300
1301 btrfs_add_delayed_data_ref,
fde8b34a
MJ
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
426eff93
MD
1310LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
1311
1312 run_delayed_data_ref,
1313
1314 btrfs_run_delayed_data_ref,
fde8b34a
MJ
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)
5f4c791e 1322#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
3bc29f0a 1323LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
b87700e3
AG
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
f127e61e
MD
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)
f127e61e 1340 ctf_integer(u64, seq, ref->seq)
f127e61e 1341 )
b87700e3 1342)
fde8b34a
MJ
1343#else
1344LTTNG_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
b87700e3 1364
5f4c791e 1365#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
ab9ebe67
MJ
1366LTTNG_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
d7921a5f
MD
1382LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1383
1384 add_delayed_ref_head,
1385
1386 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
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
d7921a5f
MD
1395LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1396
1397 run_delayed_ref_head,
1398
1399 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
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
5f4c791e 1408#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
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
ab9ebe67
MJ
1417LTTNG_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
d7921a5f
MD
1434LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1435
1436 add_delayed_ref_head,
1437
1438 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
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
d7921a5f
MD
1448LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1449
1450 run_delayed_ref_head,
1451
1452 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
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
5f4c791e 1462#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
ab9ebe67 1463LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
fcd0a11c
MD
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
d7921a5f
MD
1480LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1481
1482 add_delayed_ref_head,
1483
1484 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
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
d7921a5f
MD
1494LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1495
1496 run_delayed_ref_head,
1497
1498 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
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
0badc02f 1508#elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0))
0b3f6dcb
MJ
1509LTTNG_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
d7921a5f
MD
1525LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1526
1527 add_delayed_ref_head,
1528
1529 btrfs_add_delayed_ref_head,
0b3f6dcb
MJ
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
d7921a5f
MD
1538LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1539
1540 run_delayed_ref_head,
1541
1542 btrfs_run_delayed_ref_head,
0b3f6dcb
MJ
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
5f4c791e 1551#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
ab9ebe67
MJ
1552LTTNG_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
d7921a5f
MD
1568LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1569
1570 add_delayed_ref_head,
1571
1572 btrfs_add_delayed_ref_head,
ab9ebe67
MJ
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
d7921a5f
MD
1581LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
1582
1583 run_delayed_ref_head,
1584
1585 btrfs_run_delayed_ref_head,
ab9ebe67
MJ
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
fcd0a11c 1594#else
3bc29f0a 1595LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
b87700e3
AG
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
f127e61e
MD
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 )
b87700e3 1609)
fcd0a11c 1610#endif
b87700e3 1611
5f4c791e 1612#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
1613
1614LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1615
1616 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *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
1631LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1632
9d2f1147 1633 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1f1ec4ed
MJ
1634 u64 offset, u64 size),
1635
9d2f1147 1636 TP_ARGS(fs_info, map, offset, size)
1f1ec4ed
MJ
1637)
1638
1639LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1640
9d2f1147 1641 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
1f1ec4ed
MJ
1642 u64 offset, u64 size),
1643
9d2f1147 1644 TP_ARGS(fs_info, map, offset, size)
1f1ec4ed
MJ
1645)
1646
5f4c791e 1647#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ff8bdcc2
MD
1648
1649LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1650
1651 TP_PROTO(struct btrfs_fs_info *fs_info, 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
1666LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1667
9d2f1147 1668 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
ff8bdcc2
MD
1669 u64 offset, u64 size),
1670
9d2f1147 1671 TP_ARGS(fs_info, map, offset, size)
ff8bdcc2
MD
1672)
1673
1674LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1675
9d2f1147 1676 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
ff8bdcc2
MD
1677 u64 offset, u64 size),
1678
9d2f1147 1679 TP_ARGS(fs_info, map, offset, size)
ff8bdcc2
MD
1680)
1681
0badc02f
MJ
1682#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1683 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1684 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1685 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
1686
1687LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
1688
1689 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1690 u64 offset, u64 size),
1691
1692 TP_ARGS(root, map, offset, size),
1693
1694 TP_FIELDS(
1695 ctf_integer(int, num_stripes, map->num_stripes)
1696 ctf_integer(u64, type, map->type)
1697 ctf_integer(int, sub_stripes, map->sub_stripes)
1698 ctf_integer(u64, offset, offset)
1699 ctf_integer(u64, size, size)
1700 ctf_integer(u64, root_objectid, root->root_key.objectid)
1701 )
1702)
1703
1704LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
1705
1706 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1707 u64 offset, u64 size),
1708
1709 TP_ARGS(root, map, offset, size)
1710)
1711
1712LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
1713
1714 TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map,
1715 u64 offset, u64 size),
1716
1717 TP_ARGS(root, map, offset, size)
1718)
1719
5f4c791e 1720#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1721
3bc29f0a 1722LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
b87700e3
AG
1723
1724 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1725 u64 offset, u64 size),
1726
1727 TP_ARGS(root, map, offset, size),
1728
f127e61e
MD
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 )
b87700e3
AG
1737)
1738
3bc29f0a 1739LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
b87700e3
AG
1740
1741 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1742 u64 offset, u64 size),
1743
1744 TP_ARGS(root, map, offset, size)
1745)
1746
3bc29f0a 1747LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
b87700e3
AG
1748
1749 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
1750 u64 offset, u64 size),
1751
1752 TP_ARGS(root, map, offset, size)
1753)
1754
5f4c791e 1755#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1756
5f4c791e 1757#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1758 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1759 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1760 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 1761 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
1762LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
1763
1764 TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
1765 const struct extent_buffer *cow),
1766
1767 TP_ARGS(root, buf, cow),
1768
1769 TP_FIELDS(
1770 ctf_integer(u64, root_objectid, root->root_key.objectid)
1771 ctf_integer(u64, buf_start, buf->start)
1772 ctf_integer(int, refs, atomic_read(&buf->refs))
1773 ctf_integer(u64, cow_start, cow->start)
1774 ctf_integer(int, buf_level, btrfs_header_level(buf))
1775 ctf_integer(int, cow_level, btrfs_header_level(cow))
1776 )
1777)
1778#else
3bc29f0a 1779LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
b87700e3
AG
1780
1781 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
1782 struct extent_buffer *cow),
1783
1784 TP_ARGS(root, buf, cow),
1785
f127e61e
MD
1786 TP_FIELDS(
1787 ctf_integer(u64, root_objectid, root->root_key.objectid)
1788 ctf_integer(u64, buf_start, buf->start)
1789 ctf_integer(int, refs, atomic_read(&buf->refs))
1790 ctf_integer(u64, cow_start, cow->start)
1791 ctf_integer(int, buf_level, btrfs_header_level(buf))
1792 ctf_integer(int, cow_level, btrfs_header_level(cow))
1793 )
b87700e3 1794)
1f1ec4ed 1795#endif
b87700e3 1796
5f4c791e 1797#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ae5af8ea
MJ
1798LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1799
1800 TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val,
1801 u64 bytes, int reserve),
1802
1803 TP_ARGS(fs_info, type, val, bytes, reserve),
1804
1805 TP_FIELDS(
1806 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1807 ctf_string(type, type)
1808 ctf_integer(u64, val, val)
1809 ctf_integer(u64, bytes, bytes)
1810 ctf_integer(int, reserve, reserve)
1811 )
1812)
5f4c791e 1813#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
1814 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1815 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1816 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 1817 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
1818LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
1819
1820 TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
1821 u64 bytes, int reserve),
1822
1823 TP_ARGS(fs_info, type, val, bytes, reserve),
1824
1825 TP_FIELDS(
9d2f1147 1826 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
1827 ctf_string(type, type)
1828 ctf_integer(u64, val, val)
1829 ctf_integer(u64, bytes, bytes)
1830 ctf_integer(int, reserve, reserve)
1831 )
1832)
5f4c791e 1833#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
3bc29f0a 1834LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
b87700e3
AG
1835
1836 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
1837 u64 bytes, int reserve),
1838
1839 TP_ARGS(fs_info, type, val, bytes, reserve),
1840
f127e61e 1841 TP_FIELDS(
9d2f1147 1842 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
f127e61e
MD
1843 ctf_string(type, type)
1844 ctf_integer(u64, val, val)
1845 ctf_integer(u64, bytes, bytes)
1846 ctf_integer(int, reserve, reserve)
1847 )
b87700e3
AG
1848)
1849#endif
1850
5f4c791e 1851#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
1852
1853LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1854
9d2f1147 1855 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1856
9d2f1147 1857 TP_ARGS(fs_info, start, len),
1f1ec4ed
MJ
1858
1859 TP_FIELDS(
1860 ctf_integer(u64, start, start)
1861 ctf_integer(u64, len, len)
1862 )
1863)
1864
1865LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1866
9d2f1147 1867 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1868
9d2f1147 1869 TP_ARGS(fs_info, start, len)
1f1ec4ed
MJ
1870)
1871
1872LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1873
9d2f1147 1874 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len),
1f1ec4ed 1875
9d2f1147 1876 TP_ARGS(fs_info, start, len)
1f1ec4ed
MJ
1877)
1878
5f4c791e 1879#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ff8bdcc2
MD
1880
1881LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1882
9d2f1147 1883 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 1884
9d2f1147 1885 TP_ARGS(fs_info, start, len),
ff8bdcc2
MD
1886
1887 TP_FIELDS(
1888 ctf_integer(u64, start, start)
1889 ctf_integer(u64, len, len)
1890 )
1891)
1892
1893LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1894
9d2f1147 1895 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 1896
9d2f1147 1897 TP_ARGS(fs_info, start, len)
ff8bdcc2
MD
1898)
1899
1900LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1901
9d2f1147 1902 TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len),
ff8bdcc2 1903
9d2f1147 1904 TP_ARGS(fs_info, start, len)
ff8bdcc2
MD
1905)
1906
0badc02f
MJ
1907#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
1908 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
1909 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
1910 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e
MJ
1911
1912LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
1913
1914 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1915
1916 TP_ARGS(root, start, len),
1917
1918 TP_FIELDS(
1919 ctf_integer(u64, root_objectid, root->root_key.objectid)
1920 ctf_integer(u64, start, start)
1921 ctf_integer(u64, len, len)
1922 )
1923)
1924
1925LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
1926
1927 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1928
1929 TP_ARGS(root, start, len)
1930)
1931
1932LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
1933
1934 TP_PROTO(const struct btrfs_root *root, u64 start, u64 len),
1935
1936 TP_ARGS(root, start, len)
1937)
1938
5f4c791e 1939#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1940
3bc29f0a 1941LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
b87700e3
AG
1942
1943 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1944
1945 TP_ARGS(root, start, len),
1946
f127e61e
MD
1947 TP_FIELDS(
1948 ctf_integer(u64, root_objectid, root->root_key.objectid)
1949 ctf_integer(u64, start, start)
1950 ctf_integer(u64, len, len)
1951 )
b87700e3
AG
1952)
1953
3bc29f0a 1954LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
b87700e3
AG
1955
1956 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1957
1958 TP_ARGS(root, start, len)
1959)
1960
3bc29f0a 1961LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
b87700e3
AG
1962
1963 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
1964
1965 TP_ARGS(root, start, len)
1966)
1967
5f4c791e 1968#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 1969
d0eeda3f
MJ
1970#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
1971LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1972
1973 btrfs_find_free_extent,
1974
1975 TP_PROTO(const struct btrfs_root *root,
1976 const struct find_free_extent_ctl *ffe_ctl),
1977
1978 TP_ARGS(root, ffe_ctl),
1979
1980 TP_FIELDS(
1981 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1982 ctf_integer(u64, root_objectid, root->root_key.objectid)
1983 ctf_integer(u64, num_bytes, ffe_ctl->num_bytes)
1984 ctf_integer(u64, empty_size, ffe_ctl->empty_size)
1985 ctf_integer(u64, flags, ffe_ctl->flags)
1986 )
1987)
1988
1989#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
eb270dc0 1990 LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
859ad5c7
MJ
1991 LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \
1992 LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0))
ab1ddefc
MJ
1993LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1994
1995 btrfs_find_free_extent,
1996
1997 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
1998 u64 data),
1999
2000 TP_ARGS(root, num_bytes, empty_size, data),
2001
2002 TP_FIELDS(
2003 ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2004 ctf_integer(u64, root_objectid, root->root_key.objectid)
2005 ctf_integer(u64, num_bytes, num_bytes)
2006 ctf_integer(u64, empty_size, empty_size)
2007 ctf_integer(u64, data, data)
2008 )
2009)
2010
5f4c791e 2011#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
ab1ddefc 2012
5809d816
MJ
2013LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2014
2015 btrfs_find_free_extent,
2016
2017 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2018 u64 data),
2019
2020 TP_ARGS(fs_info, num_bytes, empty_size, data),
2021
2022 TP_FIELDS(
2023 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2024 ctf_integer(u64, num_bytes, num_bytes)
2025 ctf_integer(u64, empty_size, empty_size)
2026 ctf_integer(u64, data, data)
2027 )
2028)
2029
5f4c791e 2030#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
ab1ddefc
MJ
2031
2032LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2033
2034 btrfs_find_free_extent,
2035
2036 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2037 u64 data),
2038
2039 TP_ARGS(fs_info, num_bytes, empty_size, data),
2040
2041 TP_FIELDS(
2042 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2043 ctf_integer(u64, num_bytes, num_bytes)
2044 ctf_integer(u64, empty_size, empty_size)
2045 ctf_integer(u64, data, data)
2046 )
2047)
2048
5f4c791e 2049#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
ab1ddefc
MJ
2050
2051LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2052
2053 btrfs_find_free_extent,
2054
2055 TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2056 u64 data),
2057
2058 TP_ARGS(fs_info, num_bytes, empty_size, data),
2059
2060 TP_FIELDS(
2061 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2062 ctf_integer(u64, num_bytes, num_bytes)
2063 ctf_integer(u64, empty_size, empty_size)
2064 ctf_integer(u64, data, data)
2065 )
2066)
2067
5f4c791e 2068#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
ab1ddefc
MJ
2069
2070LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2071
2072 btrfs_find_free_extent,
2073
2074 TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size,
2075 u64 data),
2076
2077 TP_ARGS(fs_info, num_bytes, empty_size, data),
2078
2079 TP_FIELDS(
2080 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2081 ctf_integer(u64, num_bytes, num_bytes)
2082 ctf_integer(u64, empty_size, empty_size)
2083 ctf_integer(u64, data, data)
2084 )
2085)
2086
2087#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2088 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2089 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2090 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
2091
2092LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2093
2094 btrfs_find_free_extent,
2095
2096 TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2097 u64 data),
2098
2099 TP_ARGS(root, num_bytes, empty_size, data),
2100
2101 TP_FIELDS(
2102 ctf_integer(u64, root_objectid, root->root_key.objectid)
2103 ctf_integer(u64, num_bytes, num_bytes)
2104 ctf_integer(u64, empty_size, empty_size)
2105 ctf_integer(u64, data, data)
2106 )
2107)
5f4c791e 2108#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
ab1ddefc
MJ
2109
2110LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
2111
2112 btrfs_find_free_extent,
2113
2114 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
2115 u64 data),
2116
2117 TP_ARGS(root, num_bytes, empty_size, data),
2118
2119 TP_FIELDS(
2120 ctf_integer(u64, root_objectid, root->root_key.objectid)
2121 ctf_integer(u64, num_bytes, num_bytes)
2122 ctf_integer(u64, empty_size, empty_size)
2123 ctf_integer(u64, data, data)
2124 )
2125)
2126#endif
2127
d0eeda3f
MJ
2128#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,3,0))
2129LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2130
2131 TP_PROTO(const struct btrfs_block_group *block_group,
2132 const struct find_free_extent_ctl *ffe_ctl),
2133
2134 TP_ARGS(block_group, ffe_ctl),
2135
2136 TP_FIELDS(
2137 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2138 ctf_integer(u64, bg_objectid, block_group->start)
2139 ctf_integer(u64, flags, block_group->flags)
2140 ctf_integer(u64, start, ffe_ctl->search_start)
2141 ctf_integer(u64, len, ffe_ctl->num_bytes)
2142 )
2143)
2144
2145LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2146
2147 TP_PROTO(const struct btrfs_block_group *block_group,
2148 const struct find_free_extent_ctl *ffe_ctl),
2149
2150 TP_ARGS(block_group, ffe_ctl)
2151)
2152
2153LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2154
2155 TP_PROTO(const struct btrfs_block_group *block_group,
2156 const struct find_free_extent_ctl *ffe_ctl),
2157
2158 TP_ARGS(block_group, ffe_ctl)
2159)
2160
2161#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
2162LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2163
2164 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2165 u64 len),
2166
2167 TP_ARGS(block_group, start, len),
2168
2169 TP_FIELDS(
2170 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
2171 ctf_integer(u64, bg_objectid, block_group->start)
2172 ctf_integer(u64, flags, block_group->flags)
2173 ctf_integer(u64, start, start)
2174 ctf_integer(u64, len, len)
2175 )
2176)
2177
2178LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2179
2180 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2181 u64 len),
2182
2183 TP_ARGS(block_group, start, len)
2184)
2185
2186LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2187
2188 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2189 u64 len),
2190
2191 TP_ARGS(block_group, start, len)
2192)
2193
5f4c791e 2194#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
51ab0b1d
MJ
2195
2196LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2197
2198 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2199 u64 len),
2200
2201 TP_ARGS(block_group, start, len),
2202
2203 TP_FIELDS(
9d2f1147 2204 ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE)
51ab0b1d
MJ
2205 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2206 ctf_integer(u64, flags, block_group->flags)
2207 ctf_integer(u64, start, start)
2208 ctf_integer(u64, len, len)
2209 )
2210)
2211
2212LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2213
2214 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2215 u64 len),
2216
2217 TP_ARGS(block_group, start, len)
2218)
2219
2220LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2221
2222 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2223 u64 len),
2224
2225 TP_ARGS(block_group, start, len)
2226)
ff8bdcc2 2227
5f4c791e 2228#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
1f1ec4ed
MJ
2229
2230LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2231
9d2f1147 2232 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2233 const struct btrfs_block_group_cache *block_group, u64 start,
2234 u64 len),
2235
9d2f1147 2236 TP_ARGS(fs_info, block_group, start, len),
1f1ec4ed
MJ
2237
2238 TP_FIELDS(
9d2f1147 2239 ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE)
1f1ec4ed
MJ
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
2247LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2248
9d2f1147 2249 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2250 const struct btrfs_block_group_cache *block_group, u64 start,
2251 u64 len),
2252
9d2f1147 2253 TP_ARGS(fs_info, block_group, start, len)
1f1ec4ed
MJ
2254)
2255
2256LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2257
9d2f1147 2258 TP_PROTO(const struct btrfs_fs_info *fs_info,
1f1ec4ed
MJ
2259 const struct btrfs_block_group_cache *block_group, u64 start,
2260 u64 len),
2261
9d2f1147 2262 TP_ARGS(fs_info, block_group, start, len)
1f1ec4ed
MJ
2263)
2264
5f4c791e 2265#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
1f1ec4ed 2266
ff8bdcc2
MD
2267LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2268
9d2f1147 2269 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2270 struct btrfs_block_group_cache *block_group, u64 start,
2271 u64 len),
2272
9d2f1147 2273 TP_ARGS(fs_info, block_group, start, len),
ff8bdcc2
MD
2274
2275 TP_FIELDS(
2276 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2277 ctf_integer(u64, flags, block_group->flags)
2278 ctf_integer(u64, start, start)
2279 ctf_integer(u64, len, len)
2280 )
2281)
2282
2283LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2284
9d2f1147 2285 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2286 struct btrfs_block_group_cache *block_group, u64 start,
2287 u64 len),
2288
9d2f1147 2289 TP_ARGS(fs_info, block_group, start, len)
ff8bdcc2
MD
2290)
2291
2292LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2293
9d2f1147 2294 TP_PROTO(struct btrfs_fs_info *fs_info,
ff8bdcc2
MD
2295 struct btrfs_block_group_cache *block_group, u64 start,
2296 u64 len),
2297
9d2f1147 2298 TP_ARGS(fs_info, block_group, start, len)
ff8bdcc2 2299)
0badc02f
MJ
2300#elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2301 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2302 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
2303 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
7ca7cd6e 2304
7ca7cd6e
MJ
2305LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
2306
2307 TP_PROTO(const struct btrfs_root *root,
2308 const struct btrfs_block_group_cache *block_group, u64 start,
2309 u64 len),
2310
2311 TP_ARGS(root, block_group, start, len),
2312
2313 TP_FIELDS(
2314 ctf_integer(u64, root_objectid, root->root_key.objectid)
2315 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2316 ctf_integer(u64, flags, block_group->flags)
2317 ctf_integer(u64, start, start)
2318 ctf_integer(u64, len, len)
2319 )
2320)
2321
2322LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
2323
2324 TP_PROTO(const struct btrfs_root *root,
2325 const struct btrfs_block_group_cache *block_group, u64 start,
2326 u64 len),
2327
2328 TP_ARGS(root, block_group, start, len)
2329)
2330
2331LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
2332
2333 TP_PROTO(const struct btrfs_root *root,
2334 const struct btrfs_block_group_cache *block_group, u64 start,
2335 u64 len),
2336
2337 TP_ARGS(root, block_group, start, len)
2338)
ff8bdcc2 2339
5f4c791e 2340#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
ff8bdcc2 2341
3bc29f0a 2342LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
b87700e3
AG
2343
2344 TP_PROTO(struct btrfs_root *root,
2345 struct btrfs_block_group_cache *block_group, u64 start,
2346 u64 len),
2347
2348 TP_ARGS(root, block_group, start, len),
2349
f127e61e
MD
2350 TP_FIELDS(
2351 ctf_integer(u64, root_objectid, root->root_key.objectid)
2352 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2353 ctf_integer(u64, flags, block_group->flags)
2354 ctf_integer(u64, start, start)
2355 ctf_integer(u64, len, len)
2356 )
b87700e3
AG
2357)
2358
3bc29f0a 2359LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
b87700e3
AG
2360
2361 TP_PROTO(struct btrfs_root *root,
2362 struct btrfs_block_group_cache *block_group, u64 start,
2363 u64 len),
2364
2365 TP_ARGS(root, block_group, start, len)
2366)
2367
3bc29f0a 2368LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
b87700e3
AG
2369
2370 TP_PROTO(struct btrfs_root *root,
2371 struct btrfs_block_group_cache *block_group, u64 start,
2372 u64 len),
2373
2374 TP_ARGS(root, block_group, start, len)
2375)
2376
5f4c791e 2377#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
ff8bdcc2 2378
5f4c791e 2379#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
5809d816
MJ
2380LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2381
2382 TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
2383 u64 bytes, u64 empty_size, u64 min_bytes),
2384
2385 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2386
2387 TP_FIELDS(
2388 ctf_integer(u64, bg_objectid, block_group->start)
2389 ctf_integer(u64, flags, block_group->flags)
2390 ctf_integer(u64, start, start)
2391 ctf_integer(u64, bytes, bytes)
2392 ctf_integer(u64, empty_size, empty_size)
2393 ctf_integer(u64, min_bytes, min_bytes)
2394 )
2395)
2396
2397LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2398
2399 TP_PROTO(const struct btrfs_block_group *block_group),
2400
2401 TP_ARGS(block_group),
2402
2403 TP_FIELDS(
2404 ctf_integer(u64, bg_objectid, block_group->start)
2405 )
2406)
2407
2408LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2409
2410 TP_PROTO(const struct btrfs_block_group *block_group,
2411 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2412
2413 TP_ARGS(block_group, cluster, size, bitmap),
2414
2415 TP_FIELDS(
2416 ctf_integer(u64, bg_objectid, block_group->start)
2417 ctf_integer(u64, flags, block_group->flags)
2418 ctf_integer(u64, start, cluster->window_start)
2419 ctf_integer(u64, max_size, cluster->max_size)
2420 ctf_integer(u64, size, size)
2421 ctf_integer(int, bitmap, bitmap)
2422 )
2423)
5f4c791e 2424#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
2425 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2426 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2427 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 2428 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
2429LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
2430
2431 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
2432 u64 bytes, u64 empty_size, u64 min_bytes),
2433
2434 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2435
2436 TP_FIELDS(
2437 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2438 ctf_integer(u64, flags, block_group->flags)
2439 ctf_integer(u64, start, start)
2440 ctf_integer(u64, bytes, bytes)
2441 ctf_integer(u64, empty_size, empty_size)
2442 ctf_integer(u64, min_bytes, min_bytes)
2443 )
2444)
2445
2446LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
2447
2448 TP_PROTO(const struct btrfs_block_group_cache *block_group),
2449
2450 TP_ARGS(block_group),
2451
2452 TP_FIELDS(
2453 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2454 )
2455)
2456
2457LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
2458
2459 TP_PROTO(const struct btrfs_block_group_cache *block_group,
2460 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2461
2462 TP_ARGS(block_group, cluster, size, bitmap),
2463
2464 TP_FIELDS(
2465 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2466 ctf_integer(u64, flags, block_group->flags)
2467 ctf_integer(u64, start, cluster->window_start)
2468 ctf_integer(u64, max_size, cluster->max_size)
2469 ctf_integer(u64, size, size)
2470 ctf_integer(int, bitmap, bitmap)
2471 )
2472)
5f4c791e 2473#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
3bc29f0a 2474LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
b87700e3
AG
2475
2476 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
2477 u64 bytes, u64 empty_size, u64 min_bytes),
2478
2479 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
2480
f127e61e
MD
2481 TP_FIELDS(
2482 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2483 ctf_integer(u64, flags, block_group->flags)
2484 ctf_integer(u64, start, start)
2485 ctf_integer(u64, bytes, bytes)
2486 ctf_integer(u64, empty_size, empty_size)
2487 ctf_integer(u64, min_bytes, min_bytes)
2488 )
b87700e3
AG
2489)
2490
3bc29f0a 2491LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
b87700e3
AG
2492
2493 TP_PROTO(struct btrfs_block_group_cache *block_group),
2494
2495 TP_ARGS(block_group),
2496
f127e61e
MD
2497 TP_FIELDS(
2498 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2499 )
b87700e3
AG
2500)
2501
3bc29f0a 2502LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
b87700e3
AG
2503
2504 TP_PROTO(struct btrfs_block_group_cache *block_group,
2505 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
2506
2507 TP_ARGS(block_group, cluster, size, bitmap),
2508
f127e61e
MD
2509 TP_FIELDS(
2510 ctf_integer(u64, bg_objectid, block_group->key.objectid)
2511 ctf_integer(u64, flags, block_group->flags)
2512 ctf_integer(u64, start, cluster->window_start)
2513 ctf_integer(u64, max_size, cluster->max_size)
2514 ctf_integer(u64, size, size)
2515 ctf_integer(int, bitmap, bitmap)
2516 )
b87700e3
AG
2517)
2518#endif
2519
5f4c791e 2520#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
0badc02f
MJ
2521 LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
2522 LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
2523 LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
7ca7cd6e 2524 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1f1ec4ed
MJ
2525LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
2526
2527 btrfs_alloc_extent_state,
2528
2529 TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
2530
2531 TP_ARGS(state, mask, IP),
2532
2533 TP_FIELDS(
2534 ctf_integer_hex(const struct extent_state *, state, state)
2535 ctf_integer(gfp_t, mask, mask)
2c054599 2536 ctf_integer_hex(unsigned long, ip, IP)
1f1ec4ed
MJ
2537 )
2538)
2539
2540LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
2541
2542 btrfs_free_extent_state,
2543
2544 TP_PROTO(const struct extent_state *state, unsigned long IP),
2545
2546 TP_ARGS(state, IP),
2547
2548 TP_FIELDS(
2549 ctf_integer_hex(const struct extent_state *, state, state)
2c054599 2550 ctf_integer_hex(unsigned long, ip, IP)
1f1ec4ed
MJ
2551 )
2552)
5f4c791e 2553#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
3bc29f0a 2554LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
9cf29d3e
MD
2555
2556 btrfs_alloc_extent_state,
b87700e3
AG
2557
2558 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
2559
2560 TP_ARGS(state, mask, IP),
2561
f127e61e 2562 TP_FIELDS(
fa91fcac 2563 ctf_integer_hex(struct extent_state *, state, state)
f127e61e 2564 ctf_integer(gfp_t, mask, mask)
2c054599 2565 ctf_integer_hex(unsigned long, ip, IP)
f127e61e 2566 )
b87700e3
AG
2567)
2568
3bc29f0a 2569LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
9cf29d3e
MD
2570
2571 btrfs_free_extent_state,
b87700e3
AG
2572
2573 TP_PROTO(struct extent_state *state, unsigned long IP),
2574
2575 TP_ARGS(state, IP),
2576
f127e61e 2577 TP_FIELDS(
fa91fcac 2578 ctf_integer_hex(struct extent_state *, state, state)
2c054599 2579 ctf_integer_hex(unsigned long, ip, IP)
f127e61e 2580 )
b87700e3
AG
2581)
2582#endif
2583
3bc29f0a 2584#endif /* LTTNG_TRACE_BTRFS_H */
b87700e3
AG
2585
2586/* This part must be outside protection */
3b4aafcb 2587#include <lttng/define_trace.h>
This page took 0.171918 seconds and 4 git commands to generate.