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