Add ordered extents tracepoints to btrfs probe
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 21 Nov 2022 20:51:21 +0000 (15:51 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Jun 2023 14:13:36 +0000 (10:13 -0400)
See upstream commit:

  commit 5bea2508811ec76105b01c90c1f1661024c257a9
  Author: Johannes Thumshirn <johannes.thumshirn@wdc.com>
  Date:   Thu Jun 9 09:28:04 2022 -0700

    btrfs: add tracepoints for ordered extents

    When debugging a reference counting issue with ordered extents, I've found
    we're lacking a lot of tracepoint coverage in the ordered extent code.

    Close these gaps by adding tracepoints after every refcount_inc() in the
    ordered extent code.

Change-Id: I3af5bd593f4b7beb835f4c87442e7e1d407a2e3d
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/btrfs.h

index f370de68c75797d7828e785b2c58ae66ef0dc37c..b14f97ddf9344d9c9d81844df20b0a3818508894 100644 (file)
@@ -600,6 +600,72 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
 )
 #endif
 
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,0,0))
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_range,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first_range,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_for_logging,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_lookup_first,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_split,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_dec_test_pending,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_mark_finished,
+
+       TP_PROTO(const struct btrfs_inode *inode,
+               const struct btrfs_ordered_extent *ordered),
+
+       TP_ARGS(inode, ordered)
+)
+#endif
+
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook,
 
This page took 0.027869 seconds and 4 git commands to generate.