]>
Commit | Line | Data |
---|---|---|
49ee64e5 NB |
1 | /* |
2 | * CDDL HEADER START | |
3 | * | |
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. | |
7 | * | |
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. | |
12 | * | |
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] | |
18 | * | |
19 | * CDDL HEADER END | |
20 | */ | |
21 | ||
22 | #if defined(_KERNEL) && defined(HAVE_DECLARE_EVENT_CLASS) | |
23 | ||
24 | #undef TRACE_SYSTEM | |
25 | #define TRACE_SYSTEM zfs | |
26 | ||
c1718e95 FV |
27 | #undef TRACE_SYSTEM_VAR |
28 | #define TRACE_SYSTEM_VAR zfs_txg | |
29 | ||
49ee64e5 NB |
30 | #if !defined(_TRACE_TXG_H) || defined(TRACE_HEADER_MULTI_READ) |
31 | #define _TRACE_TXG_H | |
32 | ||
33 | #include <linux/tracepoint.h> | |
34 | #include <sys/types.h> | |
35 | ||
36 | /* | |
37 | * Generic support for two argument tracepoints of the form: | |
38 | * | |
39 | * DTRACE_PROBE2(..., | |
40 | * dsl_pool_t *, ..., | |
41 | * uint64_t, ...); | |
42 | */ | |
02730c33 | 43 | /* BEGIN CSTYLED */ |
49ee64e5 NB |
44 | DECLARE_EVENT_CLASS(zfs_txg_class, |
45 | TP_PROTO(dsl_pool_t *dp, uint64_t txg), | |
46 | TP_ARGS(dp, txg), | |
47 | TP_STRUCT__entry( | |
48 | __field(uint64_t, txg) | |
49 | ), | |
50 | TP_fast_assign( | |
51 | __entry->txg = txg; | |
52 | ), | |
53 | TP_printk("txg %llu", __entry->txg) | |
54 | ); | |
02730c33 | 55 | /* END CSTYLED */ |
49ee64e5 | 56 | |
4ea3f864 | 57 | /* BEGIN CSTYLED */ |
e82dbae1 | 58 | #define DEFINE_TXG_EVENT(name) \ |
49ee64e5 NB |
59 | DEFINE_EVENT(zfs_txg_class, name, \ |
60 | TP_PROTO(dsl_pool_t *dp, uint64_t txg), \ | |
61 | TP_ARGS(dp, txg)) | |
4ea3f864 | 62 | /* END CSTYLED */ |
49ee64e5 NB |
63 | DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done); |
64 | DEFINE_TXG_EVENT(zfs_txg__quiescing); | |
65 | DEFINE_TXG_EVENT(zfs_txg__opened); | |
66 | DEFINE_TXG_EVENT(zfs_txg__syncing); | |
67 | DEFINE_TXG_EVENT(zfs_txg__synced); | |
68 | DEFINE_TXG_EVENT(zfs_txg__quiesced); | |
69 | ||
70 | #endif /* _TRACE_TXG_H */ | |
71 | ||
72 | #undef TRACE_INCLUDE_PATH | |
73 | #undef TRACE_INCLUDE_FILE | |
74 | #define TRACE_INCLUDE_PATH sys | |
75 | #define TRACE_INCLUDE_FILE trace_txg | |
76 | #include <trace/define_trace.h> | |
77 | ||
78 | #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */ |