Update btrfs instrumentation for 4.10 kernel
[lttng-modules.git] / instrumentation / events / lttng-module / btrfs.h
... / ...
CommitLineData
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_
13struct btrfs_root;
14struct btrfs_fs_info;
15struct btrfs_inode;
16struct extent_map;
17struct btrfs_ordered_extent;
18struct btrfs_delayed_ref_node;
19struct btrfs_delayed_tree_ref;
20struct btrfs_delayed_data_ref;
21struct btrfs_delayed_ref_head;
22#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
23struct btrfs_block_group_cache;
24struct btrfs_free_cluster;
25#endif
26struct map_lookup;
27struct extent_buffer;
28#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
29struct extent_state;
30#endif
31#endif
32
33#define BTRFS_UUID_SIZE 16
34
35LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
36
37 TP_PROTO(struct btrfs_root *root),
38
39 TP_ARGS(root),
40
41 TP_FIELDS(
42 ctf_integer(u64, generation, root->fs_info->generation)
43 ctf_integer(u64, root_objectid, root->root_key.objectid)
44 )
45)
46
47LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
48
49 TP_PROTO(struct inode *inode),
50
51 TP_ARGS(inode),
52
53 TP_FIELDS(
54 ctf_integer(ino_t, ino, inode->i_ino)
55 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
56 ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size)
57 ctf_integer(u64, generation, BTRFS_I(inode)->generation)
58 ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans)
59 ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans)
60 ctf_integer(u64, root_objectid,
61 BTRFS_I(inode)->root->root_key.objectid)
62 )
63)
64
65LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
66
67 TP_PROTO(struct inode *inode),
68
69 TP_ARGS(inode)
70)
71
72LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
73
74 TP_PROTO(struct inode *inode),
75
76 TP_ARGS(inode)
77)
78
79LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
80
81 TP_PROTO(struct inode *inode),
82
83 TP_ARGS(inode)
84)
85
86LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
87
88 TP_PROTO(struct btrfs_root *root, struct inode *inode,
89 struct extent_map *map),
90
91 TP_ARGS(root, inode, map),
92
93 TP_FIELDS(
94 ctf_integer(u64, root_objectid, root->root_key.objectid)
95 ctf_integer(u64, ino, btrfs_ino(inode))
96 ctf_integer(u64, start, map->start)
97 ctf_integer(u64, len, map->len)
98 ctf_integer(u64, orig_start, map->orig_start)
99 ctf_integer(u64, block_start, map->block_start)
100 ctf_integer(u64, block_len, map->block_len)
101 ctf_integer(unsigned long, flags, map->flags)
102 ctf_integer(int, refs, atomic_read(&map->refs))
103 ctf_integer(unsigned int, compress_type, map->compress_type)
104 )
105)
106
107LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
108
109 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
110
111 TP_ARGS(inode, ordered),
112
113 TP_FIELDS(
114 ctf_integer(ino_t, ino, inode->i_ino)
115 ctf_integer(u64, file_offset, ordered->file_offset)
116 ctf_integer(u64, start, ordered->start)
117 ctf_integer(u64, len, ordered->len)
118 ctf_integer(u64, disk_len, ordered->disk_len)
119 ctf_integer(u64, bytes_left, ordered->bytes_left)
120 ctf_integer(unsigned long, flags, ordered->flags)
121 ctf_integer(int, compress_type, ordered->compress_type)
122 ctf_integer(int, refs, atomic_read(&ordered->refs))
123 ctf_integer(u64, root_objectid,
124 BTRFS_I(inode)->root->root_key.objectid)
125 )
126)
127
128LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
129
130 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
131
132 TP_ARGS(inode, ordered)
133)
134
135LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
136
137 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
138
139 TP_ARGS(inode, ordered)
140)
141
142LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
143
144 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
145
146 TP_ARGS(inode, ordered)
147)
148
149LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
150
151 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
152
153 TP_ARGS(inode, ordered)
154)
155
156LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
157
158 TP_PROTO(struct page *page, struct inode *inode,
159 struct writeback_control *wbc),
160
161 TP_ARGS(page, inode, wbc),
162
163 TP_FIELDS(
164 ctf_integer(ino_t, ino, inode->i_ino)
165 ctf_integer(pgoff_t, index, page->index)
166 ctf_integer(long, nr_to_write, wbc->nr_to_write)
167 ctf_integer(long, pages_skipped, wbc->pages_skipped)
168 ctf_integer(loff_t, range_start, wbc->range_start)
169 ctf_integer(loff_t, range_end, wbc->range_end)
170#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
171 ctf_integer(char, nonblocking, wbc->nonblocking)
172#endif
173 ctf_integer(char, for_kupdate, wbc->for_kupdate)
174 ctf_integer(char, for_reclaim, wbc->for_reclaim)
175 ctf_integer(char, range_cyclic, wbc->range_cyclic)
176 ctf_integer(pgoff_t, writeback_index,
177 inode->i_mapping->writeback_index)
178 ctf_integer(u64, root_objectid,
179 BTRFS_I(inode)->root->root_key.objectid)
180 )
181)
182
183LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
184
185 __extent_writepage,
186
187 btrfs__extent_writepage,
188
189 TP_PROTO(struct page *page, struct inode *inode,
190 struct writeback_control *wbc),
191
192 TP_ARGS(page, inode, wbc)
193)
194
195LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
196
197 TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
198
199 TP_ARGS(page, start, end, uptodate),
200
201 TP_FIELDS(
202 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
203 ctf_integer(pgoff_t, index, page->index)
204 ctf_integer(u64, start, start)
205 ctf_integer(u64, end, end)
206 ctf_integer(int, uptodate, uptodate)
207 ctf_integer(u64, root_objectid,
208 BTRFS_I(page->mapping->host)->root->root_key.objectid)
209 )
210)
211
212LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
213
214 TP_PROTO(struct file *file, int datasync),
215
216 TP_ARGS(file, datasync),
217
218 TP_FIELDS(
219 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
220 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
221 ctf_integer(int, datasync, datasync)
222 ctf_integer(u64, root_objectid,
223 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
224 )
225)
226
227#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
228LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
229
230 TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
231
232 TP_ARGS(fs_info, wait),
233
234 TP_FIELDS(
235 ctf_integer(int, wait, wait)
236 )
237)
238#else
239LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
240
241 TP_PROTO(int wait),
242
243 TP_ARGS(wait),
244
245 TP_FIELDS(
246 ctf_integer(int, wait, wait)
247 )
248)
249#endif
250
251LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
252
253 TP_PROTO(struct btrfs_fs_info *fs_info,
254 struct btrfs_block_group_cache *block_group, int create),
255
256 TP_ARGS(fs_info, block_group, create),
257
258 TP_FIELDS(
259 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
260 ctf_integer(u64, offset, block_group->key.objectid)
261 ctf_integer(u64, size, block_group->key.offset)
262 ctf_integer(u64, flags, block_group->flags)
263 ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item))
264 ctf_integer(u64, bytes_super, block_group->bytes_super)
265 ctf_integer(int, create, create)
266 )
267)
268
269#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
270LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
271
272 TP_PROTO(struct btrfs_fs_info *fs_info,
273 struct btrfs_delayed_ref_node *ref,
274 struct btrfs_delayed_tree_ref *full_ref,
275 int action),
276
277 TP_ARGS(fs_info, ref, full_ref, action),
278
279 TP_FIELDS(
280 ctf_integer(u64, bytenr, ref->bytenr)
281 ctf_integer(u64, num_bytes, ref->num_bytes)
282 ctf_integer(int, action, action)
283 ctf_integer(u64, parent, full_ref->parent)
284 ctf_integer(u64, ref_root, full_ref->root)
285 ctf_integer(int, level, full_ref->level)
286 ctf_integer(int, type, ref->type)
287 ctf_integer(u64, seq, ref->seq)
288 )
289)
290#else
291LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
292
293 TP_PROTO(struct btrfs_delayed_ref_node *ref,
294 struct btrfs_delayed_tree_ref *full_ref,
295 int action),
296
297 TP_ARGS(ref, full_ref, action),
298
299 TP_FIELDS(
300 ctf_integer(u64, bytenr, ref->bytenr)
301 ctf_integer(u64, num_bytes, ref->num_bytes)
302 ctf_integer(int, action, action)
303 ctf_integer(u64, parent, full_ref->parent)
304 ctf_integer(u64, ref_root, full_ref->root)
305 ctf_integer(int, level, full_ref->level)
306 ctf_integer(int, type, ref->type)
307#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
308 ctf_integer(u64, seq, ref->seq)
309#endif
310 )
311)
312#endif
313
314LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
315
316 TP_PROTO(struct btrfs_delayed_ref_node *ref,
317 struct btrfs_delayed_data_ref *full_ref,
318 int action),
319
320 TP_ARGS(ref, full_ref, action),
321
322 TP_FIELDS(
323 ctf_integer(u64, bytenr, ref->bytenr)
324 ctf_integer(u64, num_bytes, ref->num_bytes)
325 ctf_integer(int, action, action)
326 ctf_integer(u64, parent, full_ref->parent)
327 ctf_integer(u64, ref_root, full_ref->root)
328 ctf_integer(u64, owner, full_ref->objectid)
329 ctf_integer(u64, offset, full_ref->offset)
330 ctf_integer(int, type, ref->type)
331#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
332 ctf_integer(u64, seq, ref->seq)
333#endif
334 )
335)
336
337#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
338LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
339
340 TP_PROTO(struct btrfs_fs_info *fs_info,
341 struct btrfs_delayed_ref_node *ref,
342 struct btrfs_delayed_ref_head *head_ref,
343 int action),
344
345 TP_ARGS(fs_info, ref, head_ref, action),
346
347 TP_FIELDS(
348 ctf_integer(u64, bytenr, ref->bytenr)
349 ctf_integer(u64, num_bytes, ref->num_bytes)
350 ctf_integer(int, action, action)
351 ctf_integer(int, is_data, head_ref->is_data)
352 )
353)
354
355#else
356LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
357
358 TP_PROTO(struct btrfs_delayed_ref_node *ref,
359 struct btrfs_delayed_ref_head *head_ref,
360 int action),
361
362 TP_ARGS(ref, head_ref, action),
363
364 TP_FIELDS(
365 ctf_integer(u64, bytenr, ref->bytenr)
366 ctf_integer(u64, num_bytes, ref->num_bytes)
367 ctf_integer(int, action, action)
368 ctf_integer(int, is_data, head_ref->is_data)
369 )
370)
371#endif
372
373#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
374
375LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
376
377 TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map,
378 u64 offset, u64 size),
379
380 TP_ARGS(fs_info, map, offset, size),
381
382 TP_FIELDS(
383 ctf_integer(int, num_stripes, map->num_stripes)
384 ctf_integer(u64, type, map->type)
385 ctf_integer(int, sub_stripes, map->sub_stripes)
386 ctf_integer(u64, offset, offset)
387 ctf_integer(u64, size, size)
388 ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid)
389 )
390)
391
392LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
393
394 TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
395 u64 offset, u64 size),
396
397 TP_ARGS(info, map, offset, size)
398)
399
400LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
401
402 TP_PROTO(struct btrfs_fs_info *info, struct map_lookup *map,
403 u64 offset, u64 size),
404
405 TP_ARGS(info, map, offset, size)
406)
407
408#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
409
410LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
411
412 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
413 u64 offset, u64 size),
414
415 TP_ARGS(root, map, offset, size),
416
417 TP_FIELDS(
418 ctf_integer(int, num_stripes, map->num_stripes)
419 ctf_integer(u64, type, map->type)
420 ctf_integer(int, sub_stripes, map->sub_stripes)
421 ctf_integer(u64, offset, offset)
422 ctf_integer(u64, size, size)
423 ctf_integer(u64, root_objectid, root->root_key.objectid)
424 )
425)
426
427LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc,
428
429 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
430 u64 offset, u64 size),
431
432 TP_ARGS(root, map, offset, size)
433)
434
435LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free,
436
437 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
438 u64 offset, u64 size),
439
440 TP_ARGS(root, map, offset, size)
441)
442
443#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
444
445LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
446
447 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
448 struct extent_buffer *cow),
449
450 TP_ARGS(root, buf, cow),
451
452 TP_FIELDS(
453 ctf_integer(u64, root_objectid, root->root_key.objectid)
454 ctf_integer(u64, buf_start, buf->start)
455 ctf_integer(int, refs, atomic_read(&buf->refs))
456 ctf_integer(u64, cow_start, cow->start)
457 ctf_integer(int, buf_level, btrfs_header_level(buf))
458 ctf_integer(int, cow_level, btrfs_header_level(cow))
459 )
460)
461
462#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
463LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
464
465 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
466 u64 bytes, int reserve),
467
468 TP_ARGS(fs_info, type, val, bytes, reserve),
469
470 TP_FIELDS(
471 ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE)
472 ctf_string(type, type)
473 ctf_integer(u64, val, val)
474 ctf_integer(u64, bytes, bytes)
475 ctf_integer(int, reserve, reserve)
476 )
477)
478#endif
479
480#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
481
482LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
483
484 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
485
486 TP_ARGS(info, start, len),
487
488 TP_FIELDS(
489 ctf_integer(u64, start, start)
490 ctf_integer(u64, len, len)
491 )
492)
493
494LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
495
496 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
497
498 TP_ARGS(info, start, len)
499)
500
501LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
502
503 TP_PROTO(struct btrfs_fs_info *info, u64 start, u64 len),
504
505 TP_ARGS(info, start, len)
506)
507
508#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
509
510LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
511
512 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
513
514 TP_ARGS(root, start, len),
515
516 TP_FIELDS(
517 ctf_integer(u64, root_objectid, root->root_key.objectid)
518 ctf_integer(u64, start, start)
519 ctf_integer(u64, len, len)
520 )
521)
522
523LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
524
525 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
526
527 TP_ARGS(root, start, len)
528)
529
530LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
531
532 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
533
534 TP_ARGS(root, start, len)
535)
536
537#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
538
539#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
540
541#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
542
543LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
544
545 btrfs_find_free_extent,
546
547 TP_PROTO(struct btrfs_fs_info *info, u64 num_bytes, u64 empty_size,
548 u64 data),
549
550 TP_ARGS(info, num_bytes, empty_size, data),
551
552 TP_FIELDS(
553 ctf_integer(u64, num_bytes, num_bytes)
554 ctf_integer(u64, empty_size, empty_size)
555 ctf_integer(u64, data, data)
556 )
557)
558
559LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
560
561 TP_PROTO(struct btrfs_fs_info *info,
562 struct btrfs_block_group_cache *block_group, u64 start,
563 u64 len),
564
565 TP_ARGS(info, block_group, start, len),
566
567 TP_FIELDS(
568 ctf_integer(u64, bg_objectid, block_group->key.objectid)
569 ctf_integer(u64, flags, block_group->flags)
570 ctf_integer(u64, start, start)
571 ctf_integer(u64, len, len)
572 )
573)
574
575LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
576
577 TP_PROTO(struct btrfs_fs_info *info,
578 struct btrfs_block_group_cache *block_group, u64 start,
579 u64 len),
580
581 TP_ARGS(info, block_group, start, len)
582)
583
584LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
585
586 TP_PROTO(struct btrfs_fs_info *info,
587 struct btrfs_block_group_cache *block_group, u64 start,
588 u64 len),
589
590 TP_ARGS(info, block_group, start, len)
591)
592
593#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
594
595LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
596
597 btrfs_find_free_extent,
598
599 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
600 u64 data),
601
602 TP_ARGS(root, num_bytes, empty_size, data),
603
604 TP_FIELDS(
605 ctf_integer(u64, root_objectid, root->root_key.objectid)
606 ctf_integer(u64, num_bytes, num_bytes)
607 ctf_integer(u64, empty_size, empty_size)
608 ctf_integer(u64, data, data)
609 )
610)
611
612LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
613
614 TP_PROTO(struct btrfs_root *root,
615 struct btrfs_block_group_cache *block_group, u64 start,
616 u64 len),
617
618 TP_ARGS(root, block_group, start, len),
619
620 TP_FIELDS(
621 ctf_integer(u64, root_objectid, root->root_key.objectid)
622 ctf_integer(u64, bg_objectid, block_group->key.objectid)
623 ctf_integer(u64, flags, block_group->flags)
624 ctf_integer(u64, start, start)
625 ctf_integer(u64, len, len)
626 )
627)
628
629LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
630
631 TP_PROTO(struct btrfs_root *root,
632 struct btrfs_block_group_cache *block_group, u64 start,
633 u64 len),
634
635 TP_ARGS(root, block_group, start, len)
636)
637
638LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
639
640 TP_PROTO(struct btrfs_root *root,
641 struct btrfs_block_group_cache *block_group, u64 start,
642 u64 len),
643
644 TP_ARGS(root, block_group, start, len)
645)
646
647#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
648
649LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
650
651 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
652 u64 bytes, u64 empty_size, u64 min_bytes),
653
654 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
655
656 TP_FIELDS(
657 ctf_integer(u64, bg_objectid, block_group->key.objectid)
658 ctf_integer(u64, flags, block_group->flags)
659 ctf_integer(u64, start, start)
660 ctf_integer(u64, bytes, bytes)
661 ctf_integer(u64, empty_size, empty_size)
662 ctf_integer(u64, min_bytes, min_bytes)
663 )
664)
665
666LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
667
668 TP_PROTO(struct btrfs_block_group_cache *block_group),
669
670 TP_ARGS(block_group),
671
672 TP_FIELDS(
673 ctf_integer(u64, bg_objectid, block_group->key.objectid)
674 )
675)
676
677LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
678
679 TP_PROTO(struct btrfs_block_group_cache *block_group,
680 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
681
682 TP_ARGS(block_group, cluster, size, bitmap),
683
684 TP_FIELDS(
685 ctf_integer(u64, bg_objectid, block_group->key.objectid)
686 ctf_integer(u64, flags, block_group->flags)
687 ctf_integer(u64, start, cluster->window_start)
688 ctf_integer(u64, max_size, cluster->max_size)
689 ctf_integer(u64, size, size)
690 ctf_integer(int, bitmap, bitmap)
691 )
692)
693#endif
694
695#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
696LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
697
698 btrfs_alloc_extent_state,
699
700 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
701
702 TP_ARGS(state, mask, IP),
703
704 TP_FIELDS(
705 ctf_integer_hex(struct extent_state *, state, state)
706 ctf_integer(gfp_t, mask, mask)
707 ctf_integer(unsigned long, ip, IP)
708 )
709)
710
711LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
712
713 btrfs_free_extent_state,
714
715 TP_PROTO(struct extent_state *state, unsigned long IP),
716
717 TP_ARGS(state, IP),
718
719 TP_FIELDS(
720 ctf_integer_hex(struct extent_state *, state, state)
721 ctf_integer(unsigned long, ip, IP)
722 )
723)
724#endif
725
726#endif /* LTTNG_TRACE_BTRFS_H */
727
728/* This part must be outside protection */
729#include <probes/define_trace.h>
This page took 0.024374 seconds and 4 git commands to generate.