diff options
author | 2018-09-27 14:42:29 +0800 | |
---|---|---|
committer | 2018-10-15 17:23:36 +0200 | |
commit | c337e7b02f71c4b2f6f2138807a284d2c4e1ac5e (patch) | |
tree | 136cbe7591e6c48aa1b61a6d470d68e1dcdbe0a1 /include/trace | |
parent | btrfs: relocation: Add basic extent backref related comments for build_backre... (diff) | |
download | linux-c337e7b02f71c4b2f6f2138807a284d2c4e1ac5e.tar.gz linux-c337e7b02f71c4b2f6f2138807a284d2c4e1ac5e.tar.bz2 linux-c337e7b02f71c4b2f6f2138807a284d2c4e1ac5e.zip |
btrfs: qgroup: Introduce trace event to analyse the number of dirty extents accounted
Number of qgroup dirty extents is directly linked to the performance
overhead, so add a new trace event, trace_qgroup_num_dirty_extents(), to
record how many dirty extents is processed in
btrfs_qgroup_account_extents().
This will be pretty handy to analyze later balance performance
improvement.
Signed-off-by: Qu Wenruo <wqu@suse.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.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index abe3ff774f58..8568946f491d 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -1576,6 +1576,27 @@ DEFINE_EVENT(btrfs_qgroup_extent, btrfs_qgroup_trace_extent, TP_ARGS(fs_info, rec) ); +TRACE_EVENT(qgroup_num_dirty_extents, + + TP_PROTO(const struct btrfs_fs_info *fs_info, u64 transid, + u64 num_dirty_extents), + + TP_ARGS(fs_info, transid, num_dirty_extents), + + TP_STRUCT__entry_btrfs( + __field( u64, transid ) + __field( u64, num_dirty_extents ) + ), + + TP_fast_assign_btrfs(fs_info, + __entry->transid = transid; + __entry->num_dirty_extents = num_dirty_extents; + ), + + TP_printk_btrfs("transid=%llu num_dirty_extents=%llu", + __entry->transid, __entry->num_dirty_extents) +); + TRACE_EVENT(btrfs_qgroup_account_extent, TP_PROTO(const struct btrfs_fs_info *fs_info, u64 transid, u64 bytenr, |