]>
git.proxmox.com Git - mirror_zfs.git/blob - include/sys/trace_dnode.h
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 #if defined(_KERNEL) && defined(HAVE_DECLARE_EVENT_CLASS)
25 #define TRACE_SYSTEM zfs
27 #if !defined(_TRACE_DNODE_H) || defined(TRACE_HEADER_MULTI_READ)
28 #define _TRACE_DNODE_H
30 #include <linux/tracepoint.h>
31 #include <sys/types.h>
34 * Generic support for three argument tracepoints of the form:
42 DECLARE_EVENT_CLASS(zfs_dnode_move_class
,
43 TP_PROTO(dnode_t
*dn
, int64_t refcount
, uint32_t dbufs
),
44 TP_ARGS(dn
, refcount
, dbufs
),
46 __field(uint64_t, dn_object
)
47 __field(dmu_object_type_t
, dn_type
)
48 __field(uint16_t, dn_bonuslen
)
49 __field(uint8_t, dn_bonustype
)
50 __field(uint8_t, dn_nblkptr
)
51 __field(uint8_t, dn_checksum
)
52 __field(uint8_t, dn_compress
)
53 __field(uint8_t, dn_nlevels
)
54 __field(uint8_t, dn_indblkshift
)
55 __field(uint8_t, dn_datablkshift
)
56 __field(uint8_t, dn_moved
)
57 __field(uint16_t, dn_datablkszsec
)
58 __field(uint32_t, dn_datablksz
)
59 __field(uint64_t, dn_maxblkid
)
60 __field(int64_t, dn_tx_holds
)
61 __field(int64_t, dn_holds
)
62 __field(boolean_t
, dn_have_spill
)
64 __field(int64_t, refcount
)
65 __field(uint32_t, dbufs
)
68 __entry
->dn_object
= dn
->dn_object
;
69 __entry
->dn_type
= dn
->dn_type
;
70 __entry
->dn_bonuslen
= dn
->dn_bonuslen
;
71 __entry
->dn_bonustype
= dn
->dn_bonustype
;
72 __entry
->dn_nblkptr
= dn
->dn_nblkptr
;
73 __entry
->dn_checksum
= dn
->dn_checksum
;
74 __entry
->dn_compress
= dn
->dn_compress
;
75 __entry
->dn_nlevels
= dn
->dn_nlevels
;
76 __entry
->dn_indblkshift
= dn
->dn_indblkshift
;
77 __entry
->dn_datablkshift
= dn
->dn_datablkshift
;
78 __entry
->dn_moved
= dn
->dn_moved
;
79 __entry
->dn_datablkszsec
= dn
->dn_datablkszsec
;
80 __entry
->dn_datablksz
= dn
->dn_datablksz
;
81 __entry
->dn_maxblkid
= dn
->dn_maxblkid
;
82 __entry
->dn_tx_holds
= dn
->dn_tx_holds
.rc_count
;
83 __entry
->dn_holds
= dn
->dn_holds
.rc_count
;
84 __entry
->dn_have_spill
= dn
->dn_have_spill
;
86 __entry
->refcount
= refcount
;
87 __entry
->dbufs
= dbufs
;
89 TP_printk("dn { object %llu type %d bonuslen %u bonustype %u "
90 "nblkptr %u checksum %u compress %u nlevels %u indblkshift %u "
91 "datablkshift %u moved %u datablkszsec %u datablksz %u "
92 "maxblkid %llu tx_holds %lli holds %lli have_spill %d } "
93 "refcount %lli dbufs %u",
94 __entry
->dn_object
, __entry
->dn_type
, __entry
->dn_bonuslen
,
95 __entry
->dn_bonustype
, __entry
->dn_nblkptr
, __entry
->dn_checksum
,
96 __entry
->dn_compress
, __entry
->dn_nlevels
, __entry
->dn_indblkshift
,
97 __entry
->dn_datablkshift
, __entry
->dn_moved
,
98 __entry
->dn_datablkszsec
, __entry
->dn_datablksz
,
99 __entry
->dn_maxblkid
, __entry
->dn_tx_holds
, __entry
->dn_holds
,
100 __entry
->dn_have_spill
, __entry
->refcount
, __entry
->dbufs
)
103 #define DEFINE_DNODE_MOVE_EVENT(name) \
104 DEFINE_EVENT(zfs_dnode_move_class, name, \
105 TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
106 TP_ARGS(dn, refcount, dbufs))
107 DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move
);
109 #endif /* _TRACE_DNODE_H */
111 #undef TRACE_INCLUDE_PATH
112 #undef TRACE_INCLUDE_FILE
113 #define TRACE_INCLUDE_PATH sys
114 #define TRACE_INCLUDE_FILE trace_dnode
115 #include <trace/define_trace.h>
117 #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */