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