aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-07-16 07:03:36 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 07:57:39 -0400
commit599c75ec3f7f3b606e8a0a684c00f12190712de8 (patch)
tree3c7b7d82354eef5f507d8b85efda81fd50c514cf /include/trace/events
parent1095cc0d924e1c61fb34e0bfcec049d1fbcca77c (diff)
Btrfs/tracepoint: update delayed ref tracepoints
This shows exactly how btrfs processes the delayed refs onto disks, which is very helpful on understanding delayed ref mechanism and debugging related bugs. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/btrfs.h60
1 files changed, 57 insertions, 3 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 2902657ba766..45702c3c3837 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -439,7 +439,7 @@ TRACE_EVENT(btrfs_sync_fs,
439 { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) 439 { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" })
440 440
441 441
442TRACE_EVENT(btrfs_delayed_tree_ref, 442DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref,
443 443
444 TP_PROTO(struct btrfs_delayed_ref_node *ref, 444 TP_PROTO(struct btrfs_delayed_ref_node *ref,
445 struct btrfs_delayed_tree_ref *full_ref, 445 struct btrfs_delayed_tree_ref *full_ref,
@@ -481,7 +481,25 @@ TRACE_EVENT(btrfs_delayed_tree_ref,
481 (unsigned long long)__entry->seq) 481 (unsigned long long)__entry->seq)
482); 482);
483 483
484TRACE_EVENT(btrfs_delayed_data_ref, 484DEFINE_EVENT(btrfs_delayed_tree_ref, add_delayed_tree_ref,
485
486 TP_PROTO(struct btrfs_delayed_ref_node *ref,
487 struct btrfs_delayed_tree_ref *full_ref,
488 int action),
489
490 TP_ARGS(ref, full_ref, action)
491);
492
493DEFINE_EVENT(btrfs_delayed_tree_ref, run_delayed_tree_ref,
494
495 TP_PROTO(struct btrfs_delayed_ref_node *ref,
496 struct btrfs_delayed_tree_ref *full_ref,
497 int action),
498
499 TP_ARGS(ref, full_ref, action)
500);
501
502DECLARE_EVENT_CLASS(btrfs_delayed_data_ref,
485 503
486 TP_PROTO(struct btrfs_delayed_ref_node *ref, 504 TP_PROTO(struct btrfs_delayed_ref_node *ref,
487 struct btrfs_delayed_data_ref *full_ref, 505 struct btrfs_delayed_data_ref *full_ref,
@@ -527,7 +545,25 @@ TRACE_EVENT(btrfs_delayed_data_ref,
527 (unsigned long long)__entry->seq) 545 (unsigned long long)__entry->seq)
528); 546);
529 547
530TRACE_EVENT(btrfs_delayed_ref_head, 548DEFINE_EVENT(btrfs_delayed_data_ref, add_delayed_data_ref,
549
550 TP_PROTO(struct btrfs_delayed_ref_node *ref,
551 struct btrfs_delayed_data_ref *full_ref,
552 int action),
553
554 TP_ARGS(ref, full_ref, action)
555);
556
557DEFINE_EVENT(btrfs_delayed_data_ref, run_delayed_data_ref,
558
559 TP_PROTO(struct btrfs_delayed_ref_node *ref,
560 struct btrfs_delayed_data_ref *full_ref,
561 int action),
562
563 TP_ARGS(ref, full_ref, action)
564);
565
566DECLARE_EVENT_CLASS(btrfs_delayed_ref_head,
531 567
532 TP_PROTO(struct btrfs_delayed_ref_node *ref, 568 TP_PROTO(struct btrfs_delayed_ref_node *ref,
533 struct btrfs_delayed_ref_head *head_ref, 569 struct btrfs_delayed_ref_head *head_ref,
@@ -556,6 +592,24 @@ TRACE_EVENT(btrfs_delayed_ref_head,
556 __entry->is_data) 592 __entry->is_data)
557); 593);
558 594
595DEFINE_EVENT(btrfs_delayed_ref_head, add_delayed_ref_head,
596
597 TP_PROTO(struct btrfs_delayed_ref_node *ref,
598 struct btrfs_delayed_ref_head *head_ref,
599 int action),
600
601 TP_ARGS(ref, head_ref, action)
602);
603
604DEFINE_EVENT(btrfs_delayed_ref_head, run_delayed_ref_head,
605
606 TP_PROTO(struct btrfs_delayed_ref_node *ref,
607 struct btrfs_delayed_ref_head *head_ref,
608 int action),
609
610 TP_ARGS(ref, head_ref, action)
611);
612
559#define show_chunk_type(type) \ 613#define show_chunk_type(type) \
560 __print_flags(type, "|", \ 614 __print_flags(type, "|", \
561 { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ 615 { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \