b529e8e02f1c3fa57197515cc14bc22248404ba8
[lttng-modules.git] / instrumentation / events / lttng-module / btrfs.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM btrfs
3
4 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_BTRFS_H
6
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/writeback.h>
9 #include <linux/version.h>
10
11 #ifndef _TRACE_BTRFS_DEF_
12 #define _TRACE_BTRFS_DEF_
13 struct btrfs_root;
14 struct btrfs_fs_info;
15 struct btrfs_inode;
16 struct extent_map;
17 struct btrfs_ordered_extent;
18 struct btrfs_delayed_ref_node;
19 struct btrfs_delayed_tree_ref;
20 struct btrfs_delayed_data_ref;
21 struct btrfs_delayed_ref_head;
22 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
23 struct btrfs_block_group_cache;
24 struct btrfs_free_cluster;
25 #endif
26 struct map_lookup;
27 struct extent_buffer;
28 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
29 struct extent_state;
30 #endif
31 #endif
32
33 #define BTRFS_UUID_SIZE 16
34
35 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
36 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
37
38 TP_PROTO(const struct btrfs_root *root),
39
40 TP_ARGS(root),
41
42 TP_FIELDS(
43 ctf_integer(u64, generation, root->fs_info->generation)
44 ctf_integer(u64, root_objectid, root->root_key.objectid)
45 )
46 )
47
48 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
49
50 TP_PROTO(const struct inode *inode),
51
52 TP_ARGS(inode),
53
54 TP_FIELDS(
55 ctf_integer(ino_t, ino, inode->i_ino)
56 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
57 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
58 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
59 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
60 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
61 ctf_integer(u64, root_objectid,
62 BTRFS_I(inode)->root->root_key.objectid)
63 )
64 )
65
66 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
67
68 TP_PROTO(const struct inode *inode),
69
70 TP_ARGS(inode)
71 )
72
73 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
74
75 TP_PROTO(const struct inode *inode),
76
77 TP_ARGS(inode)
78 )
79
80 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
81
82 TP_PROTO(const struct inode *inode),
83
84 TP_ARGS(inode)
85 )
86 #else
87 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
88
89 TP_PROTO(struct btrfs_root *root),
90
91 TP_ARGS(root),
92
93 TP_FIELDS(
94 ctf_integer(u64, generation, root->fs_info->generation)
95 ctf_integer(u64, root_objectid, root->root_key.objectid)
96 )
97 )
98
99 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
100
101 TP_PROTO(struct inode *inode),
102
103 TP_ARGS(inode),
104
105 TP_FIELDS(
106 ctf_integer(ino_t, ino, inode->i_ino)
107 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
108 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
109 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
110 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
111 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
112 ctf_integer(u64, root_objectid,
113 BTRFS_I(inode)->root->root_key.objectid)
114 )
115 )
116
117 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
118
119 TP_PROTO(struct inode *inode),
120
121 TP_ARGS(inode)
122 )
123
124 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
125
126 TP_PROTO(struct inode *inode),
127
128 TP_ARGS(inode)
129 )
130
131 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
132
133 TP_PROTO(struct inode *inode),
134
135 TP_ARGS(inode)
136 )
137 #endif
138
139 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
140
141 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
142
143 TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode,
144 const struct extent_map *map),
145
146 TP_ARGS(root, inode, map),
147
148 TP_FIELDS(
149 ctf_integer(u64, root_objectid, root->root_key.objectid)
150 ctf_integer(u64, ino, btrfs_ino(inode))
151 ctf_integer(u64, start, map->start)
152 ctf_integer(u64, len, map->len)
153 ctf_integer(u64, orig_start, map->orig_start)
154 ctf_integer(u64, block_start, map->block_start)
155 ctf_integer(u64, block_len, map->block_len)
156 ctf_integer(unsigned long, flags, map->flags)
157 ctf_integer(int, refs, refcount_read(&map->refs))
158 ctf_integer(unsigned int, compress_type, map->compress_type)
159 )
160 )
161
162 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
163
164 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
165
166 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
167 struct extent_map *map),
168
169 TP_ARGS(root, inode, map),
170
171 TP_FIELDS(
172 ctf_integer(u64, root_objectid, root->root_key.objectid)
173 ctf_integer(u64, ino, btrfs_ino(inode))
174 ctf_integer(u64, start, map->start)
175 ctf_integer(u64, len, map->len)
176 ctf_integer(u64, orig_start, map->orig_start)
177 ctf_integer(u64, block_start, map->block_start)
178 ctf_integer(u64, block_len, map->block_len)
179 ctf_integer(unsigned long, flags, map->flags)
180 ctf_integer(int, refs, refcount_read(&map->refs))
181 ctf_integer(unsigned int, compress_type, map->compress_type)
182 )
183 )
184
185 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
186
187 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
188
189 TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode,
190 struct extent_map *map),
191
192 TP_ARGS(root, inode, map),
193
194 TP_FIELDS(
195 ctf_integer(u64, root_objectid, root->root_key.objectid)
196 ctf_integer(u64, ino, btrfs_ino(inode))
197 ctf_integer(u64, start, map->start)
198 ctf_integer(u64, len, map->len)
199 ctf_integer(u64, orig_start, map->orig_start)
200 ctf_integer(u64, block_start, map->block_start)
201 ctf_integer(u64, block_len, map->block_len)
202 ctf_integer(unsigned long, flags, map->flags)
203 ctf_integer(int, refs, atomic_read(&map->refs))
204 ctf_integer(unsigned int, compress_type, map->compress_type)
205 )
206 )
207
208 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
209
210 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
211
212 TP_PROTO(struct btrfs_root *root, struct inode *inode,
213 struct extent_map *map),
214
215 TP_ARGS(root, inode, map),
216
217 TP_FIELDS(
218 ctf_integer(u64, root_objectid, root->root_key.objectid)
219 ctf_integer(u64, ino, btrfs_ino(inode))
220 ctf_integer(u64, start, map->start)
221 ctf_integer(u64, len, map->len)
222 ctf_integer(u64, orig_start, map->orig_start)
223 ctf_integer(u64, block_start, map->block_start)
224 ctf_integer(u64, block_len, map->block_len)
225 ctf_integer(unsigned long, flags, map->flags)
226 ctf_integer(int, refs, atomic_read(&map->refs))
227 ctf_integer(unsigned int, compress_type, map->compress_type)
228 )
229 )
230
231 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
232
233 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
234
235 TP_PROTO(struct btrfs_root *root, struct extent_map *map),
236
237 TP_ARGS(root, map),
238
239 TP_FIELDS(
240 ctf_integer(u64, root_objectid, root->root_key.objectid)
241 ctf_integer(u64, start, map->start)
242 ctf_integer(u64, len, map->len)
243 ctf_integer(u64, orig_start, map->orig_start)
244 ctf_integer(u64, block_start, map->block_start)
245 ctf_integer(u64, block_len, map->block_len)
246 ctf_integer(unsigned long, flags, map->flags)
247 ctf_integer(int, refs, atomic_read(&map->refs))
248 ctf_integer(unsigned int, compress_type, map->compress_type)
249 )
250 )
251
252 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
253
254 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
255 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
256
257 TP_PROTO(const struct inode *inode,
258 const struct btrfs_ordered_extent *ordered),
259
260 TP_ARGS(inode, ordered),
261
262 TP_FIELDS(
263 ctf_integer(ino_t, ino, inode->i_ino)
264 ctf_integer(u64, file_offset, ordered->file_offset)
265 ctf_integer(u64, start, ordered->start)
266 ctf_integer(u64, len, ordered->len)
267 ctf_integer(u64, disk_len, ordered->disk_len)
268 ctf_integer(u64, bytes_left, ordered->bytes_left)
269 ctf_integer(unsigned long, flags, ordered->flags)
270 ctf_integer(int, compress_type, ordered->compress_type)
271 ctf_integer(int, refs, refcount_read(&ordered->refs))
272 ctf_integer(u64, root_objectid,
273 BTRFS_I(inode)->root->root_key.objectid)
274 )
275 )
276 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
277 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
278
279 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
280
281 TP_ARGS(inode, ordered),
282
283 TP_FIELDS(
284 ctf_integer(ino_t, ino, inode->i_ino)
285 ctf_integer(u64, file_offset, ordered->file_offset)
286 ctf_integer(u64, start, ordered->start)
287 ctf_integer(u64, len, ordered->len)
288 ctf_integer(u64, disk_len, ordered->disk_len)
289 ctf_integer(u64, bytes_left, ordered->bytes_left)
290 ctf_integer(unsigned long, flags, ordered->flags)
291 ctf_integer(int, compress_type, ordered->compress_type)
292 ctf_integer(int, refs, refcount_read(&ordered->refs))
293 ctf_integer(u64, root_objectid,
294 BTRFS_I(inode)->root->root_key.objectid)
295 )
296 )
297 #else
298 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
299
300 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
301
302 TP_ARGS(inode, ordered),
303
304 TP_FIELDS(
305 ctf_integer(ino_t, ino, inode->i_ino)
306 ctf_integer(u64, file_offset, ordered->file_offset)
307 ctf_integer(u64, start, ordered->start)
308 ctf_integer(u64, len, ordered->len)
309 ctf_integer(u64, disk_len, ordered->disk_len)
310 ctf_integer(u64, bytes_left, ordered->bytes_left)
311 ctf_integer(unsigned long, flags, ordered->flags)
312 ctf_integer(int, compress_type, ordered->compress_type)
313 ctf_integer(int, refs, atomic_read(&ordered->refs))
314 ctf_integer(u64, root_objectid,
315 BTRFS_I(inode)->root->root_key.objectid)
316 )
317 )
318 #endif
319
320 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
321 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
322
323 TP_PROTO(const struct inode *inode,
324 const struct btrfs_ordered_extent *ordered),
325
326 TP_ARGS(inode, ordered)
327 )
328
329 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
330
331 TP_PROTO(const struct inode *inode,
332 const struct btrfs_ordered_extent *ordered),
333
334 TP_ARGS(inode, ordered)
335 )
336
337 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
338
339 TP_PROTO(const struct inode *inode,
340 const struct btrfs_ordered_extent *ordered),
341
342 TP_ARGS(inode, ordered)
343 )
344
345 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
346
347 TP_PROTO(const struct inode *inode,
348 const struct btrfs_ordered_extent *ordered),
349
350 TP_ARGS(inode, ordered)
351 )
352
353 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
354
355 TP_PROTO(const struct page *page, const struct inode *inode,
356 const struct writeback_control *wbc),
357
358 TP_ARGS(page, inode, wbc),
359
360 TP_FIELDS(
361 ctf_integer(ino_t, ino, inode->i_ino)
362 ctf_integer(pgoff_t, index, page->index)
363 ctf_integer(long, nr_to_write, wbc->nr_to_write)
364 ctf_integer(long, pages_skipped, wbc->pages_skipped)
365 ctf_integer(loff_t, range_start, wbc->range_start)
366 ctf_integer(loff_t, range_end, wbc->range_end)
367 ctf_integer(char, for_kupdate, wbc->for_kupdate)
368 ctf_integer(char, for_reclaim, wbc->for_reclaim)
369 ctf_integer(char, range_cyclic, wbc->range_cyclic)
370 ctf_integer(pgoff_t, writeback_index,
371 inode->i_mapping->writeback_index)
372 ctf_integer(u64, root_objectid,
373 BTRFS_I(inode)->root->root_key.objectid)
374 )
375 )
376
377 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
378
379 __extent_writepage,
380
381 btrfs__extent_writepage,
382
383 TP_PROTO(const struct page *page, const struct inode *inode,
384 const struct writeback_control *wbc),
385
386 TP_ARGS(page, inode, wbc)
387 )
388
389 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
390
391 TP_PROTO(const struct page *page, u64 start, u64 end, int uptodate),
392
393 TP_ARGS(page, start, end, uptodate),
394
395 TP_FIELDS(
396 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
397 ctf_integer(pgoff_t, index, page->index)
398 ctf_integer(u64, start, start)
399 ctf_integer(u64, end, end)
400 ctf_integer(int, uptodate, uptodate)
401 ctf_integer(u64, root_objectid,
402 BTRFS_I(page->mapping->host)->root->root_key.objectid)
403 )
404 )
405
406 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
407
408 TP_PROTO(const struct file *file, int datasync),
409
410 TP_ARGS(file, datasync),
411
412 TP_FIELDS(
413 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
414 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
415 ctf_integer(int, datasync, datasync)
416 ctf_integer(u64, root_objectid,
417 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
418 )
419 )
420 #else
421 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
422
423 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
424
425 TP_ARGS(inode, ordered)
426 )
427
428 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
429
430 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
431
432 TP_ARGS(inode, ordered)
433 )
434
435 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
436
437 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
438
439 TP_ARGS(inode, ordered)
440 )
441
442 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
443
444 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
445
446 TP_ARGS(inode, ordered)
447 )
448
449 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
450
451 TP_PROTO(struct page *page, struct inode *inode,
452 struct writeback_control *wbc),
453
454 TP_ARGS(page, inode, wbc),
455
456 TP_FIELDS(
457 ctf_integer(ino_t, ino, inode->i_ino)
458 ctf_integer(pgoff_t, index, page->index)
459 ctf_integer(long, nr_to_write, wbc->nr_to_write)
460 ctf_integer(long, pages_skipped, wbc->pages_skipped)
461 ctf_integer(loff_t, range_start, wbc->range_start)
462 ctf_integer(loff_t, range_end, wbc->range_end)
463 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
464 ctf_integer(char, nonblocking, wbc->nonblocking)
465 #endif
466 ctf_integer(char, for_kupdate, wbc->for_kupdate)
467 ctf_integer(char, for_reclaim, wbc->for_reclaim)
468 ctf_integer(char, range_cyclic, wbc->range_cyclic)
469 ctf_integer(pgoff_t, writeback_index,
470 inode->i_mapping->writeback_index)
471 ctf_integer(u64, root_objectid,
472 BTRFS_I(inode)->root->root_key.objectid)
473 )
474 )
475
476 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
477
478 __extent_writepage,
479
480 btrfs__extent_writepage,
481
482 TP_PROTO(struct page *page, struct inode *inode,
483 struct writeback_control *wbc),
484
485 TP_ARGS(page, inode, wbc)
486 )
487
488 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
489
490 TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
491
492 TP_ARGS(page, start, end, uptodate),
493
494 TP_FIELDS(
495 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
496 ctf_integer(pgoff_t, index, page->index)
497 ctf_integer(u64, start, start)
498 ctf_integer(u64, end, end)
499 ctf_integer(int, uptodate, uptodate)
500 ctf_integer(u64, root_objectid,
501 BTRFS_I(page->mapping->host)->root->root_key.objectid)
502 )
503 )
504
505 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
506
507 TP_PROTO(struct file *file, int datasync),
508
509 TP_ARGS(file, datasync),
510
511 TP_FIELDS(
512 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
513 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
514 ctf_integer(int, datasync, datasync)
515 ctf_integer(u64, root_objectid,
516 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
517 )
518 )
519 #endif
520
521 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
522 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
523
524 TP_PROTO(const struct btrfs_fs_info *fs_info, int wait),
525
526 TP_ARGS(fs_info, wait),
527
528 TP_FIELDS(
529 ctf_integer(int, wait, wait)
530 )
531 )
532 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
533 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
534
535 TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
536
537 TP_ARGS(fs_info, wait),
538
539 TP_FIELDS(
540 ctf_integer(int, wait, wait)
541 )
542 )
543 #else
544 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
545
546 TP_PROTO(int wait),
547
548 TP_ARGS(wait),
549
550 TP_FIELDS(
551 ctf_integer(int, wait, wait)
552 )
553 )
554 #endif
555
556 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
557 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
558
559 TP_PROTO(const struct btrfs_fs_info *fs_info,
560 const struct btrfs_block_group_cache *block_group, int create),
561
562 TP_ARGS(fs_info, block_group, create),
563
564 TP_FIELDS(
565 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
566 ctf_integer(u64, offset, block_group->key.objectid)
567 ctf_integer(u64, size, block_group->key.offset)
568 ctf_integer(u64, flags, block_group->flags)
569 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
570 ctf_integer(u64, bytes_super, block_group->bytes_super)
571 ctf_integer(int, create, create)
572 )
573 )
574 #else
575 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
576
577 TP_PROTO(struct btrfs_fs_info *fs_info,
578 struct btrfs_block_group_cache *block_group, int create),
579
580 TP_ARGS(fs_info, block_group, create),
581
582 TP_FIELDS(
583 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
584 ctf_integer(u64, offset, block_group->key.objectid)
585 ctf_integer(u64, size, block_group->key.offset)
586 ctf_integer(u64, flags, block_group->flags)
587 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
588 ctf_integer(u64, bytes_super, block_group->bytes_super)
589 ctf_integer(int, create, create)
590 )
591 )
592 #endif
593
594 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
595 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
596
597 TP_PROTO(const struct btrfs_fs_info *fs_info,
598 const struct btrfs_delayed_ref_node *ref,
599 const struct btrfs_delayed_tree_ref *full_ref,
600 int action),
601
602 TP_ARGS(fs_info, ref, full_ref, action),
603
604 TP_FIELDS(
605 ctf_integer(u64, bytenr, ref->bytenr)
606 ctf_integer(u64, num_bytes, ref->num_bytes)
607 ctf_integer(int, action, action)
608 ctf_integer(u64, parent, full_ref->parent)
609 ctf_integer(u64, ref_root, full_ref->root)
610 ctf_integer(int, level, full_ref->level)
611 ctf_integer(int, type, ref->type)
612 ctf_integer(u64, seq, ref->seq)
613 )
614 )
615 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
616 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
617
618 TP_PROTO(struct btrfs_fs_info *fs_info,
619 struct btrfs_delayed_ref_node *ref,
620 struct btrfs_delayed_tree_ref *full_ref,
621 int action),
622
623 TP_ARGS(fs_info, ref, full_ref, action),
624
625 TP_FIELDS(
626 ctf_integer(u64, bytenr, ref->bytenr)
627 ctf_integer(u64, num_bytes, ref->num_bytes)
628 ctf_integer(int, action, action)
629 ctf_integer(u64, parent, full_ref->parent)
630 ctf_integer(u64, ref_root, full_ref->root)
631 ctf_integer(int, level, full_ref->level)
632 ctf_integer(int, type, ref->type)
633 ctf_integer(u64, seq, ref->seq)
634 )
635 )
636 #else
637 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
638
639 TP_PROTO(struct btrfs_delayed_ref_node *ref,
640 struct btrfs_delayed_tree_ref *full_ref,
641 int action),
642
643 TP_ARGS(ref, full_ref, action),
644
645 TP_FIELDS(
646 ctf_integer(u64, bytenr, ref->bytenr)
647 ctf_integer(u64, num_bytes, ref->num_bytes)
648 ctf_integer(int, action, action)
649 ctf_integer(u64, parent, full_ref->parent)
650 ctf_integer(u64, ref_root, full_ref->root)
651 ctf_integer(int, level, full_ref->level)
652 ctf_integer(int, type, ref->type)
653 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
654 ctf_integer(u64, seq, ref->seq)
655 #endif
656 )
657 )
658 #endif
659
660 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
661
662 TP_PROTO(struct btrfs_delayed_ref_node *ref,
663 struct btrfs_delayed_data_ref *full_ref,
664 int action),
665
666 TP_ARGS(ref, full_ref, action),
667
668 TP_FIELDS(
669 ctf_integer(u64, bytenr, ref->bytenr)
670 ctf_integer(u64, num_bytes, ref->num_bytes)
671 ctf_integer(int, action, action)
672 ctf_integer(u64, parent, full_ref->parent)
673 ctf_integer(u64, ref_root, full_ref->root)
674 ctf_integer(u64, owner, full_ref->objectid)
675 ctf_integer(u64, offset, full_ref->offset)
676 ctf_integer(int, type, ref->type)
677 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
678 ctf_integer(u64, seq, ref->seq)
679 #endif
680 )
681 )
682
683 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
684 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
685
686 TP_PROTO(struct btrfs_fs_info *fs_info,
687 struct btrfs_delayed_ref_node *ref,
688 struct btrfs_delayed_ref_head *head_ref,
689 int action),
690
691 TP_ARGS(fs_info, ref, head_ref, action),
692
693 TP_FIELDS(
694 ctf_integer(u64, bytenr, ref->bytenr)
695 ctf_integer(u64, num_bytes, ref->num_bytes)
696 ctf_integer(int, action, action)
697 ctf_integer(int, is_data, head_ref->is_data)
698 )
699 )
700
701 #else
702 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
703
704 TP_PROTO(struct btrfs_delayed_ref_node *ref,
705 struct btrfs_delayed_ref_head *head_ref,
706 int action),
707
708 TP_ARGS(ref, head_ref, action),
709
710 TP_FIELDS(
711 ctf_integer(u64, bytenr, ref->bytenr)
712 ctf_integer(u64, num_bytes, ref->num_bytes)
713 ctf_integer(int, action, action)
714 ctf_integer(int, is_data, head_ref->is_data)
715 )
716 )
717 #endif
718
719 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
720
721 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
722
723 TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map,
724 u64 offset, u64 size),
725
726 TP_ARGS(fs_info, map, offset, size),
727
728 TP_FIELDS(
729 ctf_integer(int, num_stripes, map->num_stripes)
730 ctf_integer(u64, type, map->type)
731 ctf_integer(int, sub_stripes, map->sub_stripes)
732 ctf_integer(u64, offset, offset)
733 ctf_integer(u64, size, size)
734 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
735 )
736 )
737
738 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
739
740 TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
741 u64 offset, u64 size),
742
743 TP_ARGS(info, map, offset, size)
744 )
745
746 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
747
748 TP_PROTO(const struct btrfs_fs_info *info, const struct map_lookup *map,
749 u64 offset, u64 size),
750
751 TP_ARGS(info, map, offset, size)
752 )
753
754 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
755
756 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
757
758 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
759 u64 offset, u64 size),
760
761 TP_ARGS(fs_info, map, offset, size),
762
763 TP_FIELDS(
764 ctf_integer(int, num_stripes, map->num_stripes)
765 ctf_integer(u64, type, map->type)
766 ctf_integer(int, sub_stripes, map->sub_stripes)
767 ctf_integer(u64, offset, offset)
768 ctf_integer(u64, size, size)
769 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
770 )
771 )
772
773 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
774
775 TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
776 u64 offset, u64 size),
777
778 TP_ARGS(info, map, offset, size)
779 )
780
781 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
782
783 TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
784 u64 offset, u64 size),
785
786 TP_ARGS(info, map, offset, size)
787 )
788
789 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
790
791 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
792
793 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
794 u64 offset, u64 size),
795
796 TP_ARGS(root, map, offset, size),
797
798 TP_FIELDS(
799 ctf_integer(int, num_stripes, map->num_stripes)
800 ctf_integer(u64, type, map->type)
801 ctf_integer(int, sub_stripes, map->sub_stripes)
802 ctf_integer(u64, offset, offset)
803 ctf_integer(u64, size, size)
804 ctf_integer(u64, root_objectid, root->root_key.objectid)
805 )
806 )
807
808 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
809
810 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
811 u64 offset, u64 size),
812
813 TP_ARGS(root, map, offset, size)
814 )
815
816 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
817
818 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
819 u64 offset, u64 size),
820
821 TP_ARGS(root, map, offset, size)
822 )
823
824 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
825
826 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
827 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
828
829 TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf,
830 const struct extent_buffer *cow),
831
832 TP_ARGS(root, buf, cow),
833
834 TP_FIELDS(
835 ctf_integer(u64, root_objectid, root->root_key.objectid)
836 ctf_integer(u64, buf_start, buf->start)
837 ctf_integer(int, refs, atomic_read(&buf->refs))
838 ctf_integer(u64, cow_start, cow->start)
839 ctf_integer(int, buf_level, btrfs_header_level(buf))
840 ctf_integer(int, cow_level, btrfs_header_level(cow))
841 )
842 )
843 #else
844 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
845
846 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
847 struct extent_buffer *cow),
848
849 TP_ARGS(root, buf, cow),
850
851 TP_FIELDS(
852 ctf_integer(u64, root_objectid, root->root_key.objectid)
853 ctf_integer(u64, buf_start, buf->start)
854 ctf_integer(int, refs, atomic_read(&buf->refs))
855 ctf_integer(u64, cow_start, cow->start)
856 ctf_integer(int, buf_level, btrfs_header_level(buf))
857 ctf_integer(int, cow_level, btrfs_header_level(cow))
858 )
859 )
860 #endif
861
862 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
863 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
864
865 TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val,
866 u64 bytes, int reserve),
867
868 TP_ARGS(fs_info, type, val, bytes, reserve),
869
870 TP_FIELDS(
871 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
872 ctf_string(type, type)
873 ctf_integer(u64, val, val)
874 ctf_integer(u64, bytes, bytes)
875 ctf_integer(int, reserve, reserve)
876 )
877 )
878 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
879 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
880
881 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
882 u64 bytes, int reserve),
883
884 TP_ARGS(fs_info, type, val, bytes, reserve),
885
886 TP_FIELDS(
887 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
888 ctf_string(type, type)
889 ctf_integer(u64, val, val)
890 ctf_integer(u64, bytes, bytes)
891 ctf_integer(int, reserve, reserve)
892 )
893 )
894 #endif
895
896 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
897
898 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
899
900 TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
901
902 TP_ARGS(info, start, len),
903
904 TP_FIELDS(
905 ctf_integer(u64, start, start)
906 ctf_integer(u64, len, len)
907 )
908 )
909
910 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
911
912 TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
913
914 TP_ARGS(info, start, len)
915 )
916
917 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
918
919 TP_PROTO(const struct btrfs_fs_info *info, u64 start, u64 len),
920
921 TP_ARGS(info, start, len)
922 )
923
924 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
925
926 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
927
928 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
929
930 TP_ARGS(info, start, len),
931
932 TP_FIELDS(
933 ctf_integer(u64, start, start)
934 ctf_integer(u64, len, len)
935 )
936 )
937
938 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
939
940 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
941
942 TP_ARGS(info, start, len)
943 )
944
945 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
946
947 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
948
949 TP_ARGS(info, start, len)
950 )
951
952 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
953
954 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
955
956 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
957
958 TP_ARGS(root, start, len),
959
960 TP_FIELDS(
961 ctf_integer(u64, root_objectid, root->root_key.objectid)
962 ctf_integer(u64, start, start)
963 ctf_integer(u64, len, len)
964 )
965 )
966
967 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
968
969 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
970
971 TP_ARGS(root, start, len)
972 )
973
974 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
975
976 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
977
978 TP_ARGS(root, start, len)
979 )
980
981 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
982
983 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
984
985 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
986
987 btrfs_find_free_extent,
988
989 TP_PROTO(const struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
990 u64 data),
991
992 TP_ARGS(info, num_bytes, empty_size, data),
993
994 TP_FIELDS(
995 ctf_integer(u64, num_bytes, num_bytes)
996 ctf_integer(u64, empty_size, empty_size)
997 ctf_integer(u64, data, data)
998 )
999 )
1000
1001 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
1002
1003 TP_PROTO(const struct btrfs_fs_info *info,
1004 const struct btrfs_block_group_cache *block_group, u64 start,
1005 u64 len),
1006
1007 TP_ARGS(info, block_group, start, len),
1008
1009 TP_FIELDS(
1010 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1011 ctf_integer(u64, flags, block_group->flags)
1012 ctf_integer(u64, start, start)
1013 ctf_integer(u64, len, len)
1014 )
1015 )
1016
1017 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
1018
1019 TP_PROTO(const struct btrfs_fs_info *info,
1020 const struct btrfs_block_group_cache *block_group, u64 start,
1021 u64 len),
1022
1023 TP_ARGS(info, block_group, start, len)
1024 )
1025
1026 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
1027
1028 TP_PROTO(const struct btrfs_fs_info *info,
1029 const struct btrfs_block_group_cache *block_group, u64 start,
1030 u64 len),
1031
1032 TP_ARGS(info, block_group, start, len)
1033 )
1034
1035 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1036
1037 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1038
1039 btrfs_find_free_extent,
1040
1041 TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
1042 u64 data),
1043
1044 TP_ARGS(info, num_bytes, empty_size, data),
1045
1046 TP_FIELDS(
1047 ctf_integer(u64, num_bytes, num_bytes)
1048 ctf_integer(u64, empty_size, empty_size)
1049 ctf_integer(u64, data, data)
1050 )
1051 )
1052
1053 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
1054
1055 TP_PROTO(struct btrfs_fs_info *info,
1056 struct btrfs_block_group_cache *block_group, u64 start,
1057 u64 len),
1058
1059 TP_ARGS(info, block_group, start, len),
1060
1061 TP_FIELDS(
1062 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1063 ctf_integer(u64, flags, block_group->flags)
1064 ctf_integer(u64, start, start)
1065 ctf_integer(u64, len, len)
1066 )
1067 )
1068
1069 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
1070
1071 TP_PROTO(struct btrfs_fs_info *info,
1072 struct btrfs_block_group_cache *block_group, u64 start,
1073 u64 len),
1074
1075 TP_ARGS(info, block_group, start, len)
1076 )
1077
1078 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
1079
1080 TP_PROTO(struct btrfs_fs_info *info,
1081 struct btrfs_block_group_cache *block_group, u64 start,
1082 u64 len),
1083
1084 TP_ARGS(info, block_group, start, len)
1085 )
1086
1087 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1088
1089 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
1090
1091 btrfs_find_free_extent,
1092
1093 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
1094 u64 data),
1095
1096 TP_ARGS(root, num_bytes, empty_size, data),
1097
1098 TP_FIELDS(
1099 ctf_integer(u64, root_objectid, root->root_key.objectid)
1100 ctf_integer(u64, num_bytes, num_bytes)
1101 ctf_integer(u64, empty_size, empty_size)
1102 ctf_integer(u64, data, data)
1103 )
1104 )
1105
1106 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
1107
1108 TP_PROTO(struct btrfs_root *root,
1109 struct btrfs_block_group_cache *block_group, u64 start,
1110 u64 len),
1111
1112 TP_ARGS(root, block_group, start, len),
1113
1114 TP_FIELDS(
1115 ctf_integer(u64, root_objectid, root->root_key.objectid)
1116 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1117 ctf_integer(u64, flags, block_group->flags)
1118 ctf_integer(u64, start, start)
1119 ctf_integer(u64, len, len)
1120 )
1121 )
1122
1123 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
1124
1125 TP_PROTO(struct btrfs_root *root,
1126 struct btrfs_block_group_cache *block_group, u64 start,
1127 u64 len),
1128
1129 TP_ARGS(root, block_group, start, len)
1130 )
1131
1132 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
1133
1134 TP_PROTO(struct btrfs_root *root,
1135 struct btrfs_block_group_cache *block_group, u64 start,
1136 u64 len),
1137
1138 TP_ARGS(root, block_group, start, len)
1139 )
1140
1141 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1142
1143 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1144 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
1145
1146 TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start,
1147 u64 bytes, u64 empty_size, u64 min_bytes),
1148
1149 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
1150
1151 TP_FIELDS(
1152 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1153 ctf_integer(u64, flags, block_group->flags)
1154 ctf_integer(u64, start, start)
1155 ctf_integer(u64, bytes, bytes)
1156 ctf_integer(u64, empty_size, empty_size)
1157 ctf_integer(u64, min_bytes, min_bytes)
1158 )
1159 )
1160
1161 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
1162
1163 TP_PROTO(const struct btrfs_block_group_cache *block_group),
1164
1165 TP_ARGS(block_group),
1166
1167 TP_FIELDS(
1168 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1169 )
1170 )
1171
1172 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
1173
1174 TP_PROTO(const struct btrfs_block_group_cache *block_group,
1175 const struct btrfs_free_cluster *cluster, u64 size, int bitmap),
1176
1177 TP_ARGS(block_group, cluster, size, bitmap),
1178
1179 TP_FIELDS(
1180 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1181 ctf_integer(u64, flags, block_group->flags)
1182 ctf_integer(u64, start, cluster->window_start)
1183 ctf_integer(u64, max_size, cluster->max_size)
1184 ctf_integer(u64, size, size)
1185 ctf_integer(int, bitmap, bitmap)
1186 )
1187 )
1188 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1189 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
1190
1191 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
1192 u64 bytes, u64 empty_size, u64 min_bytes),
1193
1194 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
1195
1196 TP_FIELDS(
1197 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1198 ctf_integer(u64, flags, block_group->flags)
1199 ctf_integer(u64, start, start)
1200 ctf_integer(u64, bytes, bytes)
1201 ctf_integer(u64, empty_size, empty_size)
1202 ctf_integer(u64, min_bytes, min_bytes)
1203 )
1204 )
1205
1206 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
1207
1208 TP_PROTO(struct btrfs_block_group_cache *block_group),
1209
1210 TP_ARGS(block_group),
1211
1212 TP_FIELDS(
1213 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1214 )
1215 )
1216
1217 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
1218
1219 TP_PROTO(struct btrfs_block_group_cache *block_group,
1220 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
1221
1222 TP_ARGS(block_group, cluster, size, bitmap),
1223
1224 TP_FIELDS(
1225 ctf_integer(u64, bg_objectid, block_group->key.objectid)
1226 ctf_integer(u64, flags, block_group->flags)
1227 ctf_integer(u64, start, cluster->window_start)
1228 ctf_integer(u64, max_size, cluster->max_size)
1229 ctf_integer(u64, size, size)
1230 ctf_integer(int, bitmap, bitmap)
1231 )
1232 )
1233 #endif
1234
1235 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1236 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
1237
1238 btrfs_alloc_extent_state,
1239
1240 TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP),
1241
1242 TP_ARGS(state, mask, IP),
1243
1244 TP_FIELDS(
1245 ctf_integer_hex(const struct extent_state *, state, state)
1246 ctf_integer(gfp_t, mask, mask)
1247 ctf_integer(unsigned long, ip, IP)
1248 )
1249 )
1250
1251 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
1252
1253 btrfs_free_extent_state,
1254
1255 TP_PROTO(const struct extent_state *state, unsigned long IP),
1256
1257 TP_ARGS(state, IP),
1258
1259 TP_FIELDS(
1260 ctf_integer_hex(const struct extent_state *, state, state)
1261 ctf_integer(unsigned long, ip, IP)
1262 )
1263 )
1264 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1265 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
1266
1267 btrfs_alloc_extent_state,
1268
1269 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
1270
1271 TP_ARGS(state, mask, IP),
1272
1273 TP_FIELDS(
1274 ctf_integer_hex(struct extent_state *, state, state)
1275 ctf_integer(gfp_t, mask, mask)
1276 ctf_integer(unsigned long, ip, IP)
1277 )
1278 )
1279
1280 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
1281
1282 btrfs_free_extent_state,
1283
1284 TP_PROTO(struct extent_state *state, unsigned long IP),
1285
1286 TP_ARGS(state, IP),
1287
1288 TP_FIELDS(
1289 ctf_integer_hex(struct extent_state *, state, state)
1290 ctf_integer(unsigned long, ip, IP)
1291 )
1292 )
1293 #endif
1294
1295 #endif /* LTTNG_TRACE_BTRFS_H */
1296
1297 /* This part must be outside protection */
1298 #include <probes/define_trace.h>
This page took 0.059747 seconds and 3 git commands to generate.