Commit | Line | Data |
---|---|---|
b87700e3 AG |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM btrfs | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_BTRFS_H | |
b87700e3 | 6 | |
6ec43db8 | 7 | #include <probes/lttng-tracepoint-event.h> |
b87700e3 | 8 | #include <linux/writeback.h> |
b87700e3 AG |
9 | #include <trace/events/gfpflags.h> |
10 | #include <linux/version.h> | |
11 | ||
12 | #ifndef _TRACE_BTRFS_DEF_ | |
13 | #define _TRACE_BTRFS_DEF_ | |
14 | struct btrfs_root; | |
15 | struct btrfs_fs_info; | |
16 | struct btrfs_inode; | |
17 | struct extent_map; | |
18 | struct btrfs_ordered_extent; | |
19 | struct btrfs_delayed_ref_node; | |
20 | struct btrfs_delayed_tree_ref; | |
21 | struct btrfs_delayed_data_ref; | |
22 | struct btrfs_delayed_ref_head; | |
23 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
24 | struct btrfs_block_group_cache; | |
25 | struct btrfs_free_cluster; | |
26 | #endif | |
27 | struct map_lookup; | |
28 | struct extent_buffer; | |
29 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) | |
30 | struct extent_state; | |
31 | #endif | |
32 | #endif | |
33 | ||
b87700e3 AG |
34 | #define BTRFS_UUID_SIZE 16 |
35 | ||
3bc29f0a | 36 | LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit, |
b87700e3 AG |
37 | |
38 | TP_PROTO(struct btrfs_root *root), | |
39 | ||
40 | TP_ARGS(root), | |
41 | ||
f127e61e MD |
42 | TP_FIELDS( |
43 | ctf_integer(u64, generation, root->fs_info->generation) | |
44 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
45 | ) | |
b87700e3 AG |
46 | ) |
47 | ||
3bc29f0a | 48 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode, |
b87700e3 AG |
49 | |
50 | TP_PROTO(struct inode *inode), | |
51 | ||
52 | TP_ARGS(inode), | |
53 | ||
f127e61e MD |
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, | |
b87700e3 | 62 | BTRFS_I(inode)->root->root_key.objectid) |
f127e61e | 63 | ) |
b87700e3 AG |
64 | ) |
65 | ||
3bc29f0a | 66 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new, |
b87700e3 AG |
67 | |
68 | TP_PROTO(struct inode *inode), | |
69 | ||
70 | TP_ARGS(inode) | |
71 | ) | |
72 | ||
3bc29f0a | 73 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request, |
b87700e3 AG |
74 | |
75 | TP_PROTO(struct inode *inode), | |
76 | ||
77 | TP_ARGS(inode) | |
78 | ) | |
79 | ||
3bc29f0a | 80 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict, |
b87700e3 AG |
81 | |
82 | TP_PROTO(struct inode *inode), | |
83 | ||
84 | TP_ARGS(inode) | |
85 | ) | |
86 | ||
3bc29f0a | 87 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, |
b87700e3 AG |
88 | |
89 | TP_PROTO(struct btrfs_root *root, struct extent_map *map), | |
90 | ||
91 | TP_ARGS(root, map), | |
92 | ||
f127e61e MD |
93 | TP_FIELDS( |
94 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
95 | ctf_integer(u64, start, map->start) | |
96 | ctf_integer(u64, len, map->len) | |
97 | ctf_integer(u64, orig_start, map->orig_start) | |
98 | ctf_integer(u64, block_start, map->block_start) | |
99 | ctf_integer(u64, block_len, map->block_len) | |
100 | ctf_integer(unsigned long, flags, map->flags) | |
101 | ctf_integer(int, refs, atomic_read(&map->refs)) | |
102 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
103 | ) | |
b87700e3 AG |
104 | ) |
105 | ||
3bc29f0a | 106 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
b87700e3 AG |
107 | |
108 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
109 | ||
110 | TP_ARGS(inode, ordered), | |
111 | ||
f127e61e MD |
112 | TP_FIELDS( |
113 | ctf_integer(ino_t, ino, inode->i_ino) | |
114 | ctf_integer(u64, file_offset, ordered->file_offset) | |
115 | ctf_integer(u64, start, ordered->start) | |
116 | ctf_integer(u64, len, ordered->len) | |
117 | ctf_integer(u64, disk_len, ordered->disk_len) | |
118 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
119 | ctf_integer(unsigned long, flags, ordered->flags) | |
120 | ctf_integer(int, compress_type, ordered->compress_type) | |
121 | ctf_integer(int, refs, atomic_read(&ordered->refs)) | |
122 | ctf_integer(u64, root_objectid, | |
b87700e3 | 123 | BTRFS_I(inode)->root->root_key.objectid) |
f127e61e | 124 | ) |
b87700e3 AG |
125 | ) |
126 | ||
3bc29f0a | 127 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add, |
b87700e3 AG |
128 | |
129 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
130 | ||
131 | TP_ARGS(inode, ordered) | |
132 | ) | |
133 | ||
3bc29f0a | 134 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove, |
b87700e3 AG |
135 | |
136 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
137 | ||
138 | TP_ARGS(inode, ordered) | |
139 | ) | |
140 | ||
3bc29f0a | 141 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start, |
b87700e3 AG |
142 | |
143 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
144 | ||
145 | TP_ARGS(inode, ordered) | |
146 | ) | |
147 | ||
3bc29f0a | 148 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put, |
b87700e3 AG |
149 | |
150 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
151 | ||
152 | TP_ARGS(inode, ordered) | |
153 | ) | |
154 | ||
3bc29f0a | 155 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage, |
b87700e3 AG |
156 | |
157 | TP_PROTO(struct page *page, struct inode *inode, | |
158 | struct writeback_control *wbc), | |
159 | ||
160 | TP_ARGS(page, inode, wbc), | |
161 | ||
f127e61e MD |
162 | TP_FIELDS( |
163 | ctf_integer(ino_t, ino, inode->i_ino) | |
164 | ctf_integer(pgoff_t, index, page->index) | |
165 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
166 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
167 | ctf_integer(loff_t, range_start, wbc->range_start) | |
168 | ctf_integer(loff_t, range_end, wbc->range_end) | |
b87700e3 | 169 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) |
f127e61e | 170 | ctf_integer(char, nonblocking, wbc->nonblocking) |
b87700e3 | 171 | #endif |
f127e61e MD |
172 | ctf_integer(char, for_kupdate, wbc->for_kupdate) |
173 | ctf_integer(char, for_reclaim, wbc->for_reclaim) | |
174 | ctf_integer(char, range_cyclic, wbc->range_cyclic) | |
175 | ctf_integer(pgoff_t, writeback_index, | |
176 | inode->i_mapping->writeback_index) | |
177 | ctf_integer(u64, root_objectid, | |
178 | BTRFS_I(inode)->root->root_key.objectid) | |
179 | ) | |
b87700e3 AG |
180 | ) |
181 | ||
9bbf98da MD |
182 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage, |
183 | ||
184 | __extent_writepage, | |
185 | ||
186 | btrfs__extent_writepage, | |
b87700e3 AG |
187 | |
188 | TP_PROTO(struct page *page, struct inode *inode, | |
189 | struct writeback_control *wbc), | |
190 | ||
191 | TP_ARGS(page, inode, wbc) | |
192 | ) | |
193 | ||
3bc29f0a | 194 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, |
b87700e3 AG |
195 | |
196 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | |
197 | ||
198 | TP_ARGS(page, start, end, uptodate), | |
199 | ||
f127e61e MD |
200 | TP_FIELDS( |
201 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
202 | ctf_integer(pgoff_t, index, page->index) | |
203 | ctf_integer(u64, start, start) | |
204 | ctf_integer(u64, end, end) | |
205 | ctf_integer(int, uptodate, uptodate) | |
206 | ctf_integer(u64, root_objectid, | |
207 | BTRFS_I(page->mapping->host)->root->root_key.objectid) | |
208 | ) | |
b87700e3 AG |
209 | ) |
210 | ||
3bc29f0a | 211 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, |
b87700e3 AG |
212 | |
213 | TP_PROTO(struct file *file, int datasync), | |
214 | ||
215 | TP_ARGS(file, datasync), | |
216 | ||
f127e61e MD |
217 | TP_FIELDS( |
218 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
219 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
220 | ctf_integer(int, datasync, datasync) | |
221 | ctf_integer(u64, root_objectid, | |
b87700e3 | 222 | BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid) |
f127e61e | 223 | ) |
b87700e3 AG |
224 | ) |
225 | ||
3bc29f0a | 226 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
b87700e3 AG |
227 | |
228 | TP_PROTO(int wait), | |
229 | ||
230 | TP_ARGS(wait), | |
231 | ||
f127e61e MD |
232 | TP_FIELDS( |
233 | ctf_integer(int, wait, wait) | |
234 | ) | |
b87700e3 AG |
235 | ) |
236 | ||
3bc29f0a | 237 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, |
b87700e3 AG |
238 | |
239 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
240 | struct btrfs_delayed_tree_ref *full_ref, | |
241 | int action), | |
242 | ||
243 | TP_ARGS(ref, full_ref, action), | |
244 | ||
f127e61e MD |
245 | TP_FIELDS( |
246 | ctf_integer(u64, bytenr, ref->bytenr) | |
247 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
248 | ctf_integer(int, action, action) | |
249 | ctf_integer(u64, parent, full_ref->parent) | |
250 | ctf_integer(u64, ref_root, full_ref->root) | |
251 | ctf_integer(int, level, full_ref->level) | |
252 | ctf_integer(int, type, ref->type) | |
b87700e3 | 253 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) |
f127e61e | 254 | ctf_integer(u64, seq, ref->seq) |
b87700e3 | 255 | #endif |
f127e61e | 256 | ) |
b87700e3 AG |
257 | ) |
258 | ||
3bc29f0a | 259 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, |
b87700e3 AG |
260 | |
261 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
262 | struct btrfs_delayed_data_ref *full_ref, | |
263 | int action), | |
264 | ||
265 | TP_ARGS(ref, full_ref, action), | |
266 | ||
f127e61e MD |
267 | TP_FIELDS( |
268 | ctf_integer(u64, bytenr, ref->bytenr) | |
269 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
270 | ctf_integer(int, action, action) | |
271 | ctf_integer(u64, parent, full_ref->parent) | |
272 | ctf_integer(u64, ref_root, full_ref->root) | |
273 | ctf_integer(u64, owner, full_ref->objectid) | |
274 | ctf_integer(u64, offset, full_ref->offset) | |
275 | ctf_integer(int, type, ref->type) | |
b87700e3 | 276 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) |
f127e61e | 277 | ctf_integer(u64, seq, ref->seq) |
b87700e3 | 278 | #endif |
f127e61e | 279 | ) |
b87700e3 AG |
280 | ) |
281 | ||
3bc29f0a | 282 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, |
b87700e3 AG |
283 | |
284 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
285 | struct btrfs_delayed_ref_head *head_ref, | |
286 | int action), | |
287 | ||
288 | TP_ARGS(ref, head_ref, action), | |
289 | ||
f127e61e MD |
290 | TP_FIELDS( |
291 | ctf_integer(u64, bytenr, ref->bytenr) | |
292 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
293 | ctf_integer(int, action, action) | |
294 | ctf_integer(int, is_data, head_ref->is_data) | |
295 | ) | |
b87700e3 AG |
296 | ) |
297 | ||
3bc29f0a | 298 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, |
b87700e3 AG |
299 | |
300 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
301 | u64 offset, u64 size), | |
302 | ||
303 | TP_ARGS(root, map, offset, size), | |
304 | ||
f127e61e MD |
305 | TP_FIELDS( |
306 | ctf_integer(int, num_stripes, map->num_stripes) | |
307 | ctf_integer(u64, type, map->type) | |
308 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
309 | ctf_integer(u64, offset, offset) | |
310 | ctf_integer(u64, size, size) | |
311 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
312 | ) | |
b87700e3 AG |
313 | ) |
314 | ||
3bc29f0a | 315 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, |
b87700e3 AG |
316 | |
317 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
318 | u64 offset, u64 size), | |
319 | ||
320 | TP_ARGS(root, map, offset, size) | |
321 | ) | |
322 | ||
3bc29f0a | 323 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, |
b87700e3 AG |
324 | |
325 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
326 | u64 offset, u64 size), | |
327 | ||
328 | TP_ARGS(root, map, offset, size) | |
329 | ) | |
330 | ||
3bc29f0a | 331 | LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, |
b87700e3 AG |
332 | |
333 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | |
334 | struct extent_buffer *cow), | |
335 | ||
336 | TP_ARGS(root, buf, cow), | |
337 | ||
f127e61e MD |
338 | TP_FIELDS( |
339 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
340 | ctf_integer(u64, buf_start, buf->start) | |
341 | ctf_integer(int, refs, atomic_read(&buf->refs)) | |
342 | ctf_integer(u64, cow_start, cow->start) | |
343 | ctf_integer(int, buf_level, btrfs_header_level(buf)) | |
344 | ctf_integer(int, cow_level, btrfs_header_level(cow)) | |
345 | ) | |
b87700e3 AG |
346 | ) |
347 | ||
348 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
3bc29f0a | 349 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
b87700e3 AG |
350 | |
351 | TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val, | |
352 | u64 bytes, int reserve), | |
353 | ||
354 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
355 | ||
f127e61e MD |
356 | TP_FIELDS( |
357 | ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) | |
358 | ctf_string(type, type) | |
359 | ctf_integer(u64, val, val) | |
360 | ctf_integer(u64, bytes, bytes) | |
361 | ctf_integer(int, reserve, reserve) | |
362 | ) | |
b87700e3 AG |
363 | ) |
364 | #endif | |
365 | ||
3bc29f0a | 366 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, |
b87700e3 AG |
367 | |
368 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
369 | ||
370 | TP_ARGS(root, start, len), | |
371 | ||
f127e61e MD |
372 | TP_FIELDS( |
373 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
374 | ctf_integer(u64, start, start) | |
375 | ctf_integer(u64, len, len) | |
376 | ) | |
b87700e3 AG |
377 | ) |
378 | ||
3bc29f0a | 379 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, |
b87700e3 AG |
380 | |
381 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
382 | ||
383 | TP_ARGS(root, start, len) | |
384 | ) | |
385 | ||
3bc29f0a | 386 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, |
b87700e3 AG |
387 | |
388 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
389 | ||
390 | TP_ARGS(root, start, len) | |
391 | ) | |
392 | ||
393 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
3bc29f0a | 394 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, |
9cf29d3e MD |
395 | |
396 | btrfs_find_free_extent, | |
b87700e3 AG |
397 | |
398 | TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
399 | u64 data), | |
400 | ||
401 | TP_ARGS(root, num_bytes, empty_size, data), | |
402 | ||
f127e61e MD |
403 | TP_FIELDS( |
404 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
405 | ctf_integer(u64, num_bytes, num_bytes) | |
406 | ctf_integer(u64, empty_size, empty_size) | |
407 | ctf_integer(u64, data, data) | |
408 | ) | |
b87700e3 AG |
409 | ) |
410 | ||
3bc29f0a | 411 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
b87700e3 AG |
412 | |
413 | TP_PROTO(struct btrfs_root *root, | |
414 | struct btrfs_block_group_cache *block_group, u64 start, | |
415 | u64 len), | |
416 | ||
417 | TP_ARGS(root, block_group, start, len), | |
418 | ||
f127e61e MD |
419 | TP_FIELDS( |
420 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
421 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
422 | ctf_integer(u64, flags, block_group->flags) | |
423 | ctf_integer(u64, start, start) | |
424 | ctf_integer(u64, len, len) | |
425 | ) | |
b87700e3 AG |
426 | ) |
427 | ||
3bc29f0a | 428 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, |
b87700e3 AG |
429 | |
430 | TP_PROTO(struct btrfs_root *root, | |
431 | struct btrfs_block_group_cache *block_group, u64 start, | |
432 | u64 len), | |
433 | ||
434 | TP_ARGS(root, block_group, start, len) | |
435 | ) | |
436 | ||
3bc29f0a | 437 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, |
b87700e3 AG |
438 | |
439 | TP_PROTO(struct btrfs_root *root, | |
440 | struct btrfs_block_group_cache *block_group, u64 start, | |
441 | u64 len), | |
442 | ||
443 | TP_ARGS(root, block_group, start, len) | |
444 | ) | |
445 | ||
3bc29f0a | 446 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
b87700e3 AG |
447 | |
448 | TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start, | |
449 | u64 bytes, u64 empty_size, u64 min_bytes), | |
450 | ||
451 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
452 | ||
f127e61e MD |
453 | TP_FIELDS( |
454 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
455 | ctf_integer(u64, flags, block_group->flags) | |
456 | ctf_integer(u64, start, start) | |
457 | ctf_integer(u64, bytes, bytes) | |
458 | ctf_integer(u64, empty_size, empty_size) | |
459 | ctf_integer(u64, min_bytes, min_bytes) | |
460 | ) | |
b87700e3 AG |
461 | ) |
462 | ||
3bc29f0a | 463 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, |
b87700e3 AG |
464 | |
465 | TP_PROTO(struct btrfs_block_group_cache *block_group), | |
466 | ||
467 | TP_ARGS(block_group), | |
468 | ||
f127e61e MD |
469 | TP_FIELDS( |
470 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
471 | ) | |
b87700e3 AG |
472 | ) |
473 | ||
3bc29f0a | 474 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, |
b87700e3 AG |
475 | |
476 | TP_PROTO(struct btrfs_block_group_cache *block_group, | |
477 | struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
478 | ||
479 | TP_ARGS(block_group, cluster, size, bitmap), | |
480 | ||
f127e61e MD |
481 | TP_FIELDS( |
482 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
483 | ctf_integer(u64, flags, block_group->flags) | |
484 | ctf_integer(u64, start, cluster->window_start) | |
485 | ctf_integer(u64, max_size, cluster->max_size) | |
486 | ctf_integer(u64, size, size) | |
487 | ctf_integer(int, bitmap, bitmap) | |
488 | ) | |
b87700e3 AG |
489 | ) |
490 | #endif | |
491 | ||
492 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) | |
3bc29f0a | 493 | LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, |
9cf29d3e MD |
494 | |
495 | btrfs_alloc_extent_state, | |
b87700e3 AG |
496 | |
497 | TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP), | |
498 | ||
499 | TP_ARGS(state, mask, IP), | |
500 | ||
f127e61e | 501 | TP_FIELDS( |
fa91fcac | 502 | ctf_integer_hex(struct extent_state *, state, state) |
f127e61e MD |
503 | ctf_integer(gfp_t, mask, mask) |
504 | ctf_integer(unsigned long, ip, IP) | |
505 | ) | |
b87700e3 AG |
506 | ) |
507 | ||
3bc29f0a | 508 | LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, |
9cf29d3e MD |
509 | |
510 | btrfs_free_extent_state, | |
b87700e3 AG |
511 | |
512 | TP_PROTO(struct extent_state *state, unsigned long IP), | |
513 | ||
514 | TP_ARGS(state, IP), | |
515 | ||
f127e61e | 516 | TP_FIELDS( |
fa91fcac | 517 | ctf_integer_hex(struct extent_state *, state, state) |
f127e61e MD |
518 | ctf_integer(unsigned long, ip, IP) |
519 | ) | |
b87700e3 AG |
520 | ) |
521 | #endif | |
522 | ||
3bc29f0a | 523 | #endif /* LTTNG_TRACE_BTRFS_H */ |
b87700e3 AG |
524 | |
525 | /* This part must be outside protection */ | |
6ec43db8 | 526 | #include <probes/define_trace.h> |