]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - include/sys/trace_dmu.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_DMU_H) || defined(TRACE_HEADER_MULTI_READ)
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_delay_mintime_class
,
43 TP_PROTO(dmu_tx_t
*tx
, uint64_t dirty
, uint64_t min_tx_time
),
44 TP_ARGS(tx
, dirty
, min_tx_time
),
46 __field(uint64_t, tx_txg
)
47 __field(uint64_t, tx_lastsnap_txg
)
48 __field(uint64_t, tx_lasttried_txg
)
49 __field(boolean_t
, tx_anyobj
)
50 __field(boolean_t
, tx_waited
)
51 __field(hrtime_t
, tx_start
)
52 __field(boolean_t
, tx_wait_dirty
)
55 __field(uint64_t, tx_space_towrite
)
56 __field(uint64_t, tx_space_tofree
)
57 __field(uint64_t, tx_space_tooverwrite
)
58 __field(uint64_t, tx_space_tounref
)
59 __field(int64_t, tx_space_written
)
60 __field(int64_t, tx_space_freed
)
62 __field(uint64_t, min_tx_time
)
63 __field(uint64_t, dirty
)
66 __entry
->tx_txg
= tx
->tx_txg
;
67 __entry
->tx_lastsnap_txg
= tx
->tx_lastsnap_txg
;
68 __entry
->tx_lasttried_txg
= tx
->tx_lasttried_txg
;
69 __entry
->tx_anyobj
= tx
->tx_anyobj
;
70 __entry
->tx_waited
= tx
->tx_waited
;
71 __entry
->tx_start
= tx
->tx_start
;
72 __entry
->tx_wait_dirty
= tx
->tx_wait_dirty
;
73 __entry
->tx_err
= tx
->tx_err
;
75 __entry
->tx_space_towrite
= tx
->tx_space_towrite
;
76 __entry
->tx_space_tofree
= tx
->tx_space_tofree
;
77 __entry
->tx_space_tooverwrite
= tx
->tx_space_tooverwrite
;
78 __entry
->tx_space_tounref
= tx
->tx_space_tounref
;
79 __entry
->tx_space_written
= tx
->tx_space_written
.rc_count
;
80 __entry
->tx_space_freed
= tx
->tx_space_freed
.rc_count
;
82 __entry
->dirty
= dirty
;
83 __entry
->min_tx_time
= min_tx_time
;
85 TP_printk("tx { txg %llu lastsnap_txg %llu tx_lasttried_txg %llu "
86 "anyobj %d waited %d start %llu wait_dirty %d err %i "
88 "space_towrite %llu space_tofree %llu space_tooverwrite %llu "
89 "space_tounref %llu space_written %lli space_freed %lli "
91 "} dirty %llu min_tx_time %llu",
92 __entry
->tx_txg
, __entry
->tx_lastsnap_txg
,
93 __entry
->tx_lasttried_txg
, __entry
->tx_anyobj
, __entry
->tx_waited
,
94 __entry
->tx_start
, __entry
->tx_wait_dirty
, __entry
->tx_err
,
96 __entry
->tx_space_towrite
, __entry
->tx_space_tofree
,
97 __entry
->tx_space_tooverwrite
, __entry
->tx_space_tounref
,
98 __entry
->tx_space_written
, __entry
->tx_space_freed
,
100 __entry
->dirty
, __entry
->min_tx_time
)
103 #define DEFINE_DELAY_MINTIME_EVENT(name) \
104 DEFINE_EVENT(zfs_delay_mintime_class, name, \
105 TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
106 TP_ARGS(tx, dirty, min_tx_time))
107 DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime
);
109 #endif /* _TRACE_DMU_H */
111 #undef TRACE_INCLUDE_PATH
112 #undef TRACE_INCLUDE_FILE
113 #define TRACE_INCLUDE_PATH sys
114 #define TRACE_INCLUDE_FILE trace_dmu
115 #include <trace/define_trace.h>
117 #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */