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