]>
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]
23 #if defined(HAVE_DECLARE_EVENT_CLASS)
26 #define TRACE_SYSTEM zfs
28 #undef TRACE_SYSTEM_VAR
29 #define TRACE_SYSTEM_VAR zfs_dnode
31 #if !defined(_TRACE_DNODE_H) || defined(TRACE_HEADER_MULTI_READ)
32 #define _TRACE_DNODE_H
34 #include <linux/tracepoint.h>
35 #include <sys/types.h>
38 * Generic support for three argument tracepoints of the form:
46 DECLARE_EVENT_CLASS(zfs_dnode_move_class
,
47 TP_PROTO(dnode_t
*dn
, int64_t refcount
, uint32_t dbufs
),
48 TP_ARGS(dn
, refcount
, dbufs
),
50 __field(uint64_t, dn_object
)
51 __field(dmu_object_type_t
, dn_type
)
52 __field(uint16_t, dn_bonuslen
)
53 __field(uint8_t, dn_bonustype
)
54 __field(uint8_t, dn_nblkptr
)
55 __field(uint8_t, dn_checksum
)
56 __field(uint8_t, dn_compress
)
57 __field(uint8_t, dn_nlevels
)
58 __field(uint8_t, dn_indblkshift
)
59 __field(uint8_t, dn_datablkshift
)
60 __field(uint8_t, dn_moved
)
61 __field(uint16_t, dn_datablkszsec
)
62 __field(uint32_t, dn_datablksz
)
63 __field(uint64_t, dn_maxblkid
)
64 __field(int64_t, dn_tx_holds
)
65 __field(int64_t, dn_holds
)
66 __field(boolean_t
, dn_have_spill
)
68 __field(int64_t, refcount
)
69 __field(uint32_t, dbufs
)
72 __entry
->dn_object
= dn
->dn_object
;
73 __entry
->dn_type
= dn
->dn_type
;
74 __entry
->dn_bonuslen
= dn
->dn_bonuslen
;
75 __entry
->dn_bonustype
= dn
->dn_bonustype
;
76 __entry
->dn_nblkptr
= dn
->dn_nblkptr
;
77 __entry
->dn_checksum
= dn
->dn_checksum
;
78 __entry
->dn_compress
= dn
->dn_compress
;
79 __entry
->dn_nlevels
= dn
->dn_nlevels
;
80 __entry
->dn_indblkshift
= dn
->dn_indblkshift
;
81 __entry
->dn_datablkshift
= dn
->dn_datablkshift
;
82 __entry
->dn_moved
= dn
->dn_moved
;
83 __entry
->dn_datablkszsec
= dn
->dn_datablkszsec
;
84 __entry
->dn_datablksz
= dn
->dn_datablksz
;
85 __entry
->dn_maxblkid
= dn
->dn_maxblkid
;
86 __entry
->dn_tx_holds
= dn
->dn_tx_holds
.rc_count
;
87 __entry
->dn_holds
= dn
->dn_holds
.rc_count
;
88 __entry
->dn_have_spill
= dn
->dn_have_spill
;
90 __entry
->refcount
= refcount
;
91 __entry
->dbufs
= dbufs
;
93 TP_printk("dn { object %llu type %d bonuslen %u bonustype %u "
94 "nblkptr %u checksum %u compress %u nlevels %u indblkshift %u "
95 "datablkshift %u moved %u datablkszsec %u datablksz %u "
96 "maxblkid %llu tx_holds %lli holds %lli have_spill %d } "
97 "refcount %lli dbufs %u",
98 __entry
->dn_object
, __entry
->dn_type
, __entry
->dn_bonuslen
,
99 __entry
->dn_bonustype
, __entry
->dn_nblkptr
, __entry
->dn_checksum
,
100 __entry
->dn_compress
, __entry
->dn_nlevels
, __entry
->dn_indblkshift
,
101 __entry
->dn_datablkshift
, __entry
->dn_moved
,
102 __entry
->dn_datablkszsec
, __entry
->dn_datablksz
,
103 __entry
->dn_maxblkid
, __entry
->dn_tx_holds
, __entry
->dn_holds
,
104 __entry
->dn_have_spill
, __entry
->refcount
, __entry
->dbufs
)
109 #define DEFINE_DNODE_MOVE_EVENT(name) \
110 DEFINE_EVENT(zfs_dnode_move_class, name, \
111 TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
112 TP_ARGS(dn, refcount, dbufs))
114 DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move
);
116 #endif /* _TRACE_DNODE_H */
118 #undef TRACE_INCLUDE_PATH
119 #undef TRACE_INCLUDE_FILE
120 #define TRACE_INCLUDE_PATH sys
121 #define TRACE_INCLUDE_FILE trace_dnode
122 #include <trace/define_trace.h>
126 DEFINE_DTRACE_PROBE3(dnode__move
);
128 #endif /* HAVE_DECLARE_EVENT_CLASS */