2 #define TRACE_SYSTEM ocfs2
4 #if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/tracepoint.h>
9 DECLARE_EVENT_CLASS(ocfs2__int,
18 TP_printk("%d", __entry->num)
21 #define DEFINE_OCFS2_INT_EVENT(name) \
22 DEFINE_EVENT(ocfs2__int, name, \
26 DECLARE_EVENT_CLASS(ocfs2__uint,
27 TP_PROTO(unsigned int num),
30 __field( unsigned int, num )
35 TP_printk("%u", __entry->num)
38 #define DEFINE_OCFS2_UINT_EVENT(name) \
39 DEFINE_EVENT(ocfs2__uint, name, \
40 TP_PROTO(unsigned int num), \
43 DECLARE_EVENT_CLASS(ocfs2__ull,
44 TP_PROTO(unsigned long long blkno),
47 __field(unsigned long long, blkno)
50 __entry->blkno = blkno;
52 TP_printk("%llu", __entry->blkno)
55 #define DEFINE_OCFS2_ULL_EVENT(name) \
56 DEFINE_EVENT(ocfs2__ull, name, \
57 TP_PROTO(unsigned long long num), \
60 DECLARE_EVENT_CLASS(ocfs2__int_int,
61 TP_PROTO(int value1, int value2),
62 TP_ARGS(value1, value2),
68 __entry->value1 = value1;
69 __entry->value2 = value2;
71 TP_printk("%d %d", __entry->value1, __entry->value2)
74 #define DEFINE_OCFS2_INT_INT_EVENT(name) \
75 DEFINE_EVENT(ocfs2__int_int, name, \
76 TP_PROTO(int val1, int val2), \
79 DECLARE_EVENT_CLASS(ocfs2__uint_uint,
80 TP_PROTO(unsigned int value1, unsigned int value2),
81 TP_ARGS(value1, value2),
83 __field(unsigned int, value1)
84 __field(unsigned int, value2)
87 __entry->value1 = value1;
88 __entry->value2 = value2;
90 TP_printk("%u %u", __entry->value1, __entry->value2)
93 #define DEFINE_OCFS2_UINT_UINT_EVENT(name) \
94 DEFINE_EVENT(ocfs2__uint_uint, name, \
95 TP_PROTO(unsigned int val1, unsigned int val2), \
98 DECLARE_EVENT_CLASS(ocfs2__ull_uint,
99 TP_PROTO(unsigned long long value1, unsigned int value2),
100 TP_ARGS(value1, value2),
102 __field(unsigned long long, value1)
103 __field(unsigned int, value2)
106 __entry->value1 = value1;
107 __entry->value2 = value2;
109 TP_printk("%llu %u", __entry->value1, __entry->value2)
112 #define DEFINE_OCFS2_ULL_UINT_EVENT(name) \
113 DEFINE_EVENT(ocfs2__ull_uint, name, \
114 TP_PROTO(unsigned long long val1, unsigned int val2), \
117 DECLARE_EVENT_CLASS(ocfs2__ull_ull,
118 TP_PROTO(unsigned long long value1, unsigned long long value2),
119 TP_ARGS(value1, value2),
121 __field(unsigned long long, value1)
122 __field(unsigned long long, value2)
125 __entry->value1 = value1;
126 __entry->value2 = value2;
128 TP_printk("%llu %llu", __entry->value1, __entry->value2)
131 #define DEFINE_OCFS2_ULL_ULL_EVENT(name) \
132 DEFINE_EVENT(ocfs2__ull_ull, name, \
133 TP_PROTO(unsigned long long val1, unsigned long long val2), \
136 DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint,
137 TP_PROTO(unsigned long long value1,
138 unsigned long long value2, unsigned int value3),
139 TP_ARGS(value1, value2, value3),
141 __field(unsigned long long, value1)
142 __field(unsigned long long, value2)
143 __field(unsigned int, value3)
146 __entry->value1 = value1;
147 __entry->value2 = value2;
148 __entry->value3 = value3;
150 TP_printk("%llu %llu %u",
151 __entry->value1, __entry->value2, __entry->value3)
154 #define DEFINE_OCFS2_ULL_ULL_UINT_EVENT(name) \
155 DEFINE_EVENT(ocfs2__ull_ull_uint, name, \
156 TP_PROTO(unsigned long long val1, \
157 unsigned long long val2, unsigned int val3), \
158 TP_ARGS(val1, val2, val3))
160 DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint,
161 TP_PROTO(unsigned long long value1,
162 unsigned int value2, unsigned int value3),
163 TP_ARGS(value1, value2, value3),
165 __field(unsigned long long, value1)
166 __field(unsigned int, value2)
167 __field(unsigned int, value3)
170 __entry->value1 = value1;
171 __entry->value2 = value2;
172 __entry->value3 = value3;
174 TP_printk("%llu %u %u", __entry->value1,
175 __entry->value2, __entry->value3)
178 #define DEFINE_OCFS2_ULL_UINT_UINT_EVENT(name) \
179 DEFINE_EVENT(ocfs2__ull_uint_uint, name, \
180 TP_PROTO(unsigned long long val1, \
181 unsigned int val2, unsigned int val3), \
182 TP_ARGS(val1, val2, val3))
184 DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint,
185 TP_PROTO(unsigned int value1, unsigned int value2,
186 unsigned int value3),
187 TP_ARGS(value1, value2, value3),
189 __field( unsigned int, value1 )
190 __field( unsigned int, value2 )
191 __field( unsigned int, value3 )
194 __entry->value1 = value1;
195 __entry->value2 = value2;
196 __entry->value3 = value3;
198 TP_printk("%u %u %u", __entry->value1, __entry->value2, __entry->value3)
201 #define DEFINE_OCFS2_UINT_UINT_UINT_EVENT(name) \
202 DEFINE_EVENT(ocfs2__uint_uint_uint, name, \
203 TP_PROTO(unsigned int value1, unsigned int value2, \
204 unsigned int value3), \
205 TP_ARGS(value1, value2, value3))
207 DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int,
208 TP_PROTO(unsigned long long ull, int value1, int value2, int value3),
209 TP_ARGS(ull, value1, value2, value3),
211 __field( unsigned long long, ull )
212 __field( int, value1 )
213 __field( int, value2 )
214 __field( int, value3 )
218 __entry->value1 = value1;
219 __entry->value2 = value2;
220 __entry->value3 = value3;
222 TP_printk("%llu %d %d %d",
223 __entry->ull, __entry->value1,
224 __entry->value2, __entry->value3)
227 #define DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(name) \
228 DEFINE_EVENT(ocfs2__ull_int_int_int, name, \
229 TP_PROTO(unsigned long long ull, int value1, \
230 int value2, int value3), \
231 TP_ARGS(ull, value1, value2, value3))
233 DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint_uint,
234 TP_PROTO(unsigned long long ull, unsigned int value1,
235 unsigned int value2, unsigned int value3),
236 TP_ARGS(ull, value1, value2, value3),
238 __field(unsigned long long, ull)
239 __field(unsigned int, value1)
240 __field(unsigned int, value2)
241 __field(unsigned int, value3)
245 __entry->value1 = value1;
246 __entry->value2 = value2;
247 __entry->value3 = value3;
249 TP_printk("%llu %u %u %u",
250 __entry->ull, __entry->value1,
251 __entry->value2, __entry->value3)
254 #define DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(name) \
255 DEFINE_EVENT(ocfs2__ull_uint_uint_uint, name, \
256 TP_PROTO(unsigned long long ull, unsigned int value1, \
257 unsigned int value2, unsigned int value3), \
258 TP_ARGS(ull, value1, value2, value3))
260 /* Trace events for fs/ocfs2/alloc.c. */
261 DECLARE_EVENT_CLASS(ocfs2__btree_ops,
262 TP_PROTO(unsigned long long owner,\
263 unsigned int value1, unsigned int value2),
264 TP_ARGS(owner, value1, value2),
266 __field(unsigned long long, owner)
267 __field(unsigned int, value1)
268 __field(unsigned int, value2)
271 __entry->owner = owner;
272 __entry->value1 = value1;
273 __entry->value2 = value2;
275 TP_printk("%llu %u %u",
276 __entry->owner, __entry->value1, __entry->value2)
279 #define DEFINE_OCFS2_BTREE_EVENT(name) \
280 DEFINE_EVENT(ocfs2__btree_ops, name, \
281 TP_PROTO(unsigned long long owner, \
282 unsigned int value1, unsigned int value2), \
283 TP_ARGS(owner, value1, value2))
285 DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch);
287 DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right);
289 DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path);
291 DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start);
293 DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree);
295 DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents);
297 DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert);
299 TRACE_EVENT(ocfs2_grow_tree,
300 TP_PROTO(unsigned long long owner, int depth),
301 TP_ARGS(owner, depth),
303 __field(unsigned long long, owner)
307 __entry->owner = owner;
308 __entry->depth = depth;
310 TP_printk("%llu %d", __entry->owner, __entry->depth)
313 TRACE_EVENT(ocfs2_rotate_subtree,
314 TP_PROTO(int subtree_root, unsigned long long blkno,
316 TP_ARGS(subtree_root, blkno, depth),
318 __field(int, subtree_root)
319 __field(unsigned long long, blkno)
323 __entry->subtree_root = subtree_root;
324 __entry->blkno = blkno;
325 __entry->depth = depth;
327 TP_printk("%d %llu %d", __entry->subtree_root,
328 __entry->blkno, __entry->depth)
331 TRACE_EVENT(ocfs2_insert_extent,
332 TP_PROTO(unsigned int ins_appending, unsigned int ins_contig,
333 int ins_contig_index, int free_records, int ins_tree_depth),
334 TP_ARGS(ins_appending, ins_contig, ins_contig_index, free_records,
337 __field(unsigned int, ins_appending)
338 __field(unsigned int, ins_contig)
339 __field(int, ins_contig_index)
340 __field(int, free_records)
341 __field(int, ins_tree_depth)
344 __entry->ins_appending = ins_appending;
345 __entry->ins_contig = ins_contig;
346 __entry->ins_contig_index = ins_contig_index;
347 __entry->free_records = free_records;
348 __entry->ins_tree_depth = ins_tree_depth;
350 TP_printk("%u %u %d %d %d",
351 __entry->ins_appending, __entry->ins_contig,
352 __entry->ins_contig_index, __entry->free_records,
353 __entry->ins_tree_depth)
356 TRACE_EVENT(ocfs2_split_extent,
357 TP_PROTO(int split_index, unsigned int c_contig_type,
358 unsigned int c_has_empty_extent,
359 unsigned int c_split_covers_rec),
360 TP_ARGS(split_index, c_contig_type,
361 c_has_empty_extent, c_split_covers_rec),
363 __field(int, split_index)
364 __field(unsigned int, c_contig_type)
365 __field(unsigned int, c_has_empty_extent)
366 __field(unsigned int, c_split_covers_rec)
369 __entry->split_index = split_index;
370 __entry->c_contig_type = c_contig_type;
371 __entry->c_has_empty_extent = c_has_empty_extent;
372 __entry->c_split_covers_rec = c_split_covers_rec;
374 TP_printk("%d %u %u %u", __entry->split_index, __entry->c_contig_type,
375 __entry->c_has_empty_extent, __entry->c_split_covers_rec)
378 TRACE_EVENT(ocfs2_remove_extent,
379 TP_PROTO(unsigned long long owner, unsigned int cpos,
380 unsigned int len, int index,
381 unsigned int e_cpos, unsigned int clusters),
382 TP_ARGS(owner, cpos, len, index, e_cpos, clusters),
384 __field(unsigned long long, owner)
385 __field(unsigned int, cpos)
386 __field(unsigned int, len)
388 __field(unsigned int, e_cpos)
389 __field(unsigned int, clusters)
392 __entry->owner = owner;
393 __entry->cpos = cpos;
395 __entry->index = index;
396 __entry->e_cpos = e_cpos;
397 __entry->clusters = clusters;
399 TP_printk("%llu %u %u %d %u %u",
400 __entry->owner, __entry->cpos, __entry->len, __entry->index,
401 __entry->e_cpos, __entry->clusters)
404 TRACE_EVENT(ocfs2_commit_truncate,
405 TP_PROTO(unsigned long long ino, unsigned int new_cpos,
406 unsigned int clusters, unsigned int depth),
407 TP_ARGS(ino, new_cpos, clusters, depth),
409 __field(unsigned long long, ino)
410 __field(unsigned int, new_cpos)
411 __field(unsigned int, clusters)
412 __field(unsigned int, depth)
416 __entry->new_cpos = new_cpos;
417 __entry->clusters = clusters;
418 __entry->depth = depth;
420 TP_printk("%llu %u %u %u",
421 __entry->ino, __entry->new_cpos,
422 __entry->clusters, __entry->depth)
425 TRACE_EVENT(ocfs2_validate_extent_block,
426 TP_PROTO(unsigned long long blkno),
429 __field(unsigned long long, blkno)
432 __entry->blkno = blkno;
434 TP_printk("%llu ", __entry->blkno)
437 TRACE_EVENT(ocfs2_rotate_leaf,
438 TP_PROTO(unsigned int insert_cpos, int insert_index,
439 int has_empty, int next_free,
440 unsigned int l_count),
441 TP_ARGS(insert_cpos, insert_index, has_empty,
444 __field(unsigned int, insert_cpos)
445 __field(int, insert_index)
446 __field(int, has_empty)
447 __field(int, next_free)
448 __field(unsigned int, l_count)
451 __entry->insert_cpos = insert_cpos;
452 __entry->insert_index = insert_index;
453 __entry->has_empty = has_empty;
454 __entry->next_free = next_free;
455 __entry->l_count = l_count;
457 TP_printk("%u %d %d %d %u", __entry->insert_cpos,
458 __entry->insert_index, __entry->has_empty,
459 __entry->next_free, __entry->l_count)
462 TRACE_EVENT(ocfs2_add_clusters_in_btree_ret,
463 TP_PROTO(int status, int reason, int err),
464 TP_ARGS(status, reason, err),
471 __entry->status = status;
472 __entry->reason = reason;
475 TP_printk("%d %d %d", __entry->status,
476 __entry->reason, __entry->err)
479 TRACE_EVENT(ocfs2_mark_extent_written,
480 TP_PROTO(unsigned long long owner, unsigned int cpos,
481 unsigned int len, unsigned int phys),
482 TP_ARGS(owner, cpos, len, phys),
484 __field(unsigned long long, owner)
485 __field(unsigned int, cpos)
486 __field(unsigned int, len)
487 __field(unsigned int, phys)
490 __entry->owner = owner;
491 __entry->cpos = cpos;
493 __entry->phys = phys;
495 TP_printk("%llu %u %u %u",
496 __entry->owner, __entry->cpos,
497 __entry->len, __entry->phys)
500 DECLARE_EVENT_CLASS(ocfs2__truncate_log_ops,
501 TP_PROTO(unsigned long long blkno, int index,
502 unsigned int start, unsigned int num),
503 TP_ARGS(blkno, index, start, num),
505 __field(unsigned long long, blkno)
507 __field(unsigned int, start)
508 __field(unsigned int, num)
511 __entry->blkno = blkno;
512 __entry->index = index;
513 __entry->start = start;
516 TP_printk("%llu %d %u %u",
517 __entry->blkno, __entry->index,
518 __entry->start, __entry->num)
521 #define DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(name) \
522 DEFINE_EVENT(ocfs2__truncate_log_ops, name, \
523 TP_PROTO(unsigned long long blkno, int index, \
524 unsigned int start, unsigned int num), \
525 TP_ARGS(blkno, index, start, num))
527 DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append);
529 DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records);
531 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log);
533 DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery);
535 DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num);
537 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery);
539 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks);
541 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc);
543 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs);
545 TRACE_EVENT(ocfs2_cache_block_dealloc,
546 TP_PROTO(int type, int slot, unsigned long long suballoc,
547 unsigned long long blkno, unsigned int bit),
548 TP_ARGS(type, slot, suballoc, blkno, bit),
552 __field(unsigned long long, suballoc)
553 __field(unsigned long long, blkno)
554 __field(unsigned int, bit)
557 __entry->type = type;
558 __entry->slot = slot;
559 __entry->suballoc = suballoc;
560 __entry->blkno = blkno;
563 TP_printk("%d %d %llu %llu %u",
564 __entry->type, __entry->slot, __entry->suballoc,
565 __entry->blkno, __entry->bit)
568 /* End of trace events for fs/ocfs2/alloc.c. */
570 /* Trace events for fs/ocfs2/localalloc.c. */
572 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes);
574 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local);
576 DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc);
578 DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery);
580 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits);
582 DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits);
584 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap);
586 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits);
588 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main);
590 TRACE_EVENT(ocfs2_sync_local_to_main_free,
591 TP_PROTO(int count, int bit, unsigned long long start_blk,
592 unsigned long long blkno),
593 TP_ARGS(count, bit, start_blk, blkno),
597 __field(unsigned long long, start_blk)
598 __field(unsigned long long, blkno)
601 __entry->count = count;
603 __entry->start_blk = start_blk;
604 __entry->blkno = blkno;
606 TP_printk("%d %d %llu %llu",
607 __entry->count, __entry->bit, __entry->start_blk,
611 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window);
613 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
615 /* End of trace events for fs/ocfs2/localalloc.c. */
617 /* Trace events for fs/ocfs2/resize.c. */
619 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
621 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
623 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
625 /* End of trace events for fs/ocfs2/resize.c. */
627 /* Trace events for fs/ocfs2/suballoc.c. */
629 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
631 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig);
633 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig);
635 DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc);
637 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc);
639 DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group);
641 DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group);
643 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits);
645 TRACE_EVENT(ocfs2_relink_block_group,
646 TP_PROTO(unsigned long long i_blkno, unsigned int chain,
647 unsigned long long bg_blkno,
648 unsigned long long prev_blkno),
649 TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno),
651 __field(unsigned long long, i_blkno)
652 __field(unsigned int, chain)
653 __field(unsigned long long, bg_blkno)
654 __field(unsigned long long, prev_blkno)
657 __entry->i_blkno = i_blkno;
658 __entry->chain = chain;
659 __entry->bg_blkno = bg_blkno;
660 __entry->prev_blkno = prev_blkno;
662 TP_printk("%llu %u %llu %llu",
663 __entry->i_blkno, __entry->chain, __entry->bg_blkno,
667 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits);
669 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block);
671 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block);
673 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin);
675 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ);
677 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end);
679 DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits);
681 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc);
683 DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits);
685 TRACE_EVENT(ocfs2_free_suballoc_bits,
686 TP_PROTO(unsigned long long inode, unsigned long long group,
687 unsigned int start_bit, unsigned int count),
688 TP_ARGS(inode, group, start_bit, count),
690 __field(unsigned long long, inode)
691 __field(unsigned long long, group)
692 __field(unsigned int, start_bit)
693 __field(unsigned int, count)
696 __entry->inode = inode;
697 __entry->group = group;
698 __entry->start_bit = start_bit;
699 __entry->count = count;
701 TP_printk("%llu %llu %u %u", __entry->inode, __entry->group,
702 __entry->start_bit, __entry->count)
705 TRACE_EVENT(ocfs2_free_clusters,
706 TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk,
707 unsigned int start_bit, unsigned int count),
708 TP_ARGS(bg_blkno, start_blk, start_bit, count),
710 __field(unsigned long long, bg_blkno)
711 __field(unsigned long long, start_blk)
712 __field(unsigned int, start_bit)
713 __field(unsigned int, count)
716 __entry->bg_blkno = bg_blkno;
717 __entry->start_blk = start_blk;
718 __entry->start_bit = start_bit;
719 __entry->count = count;
721 TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk,
722 __entry->start_bit, __entry->count)
725 DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit);
727 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit);
729 DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit);
731 /* End of trace events for fs/ocfs2/suballoc.c. */
733 /* Trace events for fs/ocfs2/refcounttree.c. */
735 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block);
737 DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees);
739 DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree);
741 DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno);
743 DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec);
745 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root);
747 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block);
749 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block);
751 DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops,
752 TP_PROTO(unsigned long long blkno, int index,
753 unsigned long long cpos,
754 unsigned int clusters, unsigned int refcount),
755 TP_ARGS(blkno, index, cpos, clusters, refcount),
757 __field(unsigned long long, blkno)
759 __field(unsigned long long, cpos)
760 __field(unsigned int, clusters)
761 __field(unsigned int, refcount)
764 __entry->blkno = blkno;
765 __entry->index = index;
766 __entry->cpos = cpos;
767 __entry->clusters = clusters;
768 __entry->refcount = refcount;
770 TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index,
771 __entry->cpos, __entry->clusters, __entry->refcount)
774 #define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \
775 DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \
776 TP_PROTO(unsigned long long blkno, int index, \
777 unsigned long long cpos, \
778 unsigned int count, unsigned int refcount), \
779 TP_ARGS(blkno, index, cpos, count, refcount))
781 DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec);
783 TRACE_EVENT(ocfs2_split_refcount_rec,
784 TP_PROTO(unsigned long long cpos,
785 unsigned int clusters, unsigned int refcount,
786 unsigned long long split_cpos,
787 unsigned int split_clusters, unsigned int split_refcount),
788 TP_ARGS(cpos, clusters, refcount,
789 split_cpos, split_clusters, split_refcount),
791 __field(unsigned long long, cpos)
792 __field(unsigned int, clusters)
793 __field(unsigned int, refcount)
794 __field(unsigned long long, split_cpos)
795 __field(unsigned int, split_clusters)
796 __field(unsigned int, split_refcount)
799 __entry->cpos = cpos;
800 __entry->clusters = clusters;
801 __entry->refcount = refcount;
802 __entry->split_cpos = split_cpos;
803 __entry->split_clusters = split_clusters;
804 __entry->split_refcount = split_refcount;
806 TP_printk("%llu %u %u %llu %u %u",
807 __entry->cpos, __entry->clusters, __entry->refcount,
808 __entry->split_cpos, __entry->split_clusters,
809 __entry->split_refcount)
812 DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert);
814 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin);
816 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change);
818 DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert);
820 DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split);
822 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent);
824 DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block);
826 DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec);
828 TRACE_EVENT(ocfs2_decrease_refcount,
829 TP_PROTO(unsigned long long owner,
830 unsigned long long cpos,
831 unsigned int len, int delete),
832 TP_ARGS(owner, cpos, len, delete),
834 __field(unsigned long long, owner)
835 __field(unsigned long long, cpos)
836 __field(unsigned int, len)
840 __entry->owner = owner;
841 __entry->cpos = cpos;
843 __entry->delete = delete;
845 TP_printk("%llu %llu %u %d",
846 __entry->owner, __entry->cpos, __entry->len, __entry->delete)
849 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted);
851 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits);
853 TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate,
854 TP_PROTO(int recs_add, unsigned long long cpos,
855 unsigned int clusters, unsigned long long r_cpos,
856 unsigned int r_clusters, unsigned int refcount, int index),
857 TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index),
859 __field(int, recs_add)
860 __field(unsigned long long, cpos)
861 __field(unsigned int, clusters)
862 __field(unsigned long long, r_cpos)
863 __field(unsigned int, r_clusters)
864 __field(unsigned int, refcount)
868 __entry->recs_add = recs_add;
869 __entry->cpos = cpos;
870 __entry->clusters = clusters;
871 __entry->r_cpos = r_cpos;
872 __entry->r_clusters = r_clusters;
873 __entry->refcount = refcount;
874 __entry->index = index;
876 TP_printk("%d %llu %u %llu %u %u %d",
877 __entry->recs_add, __entry->cpos, __entry->clusters,
878 __entry->r_cpos, __entry->r_clusters,
879 __entry->refcount, __entry->index)
882 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag);
884 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del);
886 DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators);
888 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page);
890 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd);
892 TRACE_EVENT(ocfs2_clear_ext_refcount,
893 TP_PROTO(unsigned long long ino, unsigned int cpos,
894 unsigned int len, unsigned int p_cluster,
895 unsigned int ext_flags),
896 TP_ARGS(ino, cpos, len, p_cluster, ext_flags),
898 __field(unsigned long long, ino)
899 __field(unsigned int, cpos)
900 __field(unsigned int, len)
901 __field(unsigned int, p_cluster)
902 __field(unsigned int, ext_flags)
906 __entry->cpos = cpos;
908 __entry->p_cluster = p_cluster;
909 __entry->ext_flags = ext_flags;
911 TP_printk("%llu %u %u %u %u",
912 __entry->ino, __entry->cpos, __entry->len,
913 __entry->p_cluster, __entry->ext_flags)
916 TRACE_EVENT(ocfs2_replace_clusters,
917 TP_PROTO(unsigned long long ino, unsigned int cpos,
918 unsigned int old, unsigned int new, unsigned int len,
919 unsigned int ext_flags),
920 TP_ARGS(ino, cpos, old, new, len, ext_flags),
922 __field(unsigned long long, ino)
923 __field(unsigned int, cpos)
924 __field(unsigned int, old)
925 __field(unsigned int, new)
926 __field(unsigned int, len)
927 __field(unsigned int, ext_flags)
931 __entry->cpos = cpos;
935 __entry->ext_flags = ext_flags;
937 TP_printk("%llu %u %u %u %u %u",
938 __entry->ino, __entry->cpos, __entry->old, __entry->new,
939 __entry->len, __entry->ext_flags)
942 DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable);
944 TRACE_EVENT(ocfs2_refcount_cow_hunk,
945 TP_PROTO(unsigned long long ino, unsigned int cpos,
946 unsigned int write_len, unsigned int max_cpos,
947 unsigned int cow_start, unsigned int cow_len),
948 TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len),
950 __field(unsigned long long, ino)
951 __field(unsigned int, cpos)
952 __field(unsigned int, write_len)
953 __field(unsigned int, max_cpos)
954 __field(unsigned int, cow_start)
955 __field(unsigned int, cow_len)
959 __entry->cpos = cpos;
960 __entry->write_len = write_len;
961 __entry->max_cpos = max_cpos;
962 __entry->cow_start = cow_start;
963 __entry->cow_len = cow_len;
965 TP_printk("%llu %u %u %u %u %u",
966 __entry->ino, __entry->cpos, __entry->write_len,
967 __entry->max_cpos, __entry->cow_start, __entry->cow_len)
970 /* End of trace events for fs/ocfs2/refcounttree.c. */
972 /* Trace events for fs/ocfs2/aops.c. */
974 DECLARE_EVENT_CLASS(ocfs2__get_block,
975 TP_PROTO(unsigned long long ino, unsigned long long iblock,
976 void *bh_result, int create),
977 TP_ARGS(ino, iblock, bh_result, create),
979 __field(unsigned long long, ino)
980 __field(unsigned long long, iblock)
981 __field(void *, bh_result)
986 __entry->iblock = iblock;
987 __entry->bh_result = bh_result;
988 __entry->create = create;
990 TP_printk("%llu %llu %p %d",
991 __entry->ino, __entry->iblock,
992 __entry->bh_result, __entry->create)
995 #define DEFINE_OCFS2_GET_BLOCK_EVENT(name) \
996 DEFINE_EVENT(ocfs2__get_block, name, \
997 TP_PROTO(unsigned long long ino, unsigned long long iblock, \
998 void *bh_result, int create), \
999 TP_ARGS(ino, iblock, bh_result, create))
1001 DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_symlink_get_block);
1003 DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_get_block);
1005 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end);
1007 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage);
1009 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage);
1011 DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap);
1013 TRACE_EVENT(ocfs2_try_to_write_inline_data,
1014 TP_PROTO(unsigned long long ino, unsigned int len,
1015 unsigned long long pos, unsigned int flags),
1016 TP_ARGS(ino, len, pos, flags),
1018 __field(unsigned long long, ino)
1019 __field(unsigned int, len)
1020 __field(unsigned long long, pos)
1021 __field(unsigned int, flags)
1027 __entry->flags = flags;
1029 TP_printk("%llu %u %llu 0x%x",
1030 __entry->ino, __entry->len, __entry->pos, __entry->flags)
1033 TRACE_EVENT(ocfs2_write_begin_nolock,
1034 TP_PROTO(unsigned long long ino,
1035 long long i_size, unsigned int i_clusters,
1036 unsigned long long pos, unsigned int len,
1037 unsigned int flags, void *page,
1038 unsigned int clusters, unsigned int extents_to_split),
1039 TP_ARGS(ino, i_size, i_clusters, pos, len, flags,
1040 page, clusters, extents_to_split),
1042 __field(unsigned long long, ino)
1043 __field(long long, i_size)
1044 __field(unsigned int, i_clusters)
1045 __field(unsigned long long, pos)
1046 __field(unsigned int, len)
1047 __field(unsigned int, flags)
1048 __field(void *, page)
1049 __field(unsigned int, clusters)
1050 __field(unsigned int, extents_to_split)
1054 __entry->i_size = i_size;
1055 __entry->i_clusters = i_clusters;
1058 __entry->flags = flags;
1059 __entry->page = page;
1060 __entry->clusters = clusters;
1061 __entry->extents_to_split = extents_to_split;
1063 TP_printk("%llu %lld %u %llu %u %u %p %u %u",
1064 __entry->ino, __entry->i_size, __entry->i_clusters,
1065 __entry->pos, __entry->len,
1066 __entry->flags, __entry->page, __entry->clusters,
1067 __entry->extents_to_split)
1070 TRACE_EVENT(ocfs2_write_end_inline,
1071 TP_PROTO(unsigned long long ino,
1072 unsigned long long pos, unsigned int copied,
1073 unsigned int id_count, unsigned int features),
1074 TP_ARGS(ino, pos, copied, id_count, features),
1076 __field(unsigned long long, ino)
1077 __field(unsigned long long, pos)
1078 __field(unsigned int, copied)
1079 __field(unsigned int, id_count)
1080 __field(unsigned int, features)
1085 __entry->copied = copied;
1086 __entry->id_count = id_count;
1087 __entry->features = features;
1089 TP_printk("%llu %llu %u %u %u",
1090 __entry->ino, __entry->pos, __entry->copied,
1091 __entry->id_count, __entry->features)
1094 /* End of trace events for fs/ocfs2/aops.c. */
1095 #endif /* _TRACE_OCFS2_H */
1097 /* This part must be outside protection */
1098 #undef TRACE_INCLUDE_PATH
1099 #define TRACE_INCLUDE_PATH .
1100 #define TRACE_INCLUDE_FILE ocfs2_trace
1101 #include <trace/define_trace.h>