]>
Commit | Line | Data |
---|---|---|
a1d477c2 MA |
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 | ||
27 | #undef TRACE_SYSTEM_VAR | |
28 | #define TRACE_SYSTEM_VAR zfs_vdev | |
29 | ||
30 | #if !defined(_TRACE_VDEV_H) || defined(TRACE_HEADER_MULTI_READ) | |
31 | #define _TRACE_VDEV_H | |
32 | ||
33 | #include <linux/tracepoint.h> | |
34 | #include <sys/types.h> | |
35 | ||
36 | /* | |
37 | * Generic support for three argument tracepoints of the form: | |
38 | * | |
39 | * DTRACE_PROBE3(..., | |
40 | * spa_t *, ..., | |
41 | * uint64_t, ..., | |
42 | * uint64_t, ...); | |
43 | */ | |
44 | /* BEGIN CSTYLED */ | |
45 | DECLARE_EVENT_CLASS(zfs_removing_class_3, | |
46 | TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), | |
47 | TP_ARGS(spa, offset, size), | |
48 | TP_STRUCT__entry( | |
49 | __field(spa_t *, vdev_spa) | |
50 | __field(uint64_t, vdev_offset) | |
51 | __field(uint64_t, vdev_size) | |
52 | ), | |
53 | TP_fast_assign( | |
54 | __entry->vdev_spa = spa; | |
55 | __entry->vdev_offset = offset; | |
56 | __entry->vdev_size = size; | |
57 | ), | |
58 | TP_printk("spa %p offset %llu size %llu", | |
59 | __entry->vdev_spa, __entry->vdev_offset, | |
60 | __entry->vdev_size) | |
61 | ); | |
62 | /* END CSTYLED */ | |
63 | ||
64 | /* BEGIN CSTYLED */ | |
65 | #define DEFINE_REMOVE_FREE_EVENT(name) \ | |
66 | DEFINE_EVENT(zfs_removing_class_3, name, \ | |
67 | TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \ | |
68 | TP_ARGS(spa, offset, size)) | |
69 | /* END CSTYLED */ | |
70 | DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__synced); | |
71 | DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__unvisited); | |
72 | ||
73 | /* | |
74 | * Generic support for four argument tracepoints of the form: | |
75 | * | |
76 | * DTRACE_PROBE4(..., | |
77 | * spa_t *, ..., | |
78 | * uint64_t, ..., | |
79 | * uint64_t, ..., | |
80 | * uint64_t, ...); | |
81 | */ | |
82 | /* BEGIN CSTYLED */ | |
83 | DECLARE_EVENT_CLASS(zfs_removing_class_4, | |
84 | TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size, uint64_t txg), | |
85 | TP_ARGS(spa, offset, size, txg), | |
86 | TP_STRUCT__entry( | |
87 | __field(spa_t *, vdev_spa) | |
88 | __field(uint64_t, vdev_offset) | |
89 | __field(uint64_t, vdev_size) | |
90 | __field(uint64_t, vdev_txg) | |
91 | ), | |
92 | TP_fast_assign( | |
93 | __entry->vdev_spa = spa; | |
94 | __entry->vdev_offset = offset; | |
95 | __entry->vdev_size = size; | |
96 | __entry->vdev_txg = txg; | |
97 | ), | |
98 | TP_printk("spa %p offset %llu size %llu txg %llu", | |
99 | __entry->vdev_spa, __entry->vdev_offset, | |
100 | __entry->vdev_size, __entry->vdev_txg) | |
101 | ); | |
102 | ||
103 | /* BEGIN CSTYLED */ | |
104 | #define DEFINE_REMOVE_FREE_EVENT_TXG(name) \ | |
105 | DEFINE_EVENT(zfs_removing_class_4, name, \ | |
106 | TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \ | |
107 | TP_ARGS(spa, offset, size, txg)) | |
108 | /* END CSTYLED */ | |
109 | DEFINE_REMOVE_FREE_EVENT_TXG(zfs_remove__free__inflight); | |
110 | ||
111 | #endif /* _TRACE_VDEV_H */ | |
112 | ||
113 | #undef TRACE_INCLUDE_PATH | |
114 | #undef TRACE_INCLUDE_FILE | |
115 | #define TRACE_INCLUDE_PATH sys | |
116 | #define TRACE_INCLUDE_FILE trace_vdev | |
117 | #include <trace/define_trace.h> | |
118 | ||
119 | #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */ |