summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-04-12 20:27:00 -0400
committerDavid Sterba <dsterba@suse.com>2024-05-07 21:31:04 +0200
commit1bff6d4f873790cfc675afce9860208576508c5a (patch)
treec7a899e91abd0fae37d1470744d8be94e32ac4cc /include/trace
parent0ea4703cc27e4e0f4fd8a9403ecae21a8879e7e0 (diff)
btrfs: simplify delayed ref tracepoints
Now that all of the delayed ref information is in the delayed ref node, drastically simplify the delayed ref tracepoints by simply passing in the btrfs_delayed_ref_node and populating the tracepoints with the values from the structure itself. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/btrfs.h54
1 files changed, 21 insertions, 33 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 766cfd48386c..dae29f6d6b4c 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -868,11 +868,9 @@ TRACE_EVENT(btrfs_add_block_group,
DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_tree_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action),
+ TP_ARGS(fs_info, ref),
TP_STRUCT__entry_btrfs(
__field( u64, bytenr )
@@ -888,10 +886,10 @@ DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref,
TP_fast_assign_btrfs(fs_info,
__entry->bytenr = ref->bytenr;
__entry->num_bytes = ref->num_bytes;
- __entry->action = action;
- __entry->parent = full_ref->parent;
- __entry->ref_root = full_ref->root;
- __entry->level = full_ref->level;
+ __entry->action = ref->action;
+ __entry->parent = ref->tree_ref.parent;
+ __entry->ref_root = ref->tree_ref.root;
+ __entry->level = ref->tree_ref.level;
__entry->type = ref->type;
__entry->seq = ref->seq;
),
@@ -911,31 +909,25 @@ DECLARE_EVENT_CLASS(btrfs_delayed_tree_ref,
DEFINE_EVENT(btrfs_delayed_tree_ref, add_delayed_tree_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_tree_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action)
+ TP_ARGS(fs_info, ref)
);
DEFINE_EVENT(btrfs_delayed_tree_ref, run_delayed_tree_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_tree_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action)
+ TP_ARGS(fs_info, ref)
);
DECLARE_EVENT_CLASS(btrfs_delayed_data_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_data_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action),
+ TP_ARGS(fs_info, ref),
TP_STRUCT__entry_btrfs(
__field( u64, bytenr )
@@ -952,11 +944,11 @@ DECLARE_EVENT_CLASS(btrfs_delayed_data_ref,
TP_fast_assign_btrfs(fs_info,
__entry->bytenr = ref->bytenr;
__entry->num_bytes = ref->num_bytes;
- __entry->action = action;
- __entry->parent = full_ref->parent;
- __entry->ref_root = full_ref->root;
- __entry->owner = full_ref->objectid;
- __entry->offset = full_ref->offset;
+ __entry->action = ref->action;
+ __entry->parent = ref->data_ref.parent;
+ __entry->ref_root = ref->data_ref.root;
+ __entry->owner = ref->data_ref.objectid;
+ __entry->offset = ref->data_ref.offset;
__entry->type = ref->type;
__entry->seq = ref->seq;
),
@@ -978,21 +970,17 @@ DECLARE_EVENT_CLASS(btrfs_delayed_data_ref,
DEFINE_EVENT(btrfs_delayed_data_ref, add_delayed_data_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_data_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action)
+ TP_ARGS(fs_info, ref)
);
DEFINE_EVENT(btrfs_delayed_data_ref, run_delayed_data_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
- const struct btrfs_delayed_ref_node *ref,
- const struct btrfs_delayed_data_ref *full_ref,
- int action),
+ const struct btrfs_delayed_ref_node *ref),
- TP_ARGS(fs_info, ref, full_ref, action)
+ TP_ARGS(fs_info, ref)
);
DECLARE_EVENT_CLASS(btrfs_delayed_ref_head,