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