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