config: remove HAVE_DECLARE_EVENT_CLASS

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
This commit is contained in:
Rob Norris 2024-08-05 22:58:49 +10:00
parent d3b849700b
commit 43bc5e833c
17 changed files with 2 additions and 1645 deletions

View File

@ -1,55 +0,0 @@
dnl #
dnl # Ensure the DECLARE_EVENT_CLASS macro is available to non-GPL modules.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_DECLARE_EVENT_CLASS], [
AC_MSG_CHECKING([whether DECLARE_EVENT_CLASS() is available])
ZFS_LINUX_TRY_COMPILE_HEADER([
#include <linux/module.h>
MODULE_LICENSE("$ZFS_META_LICENSE");
#define CREATE_TRACE_POINTS
#include "conftest.h"
],[
trace_zfs_autoconf_event_one(1UL);
trace_zfs_autoconf_event_two(2UL);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DECLARE_EVENT_CLASS, 1,
[DECLARE_EVENT_CLASS() is available])
],[
AC_MSG_RESULT(no)
],[
#if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
#define _CONFTEST_H
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#include <linux/tracepoint.h>
DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
TP_PROTO(unsigned long i),
TP_ARGS(i),
TP_STRUCT__entry(
__field(unsigned long, i)
),
TP_fast_assign(
__entry->i = i;
),
TP_printk("i = %lu", __entry->i)
);
#define DEFINE_AUTOCONF_EVENT(name) \
DEFINE_EVENT(zfs_autoconf_event_class, name, \
TP_PROTO(unsigned long i), \
TP_ARGS(i))
DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
#endif /* _CONFTEST_H */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_FILE conftest
#include <trace/define_trace.h>
])
])

View File

@ -16,7 +16,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_OBJTOOL_HEADER
ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T
ZFS_AC_KERNEL_MISC_MINOR
ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
dnl # Parallel ZFS_LINUX_TEST_SRC / ZFS_LINUX_TEST_RESULT tests
ZFS_AC_KERNEL_TEST_SRC

View File

@ -22,6 +22,8 @@
#if defined(_KERNEL)
/*
* XXX REWRITE ME (and all the other trace comments) -- robn, 2024-08-05
*
* Calls to DTRACE_PROBE* are mapped to standard Linux kernel trace points
* when they are available(when HAVE_DECLARE_EVENT_CLASS is defined). The
* tracepoint event class definitions are found in the general tracing
@ -47,46 +49,6 @@
* avoid undefined function errors.
*/
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#if !defined(_TRACE_ZFS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ZFS_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* DTRACE_PROBE with 0 arguments is not currently available with
* tracepoint events
*/
#define DTRACE_PROBE(name) \
((void)0)
#define DTRACE_PROBE1(name, t1, arg1) \
trace_zfs_##name((arg1))
#define DTRACE_PROBE2(name, t1, arg1, t2, arg2) \
trace_zfs_##name((arg1), (arg2))
#define DTRACE_PROBE3(name, t1, arg1, t2, arg2, t3, arg3) \
trace_zfs_##name((arg1), (arg2), (arg3))
#define DTRACE_PROBE4(name, t1, arg1, t2, arg2, t3, arg3, t4, arg4) \
trace_zfs_##name((arg1), (arg2), (arg3), (arg4))
#endif /* _TRACE_ZFS_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace
#include <trace/define_trace.h>
#else /* HAVE_DECLARE_EVENT_CLASS */
#define DTRACE_PROBE(name) \
trace_zfs_##name()
@ -171,5 +133,4 @@ EXPORT_SYMBOL(trace_zfs_##name)
#define DEFINE_DTRACE_PROBE4(name) PROTO_DTRACE_PROBE4(name)
#endif /* CREATE_TRACE_POINTS */
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,54 +20,6 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_taskq
#if !defined(_TRACE_TASKQ_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_TASKQ_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for single argument tracepoints of the form:
*
* DTRACE_PROBE1(...,
* taskq_ent_t *, ...);
*/
DECLARE_EVENT_CLASS(zfs_taskq_ent_class,
TP_PROTO(taskq_ent_t *taskq_ent),
TP_ARGS(taskq_ent),
TP_STRUCT__entry(__field(taskq_ent_t *, taskq_ent)),
TP_fast_assign(
__entry->taskq_ent = taskq_ent;
),
TP_printk("taskq_ent %p", __entry->taskq_ent)
);
#define DEFINE_TASKQ_EVENT(name) \
DEFINE_EVENT(zfs_taskq_ent_class, name, \
TP_PROTO(taskq_ent_t *taskq_ent), \
TP_ARGS(taskq_ent))
DEFINE_TASKQ_EVENT(zfs_taskq_ent__birth);
DEFINE_TASKQ_EVENT(zfs_taskq_ent__start);
DEFINE_TASKQ_EVENT(zfs_taskq_ent__finish);
#endif /* _TRACE_TASKQ_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_taskq
#include <trace/define_trace.h>
#else
/*
* When tracepoints are not available, a DEFINE_DTRACE_PROBE* macro is
* needed for each DTRACE_PROBE. These will be used to generate stub
@ -79,5 +31,4 @@ DEFINE_DTRACE_PROBE1(taskq_ent__birth);
DEFINE_DTRACE_PROBE1(taskq_ent__start);
DEFINE_DTRACE_PROBE1(taskq_ent__finish);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,141 +20,9 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_acl
#if !defined(_TRACE_ACL_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ACL_H
#include <linux/tracepoint.h>
#include <linux/vfs_compat.h>
#include <sys/types.h>
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* znode_t *, ...,
* zfs_ace_hdr_t *, ...,
* uint32_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_ace_class,
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched),
TP_ARGS(zn, ace, mask_matched),
TP_STRUCT__entry(
__field(uint64_t, z_id)
__field(uint8_t, z_unlinked)
__field(uint8_t, z_atime_dirty)
__field(uint8_t, z_zn_prefetch)
__field(uint_t, z_blksz)
__field(uint_t, z_seq)
__field(uint64_t, z_mapcnt)
__field(uint64_t, z_size)
__field(uint64_t, z_pflags)
__field(uint32_t, z_sync_cnt)
__field(uint32_t, z_sync_writes_cnt)
__field(uint32_t, z_async_writes_cnt)
__field(mode_t, z_mode)
__field(boolean_t, z_is_sa)
__field(boolean_t, z_is_ctldir)
__field(uint32_t, i_uid)
__field(uint32_t, i_gid)
__field(unsigned long, i_ino)
__field(unsigned int, i_nlink)
__field(loff_t, i_size)
__field(unsigned int, i_blkbits)
__field(unsigned short, i_bytes)
__field(umode_t, i_mode)
__field(__u32, i_generation)
__field(uint16_t, z_type)
__field(uint16_t, z_flags)
__field(uint32_t, z_access_mask)
__field(uint32_t, mask_matched)
),
TP_fast_assign(
__entry->z_id = zn->z_id;
__entry->z_unlinked = zn->z_unlinked;
__entry->z_atime_dirty = zn->z_atime_dirty;
__entry->z_zn_prefetch = zn->z_zn_prefetch;
__entry->z_blksz = zn->z_blksz;
__entry->z_seq = zn->z_seq;
__entry->z_mapcnt = zn->z_mapcnt;
__entry->z_size = zn->z_size;
__entry->z_pflags = zn->z_pflags;
__entry->z_sync_cnt = zn->z_sync_cnt;
__entry->z_sync_writes_cnt = zn->z_sync_writes_cnt;
__entry->z_async_writes_cnt = zn->z_async_writes_cnt;
__entry->z_mode = zn->z_mode;
__entry->z_is_sa = zn->z_is_sa;
__entry->z_is_ctldir = zn->z_is_ctldir;
__entry->i_uid = KUID_TO_SUID(ZTOI(zn)->i_uid);
__entry->i_gid = KGID_TO_SGID(ZTOI(zn)->i_gid);
__entry->i_ino = zn->z_inode.i_ino;
__entry->i_nlink = zn->z_inode.i_nlink;
__entry->i_size = zn->z_inode.i_size;
__entry->i_blkbits = zn->z_inode.i_blkbits;
__entry->i_bytes = zn->z_inode.i_bytes;
__entry->i_mode = zn->z_inode.i_mode;
__entry->i_generation = zn->z_inode.i_generation;
__entry->z_type = ace->z_type;
__entry->z_flags = ace->z_flags;
__entry->z_access_mask = ace->z_access_mask;
__entry->mask_matched = mask_matched;
),
TP_printk("zn { id %llu unlinked %u atime_dirty %u "
"zn_prefetch %u blksz %u seq %u "
"mapcnt %llu size %llu pflags %llu "
"sync_cnt %u sync_writes_cnt %u async_writes_cnt %u "
"mode 0x%x is_sa %d is_ctldir %d "
"inode { uid %u gid %u ino %lu nlink %u size %lli "
"blkbits %u bytes %u mode 0x%x generation %x } } "
"ace { type %u flags %u access_mask %u } mask_matched %u",
__entry->z_id, __entry->z_unlinked, __entry->z_atime_dirty,
__entry->z_zn_prefetch, __entry->z_blksz,
__entry->z_seq, __entry->z_mapcnt, __entry->z_size,
__entry->z_pflags, __entry->z_sync_cnt,
__entry->z_sync_writes_cnt, __entry->z_async_writes_cnt,
__entry->z_mode, __entry->z_is_sa, __entry->z_is_ctldir,
__entry->i_uid, __entry->i_gid, __entry->i_ino, __entry->i_nlink,
__entry->i_size, __entry->i_blkbits,
__entry->i_bytes, __entry->i_mode, __entry->i_generation,
__entry->z_type, __entry->z_flags, __entry->z_access_mask,
__entry->mask_matched)
);
/* END CSTYLED */
#define DEFINE_ACE_EVENT(name) \
DEFINE_EVENT(zfs_ace_class, name, \
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
TP_ARGS(zn, ace, mask_matched))
DEFINE_ACE_EVENT(zfs_zfs__ace__denies);
DEFINE_ACE_EVENT(zfs_zfs__ace__allows);
#endif /* _TRACE_ACL_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_acl
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE3(zfs__ace__denies);
DEFINE_DTRACE_PROBE3(zfs__ace__allows);
DEFINE_DTRACE_PROBE(zfs__fastpath__execute__access__miss);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -22,366 +22,6 @@
#include <sys/list.h>
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_arc
#if !defined(_TRACE_ARC_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ARC_H
#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),
TP_STRUCT__entry(
__array(uint64_t, hdr_dva_word, 2)
__field(uint64_t, hdr_birth)
__field(uint32_t, hdr_flags)
__field(arc_buf_contents_t, hdr_type)
__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)
__field(uint32_t, hdr_mru_hits)
__field(uint32_t, hdr_mru_ghost_hits)
__field(uint32_t, hdr_mfu_hits)
__field(uint32_t, hdr_mfu_ghost_hits)
__field(uint32_t, hdr_l2_hits)
__field(int64_t, hdr_refcount)
),
TP_fast_assign(
__entry->hdr_dva_word[0] = ab->b_dva.dva_word[0];
__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_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_mru_hits = ab->b_l1hdr.b_mru_hits;
__entry->hdr_mru_ghost_hits = ab->b_l1hdr.b_mru_ghost_hits;
__entry->hdr_mfu_hits = ab->b_l1hdr.b_mfu_hits;
__entry->hdr_mfu_ghost_hits = ab->b_l1hdr.b_mfu_ghost_hits;
__entry->hdr_l2_hits = ab->b_l2hdr.b_hits;
__entry->hdr_refcount = ab->b_l1hdr.b_refcnt.rc_count;
),
TP_printk("hdr { dva 0x%llx:0x%llx birth %llu "
"flags 0x%x 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_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 */
#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))
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__iohit);
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_new_state__uncached);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__async__upgrade__sync);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__miss);
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* vdev_t *, ...,
* zio_t *, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_l2arc_rw_class,
TP_PROTO(vdev_t *vd, zio_t *zio),
TP_ARGS(vd, zio),
TP_STRUCT__entry(
__field(uint64_t, vdev_id)
__field(uint64_t, vdev_guid)
__field(uint64_t, vdev_state)
ZIO_TP_STRUCT_ENTRY
),
TP_fast_assign(
__entry->vdev_id = vd->vdev_id;
__entry->vdev_guid = vd->vdev_guid;
__entry->vdev_state = vd->vdev_state;
ZIO_TP_FAST_ASSIGN
),
TP_printk("vdev { id %llu guid %llu state %llu } "
ZIO_TP_PRINTK_FMT, __entry->vdev_id, __entry->vdev_guid,
__entry->vdev_state, ZIO_TP_PRINTK_ARGS)
);
/* END 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))
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read);
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write);
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* 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_STRUCT__entry(ZIO_TP_STRUCT_ENTRY),
TP_fast_assign(ZIO_TP_FAST_ASSIGN),
TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS)
);
/* END 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))
DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone);
/*
* Generic support for four argument tracepoints of the form:
*
* DTRACE_PROBE4(...,
* arc_buf_hdr_t *, ...,
* const blkptr_t *,
* 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),
TP_ARGS(hdr, bp, size, zb),
TP_STRUCT__entry(
__array(uint64_t, hdr_dva_word, 2)
__field(uint64_t, hdr_birth)
__field(uint32_t, hdr_flags)
__field(arc_buf_contents_t, hdr_type)
__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)
__field(uint32_t, hdr_mru_hits)
__field(uint32_t, hdr_mru_ghost_hits)
__field(uint32_t, hdr_mfu_hits)
__field(uint32_t, hdr_mfu_ghost_hits)
__field(uint32_t, hdr_l2_hits)
__field(int64_t, hdr_refcount)
__array(uint64_t, bp_dva0, 2)
__array(uint64_t, bp_dva1, 2)
__array(uint64_t, bp_dva2, 2)
__array(uint64_t, bp_cksum, 4)
__field(uint64_t, bp_lsize)
__field(uint64_t, zb_objset)
__field(uint64_t, zb_object)
__field(int64_t, zb_level)
__field(uint64_t, zb_blkid)
),
TP_fast_assign(
__entry->hdr_dva_word[0] = hdr->b_dva.dva_word[0];
__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_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->hdr_mru_hits = hdr->b_l1hdr.b_mru_hits;
__entry->hdr_mru_ghost_hits = hdr->b_l1hdr.b_mru_ghost_hits;
__entry->hdr_mfu_hits = hdr->b_l1hdr.b_mfu_hits;
__entry->hdr_mfu_ghost_hits = hdr->b_l1hdr.b_mfu_ghost_hits;
__entry->hdr_l2_hits = hdr->b_l2hdr.b_hits;
__entry->hdr_refcount = hdr->b_l1hdr.b_refcnt.rc_count;
__entry->bp_dva0[0] = bp->blk_dva[0].dva_word[0];
__entry->bp_dva0[1] = bp->blk_dva[0].dva_word[1];
__entry->bp_dva1[0] = bp->blk_dva[1].dva_word[0];
__entry->bp_dva1[1] = bp->blk_dva[1].dva_word[1];
__entry->bp_dva2[0] = bp->blk_dva[2].dva_word[0];
__entry->bp_dva2[1] = bp->blk_dva[2].dva_word[1];
__entry->bp_cksum[0] = bp->blk_cksum.zc_word[0];
__entry->bp_cksum[1] = bp->blk_cksum.zc_word[1];
__entry->bp_cksum[2] = bp->blk_cksum.zc_word[2];
__entry->bp_cksum[3] = bp->blk_cksum.zc_word[3];
__entry->bp_lsize = size;
__entry->zb_objset = zb->zb_objset;
__entry->zb_object = zb->zb_object;
__entry->zb_level = zb->zb_level;
__entry->zb_blkid = zb->zb_blkid;
),
TP_printk("hdr { dva 0x%llx:0x%llx birth %llu "
"flags 0x%x 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 "
"0x%llx:0x%llx cksum 0x%llx:0x%llx:0x%llx:0x%llx "
"lsize %llu } zb { objset %llu object %llu level %lli "
"blkid %llu }",
__entry->hdr_dva_word[0], __entry->hdr_dva_word[1],
__entry->hdr_birth, __entry->hdr_flags,
__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,
__entry->bp_dva0[0], __entry->bp_dva0[1],
__entry->bp_dva1[0], __entry->bp_dva1[1],
__entry->bp_dva2[0], __entry->bp_dva2[1],
__entry->bp_cksum[0], __entry->bp_cksum[1],
__entry->bp_cksum[2], __entry->bp_cksum[3],
__entry->bp_lsize, __entry->zb_objset, __entry->zb_object,
__entry->zb_level, __entry->zb_blkid)
);
/* END 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))
DEFINE_ARC_MISS_EVENT(zfs_arc__miss);
/*
* Generic support for four argument tracepoints of the form:
*
* DTRACE_PROBE4(...,
* l2arc_dev_t *, ...,
* list_t *, ...,
* 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),
TP_ARGS(dev, buflist, taddr, all),
TP_STRUCT__entry(
__field(uint64_t, vdev_id)
__field(uint64_t, vdev_guid)
__field(uint64_t, vdev_state)
__field(uint64_t, l2ad_hand)
__field(uint64_t, l2ad_start)
__field(uint64_t, l2ad_end)
__field(boolean_t, l2ad_first)
__field(boolean_t, l2ad_writing)
__field(uint64_t, taddr)
__field(boolean_t, all)
),
TP_fast_assign(
__entry->vdev_id = dev->l2ad_vdev->vdev_id;
__entry->vdev_guid = dev->l2ad_vdev->vdev_guid;
__entry->vdev_state = dev->l2ad_vdev->vdev_state;
__entry->l2ad_hand = dev->l2ad_hand;
__entry->l2ad_start = dev->l2ad_start;
__entry->l2ad_end = dev->l2ad_end;
__entry->l2ad_first = dev->l2ad_first;
__entry->l2ad_writing = dev->l2ad_writing;
__entry->taddr = taddr;
__entry->all = all;
),
TP_printk("l2ad { vdev { id %llu guid %llu state %llu } "
"hand %llu start %llu end %llu "
"first %d writing %d } taddr %llu all %d",
__entry->vdev_id, __entry->vdev_guid, __entry->vdev_state,
__entry->l2ad_hand, __entry->l2ad_start,
__entry->l2ad_end, __entry->l2ad_first, __entry->l2ad_writing,
__entry->taddr, __entry->all)
);
/* END 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))
DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict);
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* uint64_t, ...,
* uint64_t, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_arc_wait_for_eviction_class,
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count),
TP_ARGS(amount, arc_evict_count, aew_count),
TP_STRUCT__entry(
__field(uint64_t, amount)
__field(uint64_t, arc_evict_count)
__field(uint64_t, aew_count)
),
TP_fast_assign(
__entry->amount = amount;
__entry->arc_evict_count = arc_evict_count;
__entry->aew_count = aew_count;
),
TP_printk("amount %llu arc_evict_count %llu aew_count %llu",
__entry->amount, __entry->arc_evict_count, __entry->aew_count)
);
/* END CSTYLED */
#define DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(name) \
DEFINE_EVENT(zfs_arc_wait_for_eviction_class, name, \
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count), \
TP_ARGS(amount, arc_evict_count, aew_count))
DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(zfs_arc__wait__for__eviction);
#endif /* _TRACE_ARC_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_arc
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE1(arc__hit);
DEFINE_DTRACE_PROBE1(arc__iohit);
@ -400,5 +40,4 @@ DEFINE_DTRACE_PROBE3(arc__wait__for__eviction);
DEFINE_DTRACE_PROBE4(arc__miss);
DEFINE_DTRACE_PROBE4(l2arc__evict);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,68 +20,7 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_dbgmsg
#if !defined(_TRACE_DBGMSG_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DBGMSG_H
#include <linux/tracepoint.h>
/*
* This file defines tracepoint events for use by the dbgmsg(),
* dprintf(), and SET_ERROR() interfaces. These are grouped here because
* they all provide a way to store simple messages in the debug log (as
* opposed to events used by the DTRACE_PROBE interfaces which typically
* dump structured data).
*
* This header is included inside the trace.h multiple inclusion guard,
* and it is guarded above against direct inclusion, so it and need not
* be guarded separately.
*/
/*
* Generic support for one argument tracepoints of the form:
*
* DTRACE_PROBE1(...,
* const char *, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_dprintf_class,
TP_PROTO(const char *msg),
TP_ARGS(msg),
TP_STRUCT__entry(
__string(msg, msg)
),
TP_fast_assign(
__assign_str(msg, msg);
),
TP_printk("%s", __get_str(msg))
);
/* END CSTYLED */
#define DEFINE_DPRINTF_EVENT(name) \
DEFINE_EVENT(zfs_dprintf_class, name, \
TP_PROTO(const char *msg), \
TP_ARGS(msg))
DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf);
#endif /* _TRACE_DBGMSG_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_dbgmsg
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE1(zfs__dprintf);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,148 +20,9 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_dbuf
#if !defined(_TRACE_DBUF_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DBUF_H
#include <linux/tracepoint.h>
#include <sys/types.h>
#ifndef TRACE_DBUF_MSG_MAX
#define TRACE_DBUF_MSG_MAX 512
#endif
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* dmu_buf_impl_t *, ...,
* zio_t *, ...);
*/
#define DBUF_TP_STRUCT_ENTRY \
__dynamic_array(char, os_spa, TRACE_DBUF_MSG_MAX) \
__field(uint64_t, ds_object) \
__field(uint64_t, db_object) \
__field(uint64_t, db_level) \
__field(uint64_t, db_blkid) \
__field(uint64_t, db_offset) \
__field(uint64_t, db_size) \
__field(uint64_t, db_state) \
__field(int64_t, db_holds) \
__dynamic_array(char, msg, TRACE_DBUF_MSG_MAX)
#define DBUF_TP_FAST_ASSIGN \
if (db != NULL) { \
if (POINTER_IS_VALID(DB_DNODE(db)->dn_objset)) { \
__assign_str(os_spa, \
spa_name(DB_DNODE(db)->dn_objset->os_spa)); \
} else { \
__assign_str(os_spa, "NULL"); \
} \
\
__entry->ds_object = db->db_objset->os_dsl_dataset ? \
db->db_objset->os_dsl_dataset->ds_object : 0; \
\
__entry->db_object = db->db.db_object; \
__entry->db_level = db->db_level; \
__entry->db_blkid = db->db_blkid; \
__entry->db_offset = db->db.db_offset; \
__entry->db_size = db->db.db_size; \
__entry->db_state = db->db_state; \
__entry->db_holds = zfs_refcount_count(&db->db_holds); \
snprintf(__get_str(msg), TRACE_DBUF_MSG_MAX, \
DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS); \
} else { \
__assign_str(os_spa, "NULL"); \
__entry->ds_object = 0; \
__entry->db_object = 0; \
__entry->db_level = 0; \
__entry->db_blkid = 0; \
__entry->db_offset = 0; \
__entry->db_size = 0; \
__entry->db_state = 0; \
__entry->db_holds = 0; \
snprintf(__get_str(msg), TRACE_DBUF_MSG_MAX, \
"dbuf { NULL }"); \
}
#define DBUF_TP_PRINTK_FMT \
"dbuf { spa \"%s\" objset %llu object %llu level %llu " \
"blkid %llu offset %llu size %llu state %llu holds %lld }"
#define DBUF_TP_PRINTK_ARGS \
__get_str(os_spa), __entry->ds_object, \
__entry->db_object, __entry->db_level, \
__entry->db_blkid, __entry->db_offset, \
__entry->db_size, __entry->db_state, __entry->db_holds
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_dbuf_class,
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio),
TP_ARGS(db, zio),
TP_STRUCT__entry(DBUF_TP_STRUCT_ENTRY),
TP_fast_assign(DBUF_TP_FAST_ASSIGN),
TP_printk("%s", __get_str(msg))
);
DECLARE_EVENT_CLASS(zfs_dbuf_state_class,
TP_PROTO(dmu_buf_impl_t *db, const char *why),
TP_ARGS(db, why),
TP_STRUCT__entry(DBUF_TP_STRUCT_ENTRY),
TP_fast_assign(DBUF_TP_FAST_ASSIGN),
TP_printk("%s", __get_str(msg))
);
/* END CSTYLED */
#define DEFINE_DBUF_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_class, name, \
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
TP_ARGS(db, zio))
DEFINE_DBUF_EVENT(zfs_blocked__read);
#define DEFINE_DBUF_STATE_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_state_class, name, \
TP_PROTO(dmu_buf_impl_t *db, const char *why), \
TP_ARGS(db, why))
DEFINE_DBUF_STATE_EVENT(zfs_dbuf__state_change);
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class,
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls),
TP_ARGS(db, mls),
TP_STRUCT__entry(DBUF_TP_STRUCT_ENTRY),
TP_fast_assign(DBUF_TP_FAST_ASSIGN),
TP_printk("%s", __get_str(msg))
);
/* END CSTYLED */
#define DEFINE_DBUF_EVICT_ONE_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_evict_one_class, name, \
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
TP_ARGS(db, mls))
DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one);
#endif /* _TRACE_DBUF_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_dbuf
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE2(blocked__read);
DEFINE_DTRACE_PROBE2(dbuf__evict__one);
DEFINE_DTRACE_PROBE2(dbuf__state_change);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,113 +20,8 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_dmu
#if !defined(_TRACE_DMU_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DMU_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* dmu_tx_t *, ...,
* uint64_t, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_delay_mintime_class,
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time),
TP_ARGS(tx, dirty, min_tx_time),
TP_STRUCT__entry(
__field(uint64_t, tx_txg)
__field(uint64_t, tx_lastsnap_txg)
__field(uint64_t, tx_lasttried_txg)
__field(boolean_t, tx_anyobj)
__field(boolean_t, tx_dirty_delayed)
__field(hrtime_t, tx_start)
__field(boolean_t, tx_wait_dirty)
__field(int, tx_err)
__field(uint64_t, min_tx_time)
__field(uint64_t, dirty)
),
TP_fast_assign(
__entry->tx_txg = tx->tx_txg;
__entry->tx_lastsnap_txg = tx->tx_lastsnap_txg;
__entry->tx_lasttried_txg = tx->tx_lasttried_txg;
__entry->tx_anyobj = tx->tx_anyobj;
__entry->tx_dirty_delayed = tx->tx_dirty_delayed;
__entry->tx_start = tx->tx_start;
__entry->tx_wait_dirty = tx->tx_wait_dirty;
__entry->tx_err = tx->tx_err;
__entry->dirty = dirty;
__entry->min_tx_time = min_tx_time;
),
TP_printk("tx { txg %llu lastsnap_txg %llu tx_lasttried_txg %llu "
"anyobj %d dirty_delayed %d start %llu wait_dirty %d err %i "
"} dirty %llu min_tx_time %llu",
__entry->tx_txg, __entry->tx_lastsnap_txg,
__entry->tx_lasttried_txg, __entry->tx_anyobj,
__entry->tx_dirty_delayed, __entry->tx_start,
__entry->tx_wait_dirty, __entry->tx_err,
__entry->dirty, __entry->min_tx_time)
);
/* END CSTYLED */
#define DEFINE_DELAY_MINTIME_EVENT(name) \
DEFINE_EVENT(zfs_delay_mintime_class, name, \
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
TP_ARGS(tx, dirty, min_tx_time))
DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime);
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_free_long_range_class,
TP_PROTO(uint64_t long_free_dirty_all_txgs, uint64_t chunk_len, \
uint64_t txg),
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg),
TP_STRUCT__entry(
__field(uint64_t, long_free_dirty_all_txgs)
__field(uint64_t, chunk_len)
__field(uint64_t, txg)
),
TP_fast_assign(
__entry->long_free_dirty_all_txgs = long_free_dirty_all_txgs;
__entry->chunk_len = chunk_len;
__entry->txg = txg;
),
TP_printk("long_free_dirty_all_txgs %llu chunk_len %llu txg %llu",
__entry->long_free_dirty_all_txgs,
__entry->chunk_len, __entry->txg)
);
/* END CSTYLED */
#define DEFINE_FREE_LONG_RANGE_EVENT(name) \
DEFINE_EVENT(zfs_free_long_range_class, name, \
TP_PROTO(uint64_t long_free_dirty_all_txgs, \
uint64_t chunk_len, uint64_t txg), \
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
DEFINE_FREE_LONG_RANGE_EVENT(zfs_free__long__range);
#endif /* _TRACE_DMU_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_dmu
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE3(delay__mintime);
DEFINE_DTRACE_PROBE3(free__long__range);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,108 +20,7 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_dnode
#if !defined(_TRACE_DNODE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DNODE_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* dnode_t *, ...,
* int64_t, ...,
* uint32_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_dnode_move_class,
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs),
TP_ARGS(dn, refcount, dbufs),
TP_STRUCT__entry(
__field(uint64_t, dn_object)
__field(dmu_object_type_t, dn_type)
__field(uint16_t, dn_bonuslen)
__field(uint8_t, dn_bonustype)
__field(uint8_t, dn_nblkptr)
__field(uint8_t, dn_checksum)
__field(uint8_t, dn_compress)
__field(uint8_t, dn_nlevels)
__field(uint8_t, dn_indblkshift)
__field(uint8_t, dn_datablkshift)
__field(uint8_t, dn_moved)
__field(uint16_t, dn_datablkszsec)
__field(uint32_t, dn_datablksz)
__field(uint64_t, dn_maxblkid)
__field(int64_t, dn_tx_holds)
__field(int64_t, dn_holds)
__field(boolean_t, dn_have_spill)
__field(int64_t, refcount)
__field(uint32_t, dbufs)
),
TP_fast_assign(
__entry->dn_object = dn->dn_object;
__entry->dn_type = dn->dn_type;
__entry->dn_bonuslen = dn->dn_bonuslen;
__entry->dn_bonustype = dn->dn_bonustype;
__entry->dn_nblkptr = dn->dn_nblkptr;
__entry->dn_checksum = dn->dn_checksum;
__entry->dn_compress = dn->dn_compress;
__entry->dn_nlevels = dn->dn_nlevels;
__entry->dn_indblkshift = dn->dn_indblkshift;
__entry->dn_datablkshift = dn->dn_datablkshift;
__entry->dn_moved = dn->dn_moved;
__entry->dn_datablkszsec = dn->dn_datablkszsec;
__entry->dn_datablksz = dn->dn_datablksz;
__entry->dn_maxblkid = dn->dn_maxblkid;
__entry->dn_tx_holds = dn->dn_tx_holds.rc_count;
__entry->dn_holds = dn->dn_holds.rc_count;
__entry->dn_have_spill = dn->dn_have_spill;
__entry->refcount = refcount;
__entry->dbufs = dbufs;
),
TP_printk("dn { object %llu type %d bonuslen %u bonustype %u "
"nblkptr %u checksum %u compress %u nlevels %u indblkshift %u "
"datablkshift %u moved %u datablkszsec %u datablksz %u "
"maxblkid %llu tx_holds %lli holds %lli have_spill %d } "
"refcount %lli dbufs %u",
__entry->dn_object, __entry->dn_type, __entry->dn_bonuslen,
__entry->dn_bonustype, __entry->dn_nblkptr, __entry->dn_checksum,
__entry->dn_compress, __entry->dn_nlevels, __entry->dn_indblkshift,
__entry->dn_datablkshift, __entry->dn_moved,
__entry->dn_datablkszsec, __entry->dn_datablksz,
__entry->dn_maxblkid, __entry->dn_tx_holds, __entry->dn_holds,
__entry->dn_have_spill, __entry->refcount, __entry->dbufs)
);
/* END CSTYLED */
#define DEFINE_DNODE_MOVE_EVENT(name) \
DEFINE_EVENT(zfs_dnode_move_class, name, \
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
TP_ARGS(dn, refcount, dbufs))
DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move);
#endif /* _TRACE_DNODE_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_dnode
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE3(dnode__move);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,68 +20,8 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_multilist
#if !defined(_TRACE_MULTILIST_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MULTILIST_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* multilist_t *, ...,
* unsigned int, ...,
* void *, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class,
TP_PROTO(multilist_t *ml, unsigned sublist_idx, void *obj),
TP_ARGS(ml, sublist_idx, obj),
TP_STRUCT__entry(
__field(size_t, ml_offset)
__field(uint64_t, ml_num_sublists)
__field(unsigned int, sublist_idx)
),
TP_fast_assign(
__entry->ml_offset = ml->ml_offset;
__entry->ml_num_sublists = ml->ml_num_sublists;
__entry->sublist_idx = sublist_idx;
),
TP_printk("ml { offset %ld numsublists %llu sublistidx %u } ",
__entry->ml_offset, __entry->ml_num_sublists, __entry->sublist_idx)
);
/* END CSTYLED */
#define DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \
DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \
TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
TP_ARGS(ml, sublist_idx, obj))
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__insert);
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__remove);
#endif /* _TRACE_MULTILIST_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_multilist
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE3(multilist__insert);
DEFINE_DTRACE_PROBE3(multilist__remove);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,12 +20,8 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#else
DEFINE_DTRACE_PROBE(zfs__rrwfastpath__rdmiss);
DEFINE_DTRACE_PROBE(zfs__rrwfastpath__exitmiss);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,61 +20,6 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_txg
#if !defined(_TRACE_TXG_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_TXG_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* dsl_pool_t *, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_txg_class,
TP_PROTO(dsl_pool_t *dp, uint64_t txg),
TP_ARGS(dp, txg),
TP_STRUCT__entry(
__field(uint64_t, txg)
),
TP_fast_assign(
__entry->txg = txg;
),
TP_printk("txg %llu", __entry->txg)
);
/* END CSTYLED */
#define DEFINE_TXG_EVENT(name) \
DEFINE_EVENT(zfs_txg_class, name, \
TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
TP_ARGS(dp, txg))
DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done);
DEFINE_TXG_EVENT(zfs_txg__quiescing);
DEFINE_TXG_EVENT(zfs_txg__opened);
DEFINE_TXG_EVENT(zfs_txg__syncing);
DEFINE_TXG_EVENT(zfs_txg__synced);
DEFINE_TXG_EVENT(zfs_txg__quiesced);
#endif /* _TRACE_TXG_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_txg
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE2(dsl_pool_sync__done);
DEFINE_DTRACE_PROBE2(txg__quiescing);
@ -83,5 +28,4 @@ DEFINE_DTRACE_PROBE2(txg__syncing);
DEFINE_DTRACE_PROBE2(txg__synced);
DEFINE_DTRACE_PROBE2(txg__quiesced);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,106 +20,6 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
/*
* If tracepoints are available define dtrace_probe events for vdev
* related probes. Definitions in include/os/linux/spl/sys/trace.h
* will map DTRACE_PROBE* calls to tracepoints.
*/
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_vdev
#if !defined(_TRACE_VDEV_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_VDEV_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* spa_t *, ...,
* uint64_t, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_removing_class_3,
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size),
TP_ARGS(spa, offset, size),
TP_STRUCT__entry(
__field(spa_t *, vdev_spa)
__field(uint64_t, vdev_offset)
__field(uint64_t, vdev_size)
),
TP_fast_assign(
__entry->vdev_spa = spa;
__entry->vdev_offset = offset;
__entry->vdev_size = size;
),
TP_printk("spa %p offset %llu size %llu",
__entry->vdev_spa, __entry->vdev_offset,
__entry->vdev_size)
);
/* END CSTYLED */
#define DEFINE_REMOVE_FREE_EVENT(name) \
DEFINE_EVENT(zfs_removing_class_3, name, \
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \
TP_ARGS(spa, offset, size))
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__synced);
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__unvisited);
/*
* Generic support for four argument tracepoints of the form:
*
* DTRACE_PROBE4(...,
* spa_t *, ...,
* uint64_t, ...,
* uint64_t, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_removing_class_4,
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size, uint64_t txg),
TP_ARGS(spa, offset, size, txg),
TP_STRUCT__entry(
__field(spa_t *, vdev_spa)
__field(uint64_t, vdev_offset)
__field(uint64_t, vdev_size)
__field(uint64_t, vdev_txg)
),
TP_fast_assign(
__entry->vdev_spa = spa;
__entry->vdev_offset = offset;
__entry->vdev_size = size;
__entry->vdev_txg = txg;
),
TP_printk("spa %p offset %llu size %llu txg %llu",
__entry->vdev_spa, __entry->vdev_offset,
__entry->vdev_size, __entry->vdev_txg)
);
#define DEFINE_REMOVE_FREE_EVENT_TXG(name) \
DEFINE_EVENT(zfs_removing_class_4, name, \
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
TP_ARGS(spa, offset, size, txg))
DEFINE_REMOVE_FREE_EVENT_TXG(zfs_remove__free__inflight);
#endif /* _TRACE_VDEV_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_vdev
#include <trace/define_trace.h>
#else
/*
* When tracepoints are not available, a DEFINE_DTRACE_PROBE* macro is
@ -132,5 +32,4 @@ DEFINE_DTRACE_PROBE3(remove__free__synced);
DEFINE_DTRACE_PROBE3(remove__free__unvisited);
DEFINE_DTRACE_PROBE4(remove__free__inflight);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,254 +20,10 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_zil
#if !defined(_TRACE_ZIL_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ZIL_H
#include <linux/tracepoint.h>
#include <sys/types.h>
#define ZILOG_TP_STRUCT_ENTRY \
__field(uint64_t, zl_lr_seq) \
__field(uint64_t, zl_commit_lr_seq) \
__field(uint64_t, zl_destroy_txg) \
__field(uint64_t, zl_replaying_seq) \
__field(uint32_t, zl_suspend) \
__field(uint8_t, zl_suspending) \
__field(uint8_t, zl_keep_first) \
__field(uint8_t, zl_replay) \
__field(uint8_t, zl_stop_sync) \
__field(uint8_t, zl_logbias) \
__field(uint8_t, zl_sync) \
__field(int, zl_parse_error) \
__field(uint64_t, zl_parse_blk_seq) \
__field(uint64_t, zl_parse_lr_seq) \
__field(uint64_t, zl_parse_blk_count) \
__field(uint64_t, zl_parse_lr_count) \
__field(uint64_t, zl_cur_size) \
__field(uint64_t, zl_cur_left) \
__field(uint64_t, zl_cur_max) \
__field(clock_t, zl_replay_time) \
__field(uint64_t, zl_replay_blks)
#define ZILOG_TP_FAST_ASSIGN \
__entry->zl_lr_seq = zilog->zl_lr_seq; \
__entry->zl_commit_lr_seq = zilog->zl_commit_lr_seq; \
__entry->zl_destroy_txg = zilog->zl_destroy_txg; \
__entry->zl_replaying_seq = zilog->zl_replaying_seq; \
__entry->zl_suspend = zilog->zl_suspend; \
__entry->zl_suspending = zilog->zl_suspending; \
__entry->zl_keep_first = zilog->zl_keep_first; \
__entry->zl_replay = zilog->zl_replay; \
__entry->zl_stop_sync = zilog->zl_stop_sync; \
__entry->zl_logbias = zilog->zl_logbias; \
__entry->zl_sync = zilog->zl_sync; \
__entry->zl_parse_error = zilog->zl_parse_error; \
__entry->zl_parse_blk_seq = zilog->zl_parse_blk_seq; \
__entry->zl_parse_lr_seq = zilog->zl_parse_lr_seq; \
__entry->zl_parse_blk_count = zilog->zl_parse_blk_count;\
__entry->zl_parse_lr_count = zilog->zl_parse_lr_count; \
__entry->zl_cur_size = zilog->zl_cur_size; \
__entry->zl_cur_left = zilog->zl_cur_left; \
__entry->zl_cur_max = zilog->zl_cur_max; \
__entry->zl_replay_time = zilog->zl_replay_time; \
__entry->zl_replay_blks = zilog->zl_replay_blks;
#define ZILOG_TP_PRINTK_FMT \
"zl { lr_seq %llu commit_lr_seq %llu destroy_txg %llu " \
"replaying_seq %llu suspend %u suspending %u keep_first %u " \
"replay %u stop_sync %u logbias %u sync %u " \
"parse_error %u parse_blk_seq %llu parse_lr_seq %llu " \
"parse_blk_count %llu parse_lr_count %llu " \
"cur_size %llu cur_left %llu cur_max %llu replay_time %lu " \
"replay_blks %llu }"
#define ZILOG_TP_PRINTK_ARGS \
__entry->zl_lr_seq, __entry->zl_commit_lr_seq, \
__entry->zl_destroy_txg, __entry->zl_replaying_seq, \
__entry->zl_suspend, __entry->zl_suspending, \
__entry->zl_keep_first, __entry->zl_replay, \
__entry->zl_stop_sync, __entry->zl_logbias, __entry->zl_sync, \
__entry->zl_parse_error, __entry->zl_parse_blk_seq, \
__entry->zl_parse_lr_seq, __entry->zl_parse_blk_count, \
__entry->zl_parse_lr_count, __entry->zl_cur_size, \
__entry->zl_cur_left, __entry->zl_cur_max, \
__entry->zl_replay_time, __entry->zl_replay_blks
#define ITX_TP_STRUCT_ENTRY \
__field(itx_wr_state_t, itx_wr_state) \
__field(uint8_t, itx_sync) \
__field(zil_callback_t, itx_callback) \
__field(void *, itx_callback_data) \
__field(uint64_t, itx_oid) \
\
__field(uint64_t, lrc_txtype) \
__field(uint64_t, lrc_reclen) \
__field(uint64_t, lrc_txg) \
__field(uint64_t, lrc_seq)
#define ITX_TP_FAST_ASSIGN \
__entry->itx_wr_state = itx->itx_wr_state; \
__entry->itx_sync = itx->itx_sync; \
__entry->itx_callback = itx->itx_callback; \
__entry->itx_callback_data = itx->itx_callback_data; \
__entry->itx_oid = itx->itx_oid; \
\
__entry->lrc_txtype = itx->itx_lr.lrc_txtype; \
__entry->lrc_reclen = itx->itx_lr.lrc_reclen; \
__entry->lrc_txg = itx->itx_lr.lrc_txg; \
__entry->lrc_seq = itx->itx_lr.lrc_seq;
#define ITX_TP_PRINTK_FMT \
"itx { wr_state %u sync %u callback %p callback_data %p oid %llu" \
" { txtype %llu reclen %llu txg %llu seq %llu } }"
#define ITX_TP_PRINTK_ARGS \
__entry->itx_wr_state, __entry->itx_sync, __entry->itx_callback,\
__entry->itx_callback_data, __entry->itx_oid, \
__entry->lrc_txtype, __entry->lrc_reclen, __entry->lrc_txg, \
__entry->lrc_seq
#define ZCW_TP_STRUCT_ENTRY \
__field(lwb_t *, zcw_lwb) \
__field(boolean_t, zcw_done) \
__field(int, zcw_zio_error) \
#define ZCW_TP_FAST_ASSIGN \
__entry->zcw_lwb = zcw->zcw_lwb; \
__entry->zcw_done = zcw->zcw_done; \
__entry->zcw_zio_error = zcw->zcw_zio_error;
#define ZCW_TP_PRINTK_FMT \
"zcw { lwb %p done %u error %u }"
#define ZCW_TP_PRINTK_ARGS \
__entry->zcw_lwb, __entry->zcw_done, __entry->zcw_zio_error
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* zilog_t *, ...,
* itx_t *, ...);
*/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wordered-compare-function-pointers"
#endif
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_zil_process_itx_class,
TP_PROTO(zilog_t *zilog, itx_t *itx),
TP_ARGS(zilog, itx),
TP_STRUCT__entry(
ZILOG_TP_STRUCT_ENTRY
ITX_TP_STRUCT_ENTRY
),
TP_fast_assign(
ZILOG_TP_FAST_ASSIGN
ITX_TP_FAST_ASSIGN
),
TP_printk(
ZILOG_TP_PRINTK_FMT " " ITX_TP_PRINTK_FMT,
ZILOG_TP_PRINTK_ARGS, ITX_TP_PRINTK_ARGS)
);
/* END CSTYLED */
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#define DEFINE_ZIL_PROCESS_ITX_EVENT(name) \
DEFINE_EVENT(zfs_zil_process_itx_class, name, \
TP_PROTO(zilog_t *zilog, itx_t *itx), \
TP_ARGS(zilog, itx))
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__commit__itx);
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__normal__itx);
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* zilog_t *, ...,
* zil_commit_waiter_t *, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_zil_commit_io_error_class,
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw),
TP_ARGS(zilog, zcw),
TP_STRUCT__entry(
ZILOG_TP_STRUCT_ENTRY
ZCW_TP_STRUCT_ENTRY
),
TP_fast_assign(
ZILOG_TP_FAST_ASSIGN
ZCW_TP_FAST_ASSIGN
),
TP_printk(
ZILOG_TP_PRINTK_FMT " " ZCW_TP_PRINTK_FMT,
ZILOG_TP_PRINTK_ARGS, ZCW_TP_PRINTK_ARGS)
);
#define DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(name) \
DEFINE_EVENT(zfs_zil_commit_io_error_class, name, \
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw), \
TP_ARGS(zilog, zcw))
DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(zfs_zil__commit__io__error);
/*
* Generic support for three argument tracepoints of the form:
*
* DTRACE_PROBE3(...,
* zilog_t *, ...,
* uint64_t, ...,
* uint64_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_zil_block_size_class,
TP_PROTO(zilog_t *zilog, uint64_t res, uint64_t s1),
TP_ARGS(zilog, res, s1),
TP_STRUCT__entry(
ZILOG_TP_STRUCT_ENTRY
__field(uint64_t, res)
__field(uint64_t, s1)
),
TP_fast_assign(
ZILOG_TP_FAST_ASSIGN
__entry->res = res;
__entry->s1 = s1;
),
TP_printk(
ZILOG_TP_PRINTK_FMT " res %llu s1 %llu",
ZILOG_TP_PRINTK_ARGS, __entry->res, __entry->s1)
);
#define DEFINE_ZIL_BLOCK_SIZE_EVENT(name) \
DEFINE_EVENT(zfs_zil_block_size_class, name, \
TP_PROTO(zilog_t *zilog, uint64_t res, uint64_t s1), \
TP_ARGS(zilog, res, s1))
DEFINE_ZIL_BLOCK_SIZE_EVENT(zfs_zil__block__size);
#endif /* _TRACE_ZIL_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_zil
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE2(zil__process__commit__itx);
DEFINE_DTRACE_PROBE2(zil__process__normal__itx);
DEFINE_DTRACE_PROBE2(zil__commit__io__error);
DEFINE_DTRACE_PROBE3(zil__block__size);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -22,76 +22,9 @@
#include <sys/list.h>
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_zio
#if !defined(_TRACE_ZIO_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ZIO_H
#include <linux/tracepoint.h>
#include <sys/types.h>
#include <sys/trace_common.h> /* For ZIO macros */
/* BEGIN CSTYLED */
TRACE_EVENT(zfs_zio__delay__miss,
TP_PROTO(zio_t *zio, hrtime_t now),
TP_ARGS(zio, now),
TP_STRUCT__entry(
ZIO_TP_STRUCT_ENTRY
__field(hrtime_t, now)
),
TP_fast_assign(
ZIO_TP_FAST_ASSIGN
__entry->now = now;
),
TP_printk("now %llu " ZIO_TP_PRINTK_FMT, __entry->now,
ZIO_TP_PRINTK_ARGS)
);
TRACE_EVENT(zfs_zio__delay__hit,
TP_PROTO(zio_t *zio, hrtime_t now, hrtime_t diff),
TP_ARGS(zio, now, diff),
TP_STRUCT__entry(
ZIO_TP_STRUCT_ENTRY
__field(hrtime_t, now)
__field(hrtime_t, diff)
),
TP_fast_assign(
ZIO_TP_FAST_ASSIGN
__entry->now = now;
__entry->diff = diff;
),
TP_printk("now %llu diff %llu " ZIO_TP_PRINTK_FMT, __entry->now,
__entry->diff, ZIO_TP_PRINTK_ARGS)
);
TRACE_EVENT(zfs_zio__delay__skip,
TP_PROTO(zio_t *zio),
TP_ARGS(zio),
TP_STRUCT__entry(ZIO_TP_STRUCT_ENTRY),
TP_fast_assign(ZIO_TP_FAST_ASSIGN),
TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS)
);
/* END CSTYLED */
#endif /* _TRACE_ZIO_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_zio
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE2(zio__delay__miss);
DEFINE_DTRACE_PROBE3(zio__delay__hit);
DEFINE_DTRACE_PROBE1(zio__delay__skip);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */

View File

@ -20,75 +20,7 @@
*/
#if defined(_KERNEL)
#if defined(HAVE_DECLARE_EVENT_CLASS)
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zfs
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR zfs_zrlock
#if !defined(_TRACE_ZRLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ZRLOCK_H
#include <linux/tracepoint.h>
#include <sys/types.h>
/*
* Generic support for two argument tracepoints of the form:
*
* DTRACE_PROBE2(...,
* zrlock_t *, ...,
* uint32_t, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_zrlock_class,
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n),
TP_ARGS(zrl, owner, n),
TP_STRUCT__entry(
__field(int32_t, refcount)
#ifdef ZFS_DEBUG
__field(pid_t, owner_pid)
__field(const char *, caller)
#endif
__field(uint32_t, n)
),
TP_fast_assign(
__entry->refcount = zrl->zr_refcount;
#ifdef ZFS_DEBUG
__entry->owner_pid = owner ? owner->pid : 0;
__entry->caller = zrl->zr_caller ? zrl->zr_caller : "(null)";
#endif
__entry->n = n;
),
#ifdef ZFS_DEBUG
TP_printk("zrl { refcount %d owner_pid %d caller %s } n %u",
__entry->refcount, __entry->owner_pid, __entry->caller,
__entry->n)
#else
TP_printk("zrl { refcount %d } n %u",
__entry->refcount, __entry->n)
#endif
);
/* END CSTYLED */
#define DEFINE_ZRLOCK_EVENT(name) \
DEFINE_EVENT(zfs_zrlock_class, name, \
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n), \
TP_ARGS(zrl, owner, n))
DEFINE_ZRLOCK_EVENT(zfs_zrlock__reentry);
#endif /* _TRACE_ZRLOCK_H */
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_PATH sys
#define TRACE_INCLUDE_FILE trace_zrlock
#include <trace/define_trace.h>
#else
DEFINE_DTRACE_PROBE3(zrlock__reentry);
#endif /* HAVE_DECLARE_EVENT_CLASS */
#endif /* _KERNEL */