X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fbtrfs.h;h=ea6710f3dba871d8e5fb844475a36e2083c6c262;hb=507143bc5de50c0e5493d63fb5c300fa42326842;hp=11b501a28751e1f404d507f8a6fa25ba0c3506c1;hpb=f127e61ee231d002fb9a7803643a157e06f6d2e2;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h index 11b501a2..ea6710f3 100644 --- a/instrumentation/events/lttng-module/btrfs.h +++ b/instrumentation/events/lttng-module/btrfs.h @@ -4,9 +4,8 @@ #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_BTRFS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include -#include #include #ifndef _TRACE_BTRFS_DEF_ @@ -223,6 +222,18 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, ) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) +LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, + + TP_PROTO(struct btrfs_fs_info *fs_info, int wait), + + TP_ARGS(fs_info, wait), + + TP_FIELDS( + ctf_integer(int, wait, wait) + ) +) +#else LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, TP_PROTO(int wait), @@ -233,7 +244,48 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, ctf_integer(int, wait, wait) ) ) +#endif + +LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, + + TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_block_group_cache *block_group, int create), + + TP_ARGS(fs_info, block_group, create), + + TP_FIELDS( + ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) + ctf_integer(u64, offset, block_group->key.objectid) + ctf_integer(u64, size, block_group->key.offset) + ctf_integer(u64, flags, block_group->flags) + ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) + ctf_integer(u64, bytes_super, block_group->bytes_super) + ctf_integer(int, create, create) + ) +) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) +LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, + + TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_delayed_ref_node *ref, + struct btrfs_delayed_tree_ref *full_ref, + int action), + + TP_ARGS(fs_info, ref, full_ref, action), + + TP_FIELDS( + ctf_integer(u64, bytenr, ref->bytenr) + ctf_integer(u64, num_bytes, ref->num_bytes) + ctf_integer(int, action, action) + ctf_integer(u64, parent, full_ref->parent) + ctf_integer(u64, ref_root, full_ref->root) + ctf_integer(int, level, full_ref->level) + ctf_integer(int, type, ref->type) + ctf_integer(u64, seq, ref->seq) + ) +) +#else LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, TP_PROTO(struct btrfs_delayed_ref_node *ref, @@ -255,6 +307,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, #endif ) ) +#endif LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, @@ -279,6 +332,25 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, ) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) +LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, + + TP_PROTO(struct btrfs_fs_info *fs_info, + struct btrfs_delayed_ref_node *ref, + struct btrfs_delayed_ref_head *head_ref, + int action), + + TP_ARGS(fs_info, ref, head_ref, action), + + TP_FIELDS( + ctf_integer(u64, bytenr, ref->bytenr) + ctf_integer(u64, num_bytes, ref->num_bytes) + ctf_integer(int, action, action) + ctf_integer(int, is_data, head_ref->is_data) + ) +) + +#else LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, TP_PROTO(struct btrfs_delayed_ref_node *ref, @@ -294,6 +366,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, ctf_integer(int, is_data, head_ref->is_data) ) ) +#endif LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, @@ -499,7 +572,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, TP_ARGS(state, mask, IP), TP_FIELDS( - ctf_integer(struct extent_state *, state, state) + ctf_integer_hex(struct extent_state *, state, state) ctf_integer(gfp_t, mask, mask) ctf_integer(unsigned long, ip, IP) ) @@ -514,7 +587,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, TP_ARGS(state, IP), TP_FIELDS( - ctf_integer(struct extent_state *, state, state) + ctf_integer_hex(struct extent_state *, state, state) ctf_integer(unsigned long, ip, IP) ) ) @@ -523,4 +596,4 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, #endif /* LTTNG_TRACE_BTRFS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include