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