#include <linux/tracepoint.h>
#include <sys/types.h>
+#include <sys/trace_common.h> /* For ZIO macros */
/*
* Generic support for one argument tracepoints of the form:
* DTRACE_PROBE1(...,
* arc_buf_hdr_t *, ...);
*/
-
+/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class,
TP_PROTO(arc_buf_hdr_t *ab),
TP_ARGS(ab),
__array(uint64_t, hdr_dva_word, 2)
__field(uint64_t, hdr_birth)
__field(uint32_t, hdr_flags)
- __field(uint32_t, hdr_datacnt)
+ __field(uint32_t, hdr_bufcnt)
__field(arc_buf_contents_t, hdr_type)
- __field(uint64_t, hdr_size)
+ __field(uint16_t, hdr_psize)
+ __field(uint16_t, hdr_lsize)
__field(uint64_t, hdr_spa)
__field(arc_state_type_t, hdr_state_type)
__field(clock_t, hdr_access)
__entry->hdr_dva_word[1] = ab->b_dva.dva_word[1];
__entry->hdr_birth = ab->b_birth;
__entry->hdr_flags = ab->b_flags;
- __entry->hdr_datacnt = ab->b_l1hdr.b_datacnt;
- __entry->hdr_size = ab->b_size;
+ __entry->hdr_bufcnt = ab->b_l1hdr.b_bufcnt;
+ __entry->hdr_psize = ab->b_psize;
+ __entry->hdr_lsize = ab->b_lsize;
__entry->hdr_spa = ab->b_spa;
__entry->hdr_state_type = ab->b_l1hdr.b_state->arcs_state;
__entry->hdr_access = ab->b_l1hdr.b_arc_access;
__entry->hdr_refcount = ab->b_l1hdr.b_refcnt.rc_count;
),
TP_printk("hdr { dva 0x%llx:0x%llx birth %llu "
- "flags 0x%x datacnt %u type %u size %llu spa %llu "
+ "flags 0x%x bufcnt %u type %u psize %u lsize %u spa %llu "
"state_type %u access %lu mru_hits %u mru_ghost_hits %u "
"mfu_hits %u mfu_ghost_hits %u l2_hits %u refcount %lli }",
__entry->hdr_dva_word[0], __entry->hdr_dva_word[1],
__entry->hdr_birth, __entry->hdr_flags,
- __entry->hdr_datacnt, __entry->hdr_type, __entry->hdr_size,
- __entry->hdr_spa, __entry->hdr_state_type,
+ __entry->hdr_bufcnt, __entry->hdr_type, __entry->hdr_psize,
+ __entry->hdr_lsize, __entry->hdr_spa, __entry->hdr_state_type,
__entry->hdr_access, __entry->hdr_mru_hits,
__entry->hdr_mru_ghost_hits, __entry->hdr_mfu_hits,
__entry->hdr_mfu_ghost_hits, __entry->hdr_l2_hits,
__entry->hdr_refcount)
);
+/* END CSTYLED */
+/* BEGIN CSTYLED */
#define DEFINE_ARC_BUF_HDR_EVENT(name) \
DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \
TP_PROTO(arc_buf_hdr_t *ab), \
TP_ARGS(ab))
+/* END CSTYLED */
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete);
DEFINE_ARC_BUF_HDR_EVENT(zfs_new_state__mru);
DEFINE_ARC_BUF_HDR_EVENT(zfs_new_state__mfu);
+DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__sync__wait__for__async);
+DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__demand__hit__predictive__prefetch);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__miss);
* vdev_t *, ...,
* zio_t *, ...);
*/
-
-#define ZIO_TP_STRUCT_ENTRY \
- __field(zio_type_t, zio_type) \
- __field(int, zio_cmd) \
- __field(zio_priority_t, zio_priority) \
- __field(uint64_t, zio_size) \
- __field(uint64_t, zio_orig_size) \
- __field(uint64_t, zio_offset) \
- __field(hrtime_t, zio_timestamp) \
- __field(hrtime_t, zio_delta) \
- __field(uint64_t, zio_delay) \
- __field(enum zio_flag, zio_flags) \
- __field(enum zio_stage, zio_stage) \
- __field(enum zio_stage, zio_pipeline) \
- __field(enum zio_flag, zio_orig_flags) \
- __field(enum zio_stage, zio_orig_stage) \
- __field(enum zio_stage, zio_orig_pipeline) \
- __field(uint8_t, zio_reexecute) \
- __field(uint64_t, zio_txg) \
- __field(int, zio_error) \
- __field(uint64_t, zio_ena) \
- \
- __field(enum zio_checksum, zp_checksum) \
- __field(enum zio_compress, zp_compress) \
- __field(dmu_object_type_t, zp_type) \
- __field(uint8_t, zp_level) \
- __field(uint8_t, zp_copies) \
- __field(boolean_t, zp_dedup) \
- __field(boolean_t, zp_dedup_verify) \
- __field(boolean_t, zp_nopwrite)
-
-#define ZIO_TP_FAST_ASSIGN \
- __entry->zio_type = zio->io_type; \
- __entry->zio_cmd = zio->io_cmd; \
- __entry->zio_priority = zio->io_priority; \
- __entry->zio_size = zio->io_size; \
- __entry->zio_orig_size = zio->io_orig_size; \
- __entry->zio_offset = zio->io_offset; \
- __entry->zio_timestamp = zio->io_timestamp; \
- __entry->zio_delta = zio->io_delta; \
- __entry->zio_delay = zio->io_delay; \
- __entry->zio_flags = zio->io_flags; \
- __entry->zio_stage = zio->io_stage; \
- __entry->zio_pipeline = zio->io_pipeline; \
- __entry->zio_orig_flags = zio->io_orig_flags; \
- __entry->zio_orig_stage = zio->io_orig_stage; \
- __entry->zio_orig_pipeline = zio->io_orig_pipeline; \
- __entry->zio_reexecute = zio->io_reexecute; \
- __entry->zio_txg = zio->io_txg; \
- __entry->zio_error = zio->io_error; \
- __entry->zio_ena = zio->io_ena; \
- \
- __entry->zp_checksum = zio->io_prop.zp_checksum; \
- __entry->zp_compress = zio->io_prop.zp_compress; \
- __entry->zp_type = zio->io_prop.zp_type; \
- __entry->zp_level = zio->io_prop.zp_level; \
- __entry->zp_copies = zio->io_prop.zp_copies; \
- __entry->zp_dedup = zio->io_prop.zp_dedup; \
- __entry->zp_nopwrite = zio->io_prop.zp_nopwrite; \
- __entry->zp_dedup_verify = zio->io_prop.zp_dedup_verify;
-
-#define ZIO_TP_PRINTK_FMT \
- "zio { type %u cmd %i prio %u size %llu orig_size %llu " \
- "offset %llu timestamp %llu delta %llu delay %llu " \
- "flags 0x%x stage 0x%x pipeline 0x%x orig_flags 0x%x " \
- "orig_stage 0x%x orig_pipeline 0x%x reexecute %u " \
- "txg %llu error %d ena %llu prop { checksum %u compress %u " \
- "type %u level %u copies %u dedup %u dedup_verify %u nopwrite %u } }"
-
-#define ZIO_TP_PRINTK_ARGS \
- __entry->zio_type, __entry->zio_cmd, __entry->zio_priority, \
- __entry->zio_size, __entry->zio_orig_size, __entry->zio_offset, \
- __entry->zio_timestamp, __entry->zio_delta, __entry->zio_delay, \
- __entry->zio_flags, __entry->zio_stage, __entry->zio_pipeline, \
- __entry->zio_orig_flags, __entry->zio_orig_stage, \
- __entry->zio_orig_pipeline, __entry->zio_reexecute, \
- __entry->zio_txg, __entry->zio_error, __entry->zio_ena, \
- __entry->zp_checksum, __entry->zp_compress, __entry->zp_type, \
- __entry->zp_level, __entry->zp_copies, __entry->zp_dedup, \
- __entry->zp_dedup_verify, __entry->zp_nopwrite
-
+/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_l2arc_rw_class,
TP_PROTO(vdev_t *vd, zio_t *zio),
TP_ARGS(vd, zio),
ZIO_TP_PRINTK_FMT, __entry->vdev_id, __entry->vdev_guid,
__entry->vdev_state, ZIO_TP_PRINTK_ARGS)
);
+/* END CSTYLED */
+/* BEGIN CSTYLED */
#define DEFINE_L2ARC_RW_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_rw_class, name, \
TP_PROTO(vdev_t *vd, zio_t *zio), \
TP_ARGS(vd, zio))
+/* END CSTYLED */
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read);
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write);
* zio_t *, ...,
* l2arc_write_callback_t *, ...);
*/
-
+/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class,
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb),
TP_ARGS(zio, cb),
TP_fast_assign(ZIO_TP_FAST_ASSIGN),
TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS)
);
+/* END CSTYLED */
+/* BEGIN CSTYLED */
#define DEFINE_L2ARC_IODONE_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_iodone_class, name, \
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
TP_ARGS(zio, cb))
+/* END CSTYLED */
DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone);
* uint64_t,
* const zbookmark_phys_t *);
*/
-
+/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_arc_miss_class,
TP_PROTO(arc_buf_hdr_t *hdr,
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb),
__array(uint64_t, hdr_dva_word, 2)
__field(uint64_t, hdr_birth)
__field(uint32_t, hdr_flags)
- __field(uint32_t, hdr_datacnt)
+ __field(uint32_t, hdr_bufcnt)
__field(arc_buf_contents_t, hdr_type)
- __field(uint64_t, hdr_size)
+ __field(uint16_t, hdr_psize)
+ __field(uint16_t, hdr_lsize)
__field(uint64_t, hdr_spa)
__field(arc_state_type_t, hdr_state_type)
__field(clock_t, hdr_access)
__entry->hdr_dva_word[1] = hdr->b_dva.dva_word[1];
__entry->hdr_birth = hdr->b_birth;
__entry->hdr_flags = hdr->b_flags;
- __entry->hdr_datacnt = hdr->b_l1hdr.b_datacnt;
- __entry->hdr_size = hdr->b_size;
+ __entry->hdr_bufcnt = hdr->b_l1hdr.b_bufcnt;
+ __entry->hdr_psize = hdr->b_psize;
+ __entry->hdr_lsize = hdr->b_lsize;
__entry->hdr_spa = hdr->b_spa;
__entry->hdr_state_type = hdr->b_l1hdr.b_state->arcs_state;
__entry->hdr_access = hdr->b_l1hdr.b_arc_access;
__entry->zb_blkid = zb->zb_blkid;
),
TP_printk("hdr { dva 0x%llx:0x%llx birth %llu "
- "flags 0x%x datacnt %u size %llu spa %llu state_type %u "
+ "flags 0x%x bufcnt %u psize %u lsize %u spa %llu state_type %u "
"access %lu mru_hits %u mru_ghost_hits %u mfu_hits %u "
"mfu_ghost_hits %u l2_hits %u refcount %lli } "
"bp { dva0 0x%llx:0x%llx dva1 0x%llx:0x%llx dva2 "
"blkid %llu }",
__entry->hdr_dva_word[0], __entry->hdr_dva_word[1],
__entry->hdr_birth, __entry->hdr_flags,
- __entry->hdr_datacnt, __entry->hdr_size,
+ __entry->hdr_bufcnt, __entry->hdr_psize, __entry->hdr_lsize,
__entry->hdr_spa, __entry->hdr_state_type, __entry->hdr_access,
__entry->hdr_mru_hits, __entry->hdr_mru_ghost_hits,
__entry->hdr_mfu_hits, __entry->hdr_mfu_ghost_hits,
__entry->bp_lsize, __entry->zb_objset, __entry->zb_object,
__entry->zb_level, __entry->zb_blkid)
);
+/* END CSTYLED */
+/* BEGIN CSTYLED */
#define DEFINE_ARC_MISS_EVENT(name) \
DEFINE_EVENT(zfs_arc_miss_class, name, \
TP_PROTO(arc_buf_hdr_t *hdr, \
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
TP_ARGS(hdr, bp, size, zb))
+/* END CSTYLED */
DEFINE_ARC_MISS_EVENT(zfs_arc__miss);
/*
* uint64_t, ...,
* boolean_t, ...);
*/
-
+/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_l2arc_evict_class,
TP_PROTO(l2arc_dev_t *dev,
list_t *buflist, uint64_t taddr, boolean_t all),
__entry->l2ad_end, __entry->l2ad_first, __entry->l2ad_writing,
__entry->taddr, __entry->all)
);
+/* END CSTYLED */
+/* BEGIN CSTYLED */
#define DEFINE_L2ARC_EVICT_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_evict_class, name, \
TP_PROTO(l2arc_dev_t *dev, \
list_t *buflist, uint64_t taddr, boolean_t all), \
TP_ARGS(dev, buflist, taddr, all))
+/* END CSTYLED */
DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict);
#endif /* _TRACE_ARC_H */