24be361918285438bf3a8d3d5c91b1f45fa083f8
[deliverable/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 <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
34 #define show_ref_type(type) \
35 __print_symbolic(type, \
36 { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \
37 { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \
38 { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \
39 { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \
40 { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" })
41
42
43 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
44 #define __show_root_type(obj) \
45 __print_symbolic_u64(obj, \
46 { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \
47 { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \
48 { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \
49 { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \
50 { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \
51 { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \
52 { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \
53 { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \
54 { BTRFS_QUOTA_TREE_OBJECTID, "QUOTA_TREE" }, \
55 { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \
56 { BTRFS_UUID_TREE_OBJECTID, "UUID_RELOC" }, \
57 { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" })
58 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
59 #define __show_root_type(obj) \
60 __print_symbolic_u64(obj, \
61 { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \
62 { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \
63 { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \
64 { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \
65 { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \
66 { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \
67 { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \
68 { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \
69 { BTRFS_QUOTA_TREE_OBJECTID, "QUOTA_TREE" }, \
70 { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \
71 { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" })
72 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
73 #define __show_root_type(obj) \
74 __print_symbolic_u64(obj, \
75 { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \
76 { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \
77 { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \
78 { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \
79 { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \
80 { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \
81 { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \
82 { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \
83 { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \
84 { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" })
85 #else
86 #define __show_root_type(obj) \
87 __print_symbolic(obj, \
88 { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \
89 { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \
90 { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \
91 { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \
92 { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \
93 { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \
94 { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \
95 { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \
96 { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \
97 { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" })
98 #endif
99
100 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
101 #define show_root_type(obj) \
102 obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \
103 (obj >= BTRFS_ROOT_TREE_OBJECTID && \
104 obj <= BTRFS_QUOTA_TREE_OBJECTID)) ? __show_root_type(obj) : "-"
105 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
106 #define show_root_type(obj) \
107 obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \
108 (obj >= BTRFS_ROOT_TREE_OBJECTID && \
109 obj <= BTRFS_CSUM_TREE_OBJECTID)) ? __show_root_type(obj) : "-"
110 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
111 #define show_root_type(obj) \
112 obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \
113 (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-"
114 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
115
116 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
117
118 #define BTRFS_GROUP_FLAGS \
119 { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \
120 { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \
121 { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \
122 { BTRFS_BLOCK_GROUP_RAID0, "RAID0"}, \
123 { BTRFS_BLOCK_GROUP_RAID1, "RAID1"}, \
124 { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \
125 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}, \
126 { BTRFS_BLOCK_GROUP_RAID5, "RAID5"}, \
127 { BTRFS_BLOCK_GROUP_RAID6, "RAID6"}
128
129 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
130
131 #define BTRFS_GROUP_FLAGS \
132 { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \
133 { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \
134 { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \
135 { BTRFS_BLOCK_GROUP_RAID0, "RAID0"}, \
136 { BTRFS_BLOCK_GROUP_RAID1, "RAID1"}, \
137 { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \
138 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}
139
140 #define BTRFS_UUID_SIZE 16
141
142 #endif
143
144 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit,
145
146 TP_PROTO(struct btrfs_root *root),
147
148 TP_ARGS(root),
149
150 TP_STRUCT__entry(
151 __field( u64, generation )
152 __field( u64, root_objectid )
153 ),
154
155 TP_fast_assign(
156 tp_assign(generation, root->fs_info->generation)
157 tp_assign(root_objectid, root->root_key.objectid)
158 ),
159
160 TP_printk("root = %llu(%s), gen = %llu",
161 show_root_type(__entry->root_objectid),
162 (unsigned long long)__entry->generation)
163 )
164
165 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode,
166
167 TP_PROTO(struct inode *inode),
168
169 TP_ARGS(inode),
170
171 TP_STRUCT__entry(
172 __field( ino_t, ino )
173 __field( blkcnt_t, blocks )
174 __field( u64, disk_i_size )
175 __field( u64, generation )
176 __field( u64, last_trans )
177 __field( u64, logged_trans )
178 __field( u64, root_objectid )
179 ),
180
181 TP_fast_assign(
182 tp_assign(ino, inode->i_ino)
183 tp_assign(blocks, inode->i_blocks)
184 tp_assign(disk_i_size, BTRFS_I(inode)->disk_i_size)
185 tp_assign(generation, BTRFS_I(inode)->generation)
186 tp_assign(last_trans, BTRFS_I(inode)->last_trans)
187 tp_assign(logged_trans, BTRFS_I(inode)->logged_trans)
188 tp_assign(root_objectid,
189 BTRFS_I(inode)->root->root_key.objectid)
190 ),
191
192 TP_printk("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, "
193 "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu",
194 show_root_type(__entry->root_objectid),
195 (unsigned long long)__entry->generation,
196 (unsigned long)__entry->ino,
197 (unsigned long long)__entry->blocks,
198 (unsigned long long)__entry->disk_i_size,
199 (unsigned long long)__entry->last_trans,
200 (unsigned long long)__entry->logged_trans)
201 )
202
203 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new,
204
205 TP_PROTO(struct inode *inode),
206
207 TP_ARGS(inode)
208 )
209
210 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request,
211
212 TP_PROTO(struct inode *inode),
213
214 TP_ARGS(inode)
215 )
216
217 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
218
219 TP_PROTO(struct inode *inode),
220
221 TP_ARGS(inode)
222 )
223
224 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
225 #define __show_map_type(type) \
226 __print_symbolic_u64(type, \
227 { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \
228 { EXTENT_MAP_HOLE, "HOLE" }, \
229 { EXTENT_MAP_INLINE, "INLINE" }, \
230 { EXTENT_MAP_DELALLOC, "DELALLOC" })
231 #else
232 #define __show_map_type(type) \
233 __print_symbolic(type, \
234 { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \
235 { EXTENT_MAP_HOLE, "HOLE" }, \
236 { EXTENT_MAP_INLINE, "INLINE" }, \
237 { EXTENT_MAP_DELALLOC, "DELALLOC" })
238 #endif
239
240 #define show_map_type(type) \
241 type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type)
242
243 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
244
245 #define show_map_flags(flag) \
246 __print_flags(flag, "|", \
247 { (1 << EXTENT_FLAG_PINNED), "PINNED" },\
248 { (1 << EXTENT_FLAG_COMPRESSED), "COMPRESSED" },\
249 { (1 << EXTENT_FLAG_VACANCY), "VACANCY" },\
250 { (1 << EXTENT_FLAG_PREALLOC), "PREALLOC" },\
251 { (1 << EXTENT_FLAG_LOGGING), "LOGGING" },\
252 { (1 << EXTENT_FLAG_FILLING), "FILLING" },\
253 { (1 << EXTENT_FLAG_FS_MAPPING), "FS_MAPPING" })
254
255 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
256
257 #define show_map_flags(flag) \
258 __print_flags(flag, "|", \
259 { EXTENT_FLAG_PINNED, "PINNED" }, \
260 { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \
261 { EXTENT_FLAG_VACANCY, "VACANCY" }, \
262 { EXTENT_FLAG_PREALLOC, "PREALLOC" }, \
263 { EXTENT_FLAG_LOGGING, "LOGGING" }, \
264 { EXTENT_FLAG_FILLING, "FILLING" })
265
266 #else
267
268 #define show_map_flags(flag) \
269 __print_flags(flag, "|", \
270 { EXTENT_FLAG_PINNED, "PINNED" }, \
271 { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \
272 { EXTENT_FLAG_VACANCY, "VACANCY" }, \
273 { EXTENT_FLAG_PREALLOC, "PREALLOC" })
274
275 #endif
276
277 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
278
279 TP_PROTO(struct btrfs_root *root, struct extent_map *map),
280
281 TP_ARGS(root, map),
282
283 TP_STRUCT__entry(
284 __field( u64, root_objectid )
285 __field( u64, start )
286 __field( u64, len )
287 __field( u64, orig_start )
288 __field( u64, block_start )
289 __field( u64, block_len )
290 __field( unsigned long, flags )
291 __field( int, refs )
292 __field( unsigned int, compress_type )
293 ),
294
295 TP_fast_assign(
296 tp_assign(root_objectid, root->root_key.objectid)
297 tp_assign(start, map->start)
298 tp_assign(len, map->len)
299 tp_assign(orig_start, map->orig_start)
300 tp_assign(block_start, map->block_start)
301 tp_assign(block_len, map->block_len)
302 tp_assign(flags, map->flags)
303 tp_assign(refs, atomic_read(&map->refs))
304 tp_assign(compress_type, map->compress_type)
305 ),
306
307 TP_printk("root = %llu(%s), start = %llu, len = %llu, "
308 "orig_start = %llu, block_start = %llu(%s), "
309 "block_len = %llu, flags = %s, refs = %u, "
310 "compress_type = %u",
311 show_root_type(__entry->root_objectid),
312 (unsigned long long)__entry->start,
313 (unsigned long long)__entry->len,
314 (unsigned long long)__entry->orig_start,
315 show_map_type(__entry->block_start),
316 (unsigned long long)__entry->block_len,
317 show_map_flags(__entry->flags),
318 __entry->refs, __entry->compress_type)
319 )
320
321 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
322
323 #define show_ordered_flags(flags) \
324 __print_flags(flags, "|", \
325 { (1 << BTRFS_ORDERED_IO_DONE), "IO_DONE" }, \
326 { (1 << BTRFS_ORDERED_COMPLETE), "COMPLETE" }, \
327 { (1 << BTRFS_ORDERED_NOCOW), "NOCOW" }, \
328 { (1 << BTRFS_ORDERED_COMPRESSED), "COMPRESSED" }, \
329 { (1 << BTRFS_ORDERED_PREALLOC), "PREALLOC" }, \
330 { (1 << BTRFS_ORDERED_DIRECT), "DIRECT" }, \
331 { (1 << BTRFS_ORDERED_IOERR), "IOERR" }, \
332 { (1 << BTRFS_ORDERED_UPDATED_ISIZE), "UPDATED_ISIZE" }, \
333 { (1 << BTRFS_ORDERED_LOGGED_CSUM), "LOGGED_CSUM" }, \
334 { (1 << BTRFS_ORDERED_TRUNCATED), "TRUNCATED" })
335
336 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
337
338 #define show_ordered_flags(flags) \
339 __print_symbolic(flags, \
340 { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \
341 { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \
342 { BTRFS_ORDERED_NOCOW, "NOCOW" }, \
343 { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \
344 { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \
345 { BTRFS_ORDERED_DIRECT, "DIRECT" }, \
346 { BTRFS_ORDERED_IOERR, "IOERR" }, \
347 { BTRFS_ORDERED_UPDATED_ISIZE, "UPDATED_ISIZE" }, \
348 { BTRFS_ORDERED_LOGGED_CSUM, "LOGGED_CSUM" })
349
350 #else
351
352 #define show_ordered_flags(flags) \
353 __print_symbolic(flags, \
354 { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \
355 { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \
356 { BTRFS_ORDERED_NOCOW, "NOCOW" }, \
357 { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \
358 { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \
359 { BTRFS_ORDERED_DIRECT, "DIRECT" })
360
361 #endif
362
363 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
364
365 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
366
367 TP_ARGS(inode, ordered),
368
369 TP_STRUCT__entry(
370 __field( ino_t, ino )
371 __field( u64, file_offset )
372 __field( u64, start )
373 __field( u64, len )
374 __field( u64, disk_len )
375 __field( u64, bytes_left )
376 __field( unsigned long, flags )
377 __field( int, compress_type )
378 __field( int, refs )
379 __field( u64, root_objectid )
380 ),
381
382 TP_fast_assign(
383 tp_assign(ino, inode->i_ino)
384 tp_assign(file_offset, ordered->file_offset)
385 tp_assign(start, ordered->start)
386 tp_assign(len, ordered->len)
387 tp_assign(disk_len, ordered->disk_len)
388 tp_assign(bytes_left, ordered->bytes_left)
389 tp_assign(flags, ordered->flags)
390 tp_assign(compress_type, ordered->compress_type)
391 tp_assign(refs, atomic_read(&ordered->refs))
392 tp_assign(root_objectid,
393 BTRFS_I(inode)->root->root_key.objectid)
394 ),
395
396 TP_printk("root = %llu(%s), ino = %llu, file_offset = %llu, "
397 "start = %llu, len = %llu, disk_len = %llu, "
398 "bytes_left = %llu, flags = %s, compress_type = %d, "
399 "refs = %d",
400 show_root_type(__entry->root_objectid),
401 (unsigned long long)__entry->ino,
402 (unsigned long long)__entry->file_offset,
403 (unsigned long long)__entry->start,
404 (unsigned long long)__entry->len,
405 (unsigned long long)__entry->disk_len,
406 (unsigned long long)__entry->bytes_left,
407 show_ordered_flags(__entry->flags),
408 __entry->compress_type, __entry->refs)
409 )
410
411 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
412
413 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
414
415 TP_ARGS(inode, ordered)
416 )
417
418 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove,
419
420 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
421
422 TP_ARGS(inode, ordered)
423 )
424
425 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start,
426
427 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
428
429 TP_ARGS(inode, ordered)
430 )
431
432 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
433
434 TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
435
436 TP_ARGS(inode, ordered)
437 )
438
439 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
440
441 TP_PROTO(struct page *page, struct inode *inode,
442 struct writeback_control *wbc),
443
444 TP_ARGS(page, inode, wbc),
445
446 TP_STRUCT__entry(
447 __field( ino_t, ino )
448 __field( pgoff_t, index )
449 __field( long, nr_to_write )
450 __field( long, pages_skipped )
451 __field( loff_t, range_start )
452 __field( loff_t, range_end )
453 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
454 __field( char, nonblocking )
455 #endif
456 __field( char, for_kupdate )
457 __field( char, for_reclaim )
458 __field( char, range_cyclic )
459 __field( pgoff_t, writeback_index )
460 __field( u64, root_objectid )
461 ),
462
463 TP_fast_assign(
464 tp_assign(ino, inode->i_ino)
465 tp_assign(index, page->index)
466 tp_assign(nr_to_write, wbc->nr_to_write)
467 tp_assign(pages_skipped, wbc->pages_skipped)
468 tp_assign(range_start, wbc->range_start)
469 tp_assign(range_end, wbc->range_end)
470 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
471 tp_assign(nonblocking, wbc->nonblocking)
472 #endif
473 tp_assign(for_kupdate, wbc->for_kupdate)
474 tp_assign(for_reclaim, wbc->for_reclaim)
475 tp_assign(range_cyclic, wbc->range_cyclic)
476 tp_assign(writeback_index, inode->i_mapping->writeback_index)
477 tp_assign(root_objectid,
478 BTRFS_I(inode)->root->root_key.objectid)
479 ),
480
481 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
482 TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, "
483 "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, "
484 "range_end = %llu, nonblocking = %d, for_kupdate = %d, "
485 "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu",
486 show_root_type(__entry->root_objectid),
487 (unsigned long)__entry->ino, __entry->index,
488 __entry->nr_to_write, __entry->pages_skipped,
489 __entry->range_start, __entry->range_end,
490 __entry->nonblocking, __entry->for_kupdate,
491 __entry->for_reclaim, __entry->range_cyclic,
492 (unsigned long)__entry->writeback_index)
493 #else
494 TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, "
495 "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, "
496 "range_end = %llu, for_kupdate = %d, "
497 "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu",
498 show_root_type(__entry->root_objectid),
499 (unsigned long)__entry->ino, __entry->index,
500 __entry->nr_to_write, __entry->pages_skipped,
501 __entry->range_start, __entry->range_end,
502 __entry->for_kupdate,
503 __entry->for_reclaim, __entry->range_cyclic,
504 (unsigned long)__entry->writeback_index)
505 #endif
506 )
507
508 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__writepage, __extent_writepage,
509
510 TP_PROTO(struct page *page, struct inode *inode,
511 struct writeback_control *wbc),
512
513 TP_ARGS(page, inode, wbc)
514 )
515
516 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
517
518 TP_PROTO(struct page *page, u64 start, u64 end, int uptodate),
519
520 TP_ARGS(page, start, end, uptodate),
521
522 TP_STRUCT__entry(
523 __field( ino_t, ino )
524 __field( pgoff_t, index )
525 __field( u64, start )
526 __field( u64, end )
527 __field( int, uptodate )
528 __field( u64, root_objectid )
529 ),
530
531 TP_fast_assign(
532 tp_assign(ino, page->mapping->host->i_ino)
533 tp_assign(index, page->index)
534 tp_assign(start, start)
535 tp_assign(end, end)
536 tp_assign(uptodate, uptodate)
537 tp_assign(root_objectid,
538 BTRFS_I(page->mapping->host)->root->root_key.objectid)
539 ),
540
541 TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, "
542 "end = %llu, uptodate = %d",
543 show_root_type(__entry->root_objectid),
544 (unsigned long)__entry->ino, (unsigned long)__entry->index,
545 (unsigned long long)__entry->start,
546 (unsigned long long)__entry->end, __entry->uptodate)
547 )
548
549 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
550
551 TP_PROTO(struct file *file, int datasync),
552
553 TP_ARGS(file, datasync),
554
555 TP_STRUCT__entry(
556 __field( ino_t, ino )
557 __field( ino_t, parent )
558 __field( int, datasync )
559 __field( u64, root_objectid )
560 ),
561
562 TP_fast_assign(
563 tp_assign(ino, file->f_path.dentry->d_inode->i_ino)
564 tp_assign(parent, file->f_path.dentry->d_parent->d_inode->i_ino)
565 tp_assign(datasync, datasync)
566 tp_assign(root_objectid,
567 BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid)
568 ),
569
570 TP_printk("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d",
571 show_root_type(__entry->root_objectid),
572 (unsigned long)__entry->ino, (unsigned long)__entry->parent,
573 __entry->datasync)
574 )
575
576 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
577
578 TP_PROTO(int wait),
579
580 TP_ARGS(wait),
581
582 TP_STRUCT__entry(
583 __field( int, wait )
584 ),
585
586 TP_fast_assign(
587 tp_assign(wait, wait)
588 ),
589
590 TP_printk("wait = %d", __entry->wait)
591 )
592
593 #define show_ref_action(action) \
594 __print_symbolic(action, \
595 { BTRFS_ADD_DELAYED_REF, "ADD_DELAYED_REF" }, \
596 { BTRFS_DROP_DELAYED_REF, "DROP_DELAYED_REF" }, \
597 { BTRFS_ADD_DELAYED_EXTENT, "ADD_DELAYED_EXTENT" }, \
598 { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" })
599
600
601 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
602
603 TP_PROTO(struct btrfs_delayed_ref_node *ref,
604 struct btrfs_delayed_tree_ref *full_ref,
605 int action),
606
607 TP_ARGS(ref, full_ref, action),
608
609 TP_STRUCT__entry(
610 __field( u64, bytenr )
611 __field( u64, num_bytes )
612 __field( int, action )
613 __field( u64, parent )
614 __field( u64, ref_root )
615 __field( int, level )
616 __field( int, type )
617 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
618 __field( u64, seq )
619 #endif
620 ),
621
622 TP_fast_assign(
623 tp_assign(bytenr, ref->bytenr)
624 tp_assign(num_bytes, ref->num_bytes)
625 tp_assign(action, action)
626 tp_assign(parent, full_ref->parent)
627 tp_assign(ref_root, full_ref->root)
628 tp_assign(level, full_ref->level)
629 tp_assign(type, ref->type)
630 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
631 tp_assign(seq, ref->seq)
632 #endif
633 ),
634
635 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
636 TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, "
637 "parent = %llu(%s), ref_root = %llu(%s), level = %d, "
638 "type = %s, seq = %llu",
639 #else
640 TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, "
641 "parent = %llu(%s), ref_root = %llu(%s), level = %d, "
642 "type = %s",
643 #endif
644 (unsigned long long)__entry->bytenr,
645 (unsigned long long)__entry->num_bytes,
646 show_ref_action(__entry->action),
647 show_root_type(__entry->parent),
648 show_root_type(__entry->ref_root),
649 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
650 __entry->level, show_ref_type(__entry->type),
651 (unsigned long long)__entry->seq)
652 #else
653 __entry->level, show_ref_type(__entry->type))
654 #endif
655 )
656
657 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
658
659 TP_PROTO(struct btrfs_delayed_ref_node *ref,
660 struct btrfs_delayed_data_ref *full_ref,
661 int action),
662
663 TP_ARGS(ref, full_ref, action),
664
665 TP_STRUCT__entry(
666 __field( u64, bytenr )
667 __field( u64, num_bytes )
668 __field( int, action )
669 __field( u64, parent )
670 __field( u64, ref_root )
671 __field( u64, owner )
672 __field( u64, offset )
673 __field( int, type )
674 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
675 __field( u64, seq )
676 #endif
677 ),
678
679 TP_fast_assign(
680 tp_assign(bytenr, ref->bytenr)
681 tp_assign(num_bytes, ref->num_bytes)
682 tp_assign(action, action)
683 tp_assign(parent, full_ref->parent)
684 tp_assign(ref_root, full_ref->root)
685 tp_assign(owner, full_ref->objectid)
686 tp_assign(offset, full_ref->offset)
687 tp_assign(type, ref->type)
688 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
689 tp_assign(seq, ref->seq)
690 #endif
691 ),
692
693 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
694 TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, "
695 "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, "
696 "offset = %llu, type = %s, seq = %llu",
697 #else
698 TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, "
699 "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, "
700 "offset = %llu, type = %s",
701 #endif
702 (unsigned long long)__entry->bytenr,
703 (unsigned long long)__entry->num_bytes,
704 show_ref_action(__entry->action),
705 show_root_type(__entry->parent),
706 show_root_type(__entry->ref_root),
707 (unsigned long long)__entry->owner,
708 (unsigned long long)__entry->offset,
709 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
710 show_ref_type(__entry->type),
711 (unsigned long long)__entry->seq)
712 #else
713 show_ref_type(__entry->type))
714 #endif
715 )
716
717 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
718
719 TP_PROTO(struct btrfs_delayed_ref_node *ref,
720 struct btrfs_delayed_ref_head *head_ref,
721 int action),
722
723 TP_ARGS(ref, head_ref, action),
724
725 TP_STRUCT__entry(
726 __field( u64, bytenr )
727 __field( u64, num_bytes )
728 __field( int, action )
729 __field( int, is_data )
730 ),
731
732 TP_fast_assign(
733 tp_assign(bytenr, ref->bytenr)
734 tp_assign(num_bytes, ref->num_bytes)
735 tp_assign(action, action)
736 tp_assign(is_data, head_ref->is_data)
737 ),
738
739 TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d",
740 (unsigned long long)__entry->bytenr,
741 (unsigned long long)__entry->num_bytes,
742 show_ref_action(__entry->action),
743 __entry->is_data)
744 )
745
746 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
747
748 #define show_chunk_type(type) \
749 __print_flags(type, "|", \
750 { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \
751 { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \
752 { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \
753 { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \
754 { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \
755 { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \
756 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}, \
757 { BTRFS_BLOCK_GROUP_RAID5, "RAID5" }, \
758 { BTRFS_BLOCK_GROUP_RAID6, "RAID6" })
759
760 #else
761
762 #define show_chunk_type(type) \
763 __print_flags(type, "|", \
764 { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \
765 { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \
766 { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \
767 { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \
768 { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \
769 { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \
770 { BTRFS_BLOCK_GROUP_RAID10, "RAID10"})
771
772 #endif
773
774 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
775
776 TP_PROTO(struct btrfs_root *root, struct map_lookup *map,
777 u64 offset, u64 size),
778
779 TP_ARGS(root, map, offset, size),
780
781 TP_STRUCT__entry(
782 __field( int, num_stripes )
783 __field( u64, type )
784 __field( int, sub_stripes )
785 __field( u64, offset )
786 __field( u64, size )
787 __field( u64, root_objectid )
788 ),
789
790 TP_fast_assign(
791 tp_assign(num_stripes, map->num_stripes)
792 tp_assign(type, map->type)
793 tp_assign(sub_stripes, map->sub_stripes)
794 tp_assign(offset, offset)
795 tp_assign(size, size)
796 tp_assign(root_objectid, root->root_key.objectid)
797 ),
798
799 TP_printk("root = %llu(%s), offset = %llu, size = %llu, "
800 "num_stripes = %d, sub_stripes = %d, type = %s",
801 show_root_type(__entry->root_objectid),
802 (unsigned long long)__entry->offset,
803 (unsigned long long)__entry->size,
804 __entry->num_stripes, __entry->sub_stripes,
805 show_chunk_type(__entry->type))
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 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
825
826 TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf,
827 struct extent_buffer *cow),
828
829 TP_ARGS(root, buf, cow),
830
831 TP_STRUCT__entry(
832 __field( u64, root_objectid )
833 __field( u64, buf_start )
834 __field( int, refs )
835 __field( u64, cow_start )
836 __field( int, buf_level )
837 __field( int, cow_level )
838 ),
839
840 TP_fast_assign(
841 tp_assign(root_objectid, root->root_key.objectid)
842 tp_assign(buf_start, buf->start)
843 tp_assign(refs, atomic_read(&buf->refs))
844 tp_assign(cow_start, cow->start)
845 tp_assign(buf_level, btrfs_header_level(buf))
846 tp_assign(cow_level, btrfs_header_level(cow))
847 ),
848
849 TP_printk("root = %llu(%s), refs = %d, orig_buf = %llu "
850 "(orig_level = %d), cow_buf = %llu (cow_level = %d)",
851 show_root_type(__entry->root_objectid),
852 __entry->refs,
853 (unsigned long long)__entry->buf_start,
854 __entry->buf_level,
855 (unsigned long long)__entry->cow_start,
856 __entry->cow_level)
857 )
858
859 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
860 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
861
862 TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
863 u64 bytes, int reserve),
864
865 TP_ARGS(fs_info, type, val, bytes, reserve),
866
867 TP_STRUCT__entry(
868 __array( u8, fsid, BTRFS_UUID_SIZE )
869 __string( type, type )
870 __field( u64, val )
871 __field( u64, bytes )
872 __field( int, reserve )
873 ),
874
875 TP_fast_assign(
876 tp_memcpy(fsid, fs_info->fsid, BTRFS_UUID_SIZE)
877 tp_strcpy(type, type)
878 tp_assign(val, val)
879 tp_assign(bytes, bytes)
880 tp_assign(reserve, reserve)
881 ),
882
883 TP_printk("%pU: %s: %Lu %s %Lu", __entry->fsid, __get_str(type),
884 __entry->val, __entry->reserve ? "reserve" : "release",
885 __entry->bytes)
886 )
887 #endif
888
889 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
890
891 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
892
893 TP_ARGS(root, start, len),
894
895 TP_STRUCT__entry(
896 __field( u64, root_objectid )
897 __field( u64, start )
898 __field( u64, len )
899 ),
900
901 TP_fast_assign(
902 tp_assign(root_objectid, root->root_key.objectid)
903 tp_assign(start, start)
904 tp_assign(len, len)
905 ),
906
907 TP_printk("root = %llu(%s), start = %llu, len = %llu",
908 show_root_type(__entry->root_objectid),
909 (unsigned long long)__entry->start,
910 (unsigned long long)__entry->len)
911 )
912
913 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc,
914
915 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
916
917 TP_ARGS(root, start, len)
918 )
919
920 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free,
921
922 TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
923
924 TP_ARGS(root, start, len)
925 )
926
927 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
928 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
929
930 btrfs_find_free_extent,
931
932 TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size,
933 u64 data),
934
935 TP_ARGS(root, num_bytes, empty_size, data),
936
937 TP_STRUCT__entry(
938 __field( u64, root_objectid )
939 __field( u64, num_bytes )
940 __field( u64, empty_size )
941 __field( u64, data )
942 ),
943
944 TP_fast_assign(
945 tp_assign(root_objectid, root->root_key.objectid)
946 tp_assign(num_bytes, num_bytes)
947 tp_assign(empty_size, empty_size)
948 tp_assign(data, data)
949 ),
950
951 TP_printk("root = %Lu(%s), len = %Lu, empty_size = %Lu, "
952 "flags = %Lu(%s)", show_root_type(__entry->root_objectid),
953 __entry->num_bytes, __entry->empty_size, __entry->data,
954 __print_flags((unsigned long)__entry->data, "|",
955 BTRFS_GROUP_FLAGS))
956 )
957
958 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
959
960 TP_PROTO(struct btrfs_root *root,
961 struct btrfs_block_group_cache *block_group, u64 start,
962 u64 len),
963
964 TP_ARGS(root, block_group, start, len),
965
966 TP_STRUCT__entry(
967 __field( u64, root_objectid )
968 __field( u64, bg_objectid )
969 __field( u64, flags )
970 __field( u64, start )
971 __field( u64, len )
972 ),
973
974 TP_fast_assign(
975 tp_assign(root_objectid, root->root_key.objectid)
976 tp_assign(bg_objectid, block_group->key.objectid)
977 tp_assign(flags, block_group->flags)
978 tp_assign(start, start)
979 tp_assign(len, len)
980 ),
981
982 TP_printk("root = %Lu(%s), block_group = %Lu, flags = %Lu(%s), "
983 "start = %Lu, len = %Lu",
984 show_root_type(__entry->root_objectid), __entry->bg_objectid,
985 __entry->flags, __print_flags((unsigned long)__entry->flags,
986 "|", BTRFS_GROUP_FLAGS),
987 __entry->start, __entry->len)
988 )
989
990 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent,
991
992 TP_PROTO(struct btrfs_root *root,
993 struct btrfs_block_group_cache *block_group, u64 start,
994 u64 len),
995
996 TP_ARGS(root, block_group, start, len)
997 )
998
999 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster,
1000
1001 TP_PROTO(struct btrfs_root *root,
1002 struct btrfs_block_group_cache *block_group, u64 start,
1003 u64 len),
1004
1005 TP_ARGS(root, block_group, start, len)
1006 )
1007
1008 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
1009
1010 TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
1011 u64 bytes, u64 empty_size, u64 min_bytes),
1012
1013 TP_ARGS(block_group, start, bytes, empty_size, min_bytes),
1014
1015 TP_STRUCT__entry(
1016 __field( u64, bg_objectid )
1017 __field( u64, flags )
1018 __field( u64, start )
1019 __field( u64, bytes )
1020 __field( u64, empty_size )
1021 __field( u64, min_bytes )
1022 ),
1023
1024 TP_fast_assign(
1025 tp_assign(bg_objectid, block_group->key.objectid)
1026 tp_assign(flags, block_group->flags)
1027 tp_assign(start, start)
1028 tp_assign(bytes, bytes)
1029 tp_assign(empty_size, empty_size)
1030 tp_assign(min_bytes, min_bytes)
1031 ),
1032
1033 TP_printk("block_group = %Lu, flags = %Lu(%s), start = %Lu, len = %Lu,"
1034 " empty_size = %Lu, min_bytes = %Lu", __entry->bg_objectid,
1035 __entry->flags,
1036 __print_flags((unsigned long)__entry->flags, "|",
1037 BTRFS_GROUP_FLAGS), __entry->start,
1038 __entry->bytes, __entry->empty_size, __entry->min_bytes)
1039 )
1040
1041 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup,
1042
1043 TP_PROTO(struct btrfs_block_group_cache *block_group),
1044
1045 TP_ARGS(block_group),
1046
1047 TP_STRUCT__entry(
1048 __field( u64, bg_objectid )
1049 ),
1050
1051 TP_fast_assign(
1052 tp_assign(bg_objectid, block_group->key.objectid)
1053 ),
1054
1055 TP_printk("block_group = %Lu", __entry->bg_objectid)
1056 )
1057
1058 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
1059
1060 TP_PROTO(struct btrfs_block_group_cache *block_group,
1061 struct btrfs_free_cluster *cluster, u64 size, int bitmap),
1062
1063 TP_ARGS(block_group, cluster, size, bitmap),
1064
1065 TP_STRUCT__entry(
1066 __field( u64, bg_objectid )
1067 __field( u64, flags )
1068 __field( u64, start )
1069 __field( u64, max_size )
1070 __field( u64, size )
1071 __field( int, bitmap )
1072 ),
1073
1074 TP_fast_assign(
1075 tp_assign(bg_objectid, block_group->key.objectid)
1076 tp_assign(flags, block_group->flags)
1077 tp_assign(start, cluster->window_start)
1078 tp_assign(max_size, cluster->max_size)
1079 tp_assign(size, size)
1080 tp_assign(bitmap, bitmap)
1081 ),
1082
1083 TP_printk("block_group = %Lu, flags = %Lu(%s), window_start = %Lu, "
1084 "size = %Lu, max_size = %Lu, bitmap = %d",
1085 __entry->bg_objectid,
1086 __entry->flags,
1087 __print_flags((unsigned long)__entry->flags, "|",
1088 BTRFS_GROUP_FLAGS), __entry->start,
1089 __entry->size, __entry->max_size, __entry->bitmap)
1090 )
1091 #endif
1092
1093 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1094 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
1095
1096 btrfs_alloc_extent_state,
1097
1098 TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP),
1099
1100 TP_ARGS(state, mask, IP),
1101
1102 TP_STRUCT__entry(
1103 __field(struct extent_state *, state)
1104 __field(gfp_t, mask)
1105 __field(unsigned long, ip)
1106 ),
1107
1108 TP_fast_assign(
1109 tp_assign(state, state)
1110 tp_assign(mask, mask)
1111 tp_assign(ip, IP)
1112 ),
1113
1114 TP_printk("state=%p; mask = %s; caller = %pF", __entry->state,
1115 show_gfp_flags(__entry->mask), (void *)__entry->ip)
1116 )
1117
1118 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
1119
1120 btrfs_free_extent_state,
1121
1122 TP_PROTO(struct extent_state *state, unsigned long IP),
1123
1124 TP_ARGS(state, IP),
1125
1126 TP_STRUCT__entry(
1127 __field(struct extent_state *, state)
1128 __field(unsigned long, ip)
1129 ),
1130
1131 TP_fast_assign(
1132 tp_assign(state, state)
1133 tp_assign(ip, IP)
1134 ),
1135
1136 TP_printk(" state=%p; caller = %pF", __entry->state,
1137 (void *)__entry->ip)
1138 )
1139 #endif
1140
1141 #endif /* LTTNG_TRACE_BTRFS_H */
1142
1143 /* This part must be outside protection */
1144 #include "../../../probes/define_trace.h"
This page took 0.058332 seconds and 4 git commands to generate.