]>
Commit | Line | Data |
---|---|---|
cae5b340 AX |
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 | #include <sys/list.h> | |
23 | ||
24 | #if defined(_KERNEL) && defined(HAVE_DECLARE_EVENT_CLASS) | |
25 | ||
26 | #undef TRACE_SYSTEM | |
27 | #define TRACE_SYSTEM zfs | |
28 | ||
29 | #undef TRACE_SYSTEM_VAR | |
30 | #define TRACE_SYSTEM_VAR zfs_zio | |
31 | ||
32 | #if !defined(_TRACE_ZIO_H) || defined(TRACE_HEADER_MULTI_READ) | |
33 | #define _TRACE_ZIO_H | |
34 | ||
35 | #include <linux/tracepoint.h> | |
36 | #include <sys/types.h> | |
37 | #include <sys/trace_common.h> /* For ZIO macros */ | |
38 | ||
39 | /* BEGIN CSTYLED */ | |
40 | TRACE_EVENT(zfs_zio__delay__miss, | |
41 | TP_PROTO(zio_t *zio, hrtime_t now), | |
42 | TP_ARGS(zio, now), | |
43 | TP_STRUCT__entry( | |
44 | ZIO_TP_STRUCT_ENTRY | |
45 | __field(hrtime_t, now) | |
46 | ), | |
47 | TP_fast_assign( | |
48 | ZIO_TP_FAST_ASSIGN | |
49 | __entry->now = now; | |
50 | ), | |
51 | TP_printk("now %llu " ZIO_TP_PRINTK_FMT, __entry->now, | |
52 | ZIO_TP_PRINTK_ARGS) | |
53 | ); | |
54 | ||
55 | TRACE_EVENT(zfs_zio__delay__hit, | |
56 | TP_PROTO(zio_t *zio, hrtime_t now, hrtime_t diff), | |
57 | TP_ARGS(zio, now, diff), | |
58 | TP_STRUCT__entry( | |
59 | ZIO_TP_STRUCT_ENTRY | |
60 | __field(hrtime_t, now) | |
61 | __field(hrtime_t, diff) | |
62 | ), | |
63 | TP_fast_assign( | |
64 | ZIO_TP_FAST_ASSIGN | |
65 | __entry->now = now; | |
66 | __entry->diff = diff; | |
67 | ), | |
68 | TP_printk("now %llu diff %llu " ZIO_TP_PRINTK_FMT, __entry->now, | |
69 | __entry->diff, ZIO_TP_PRINTK_ARGS) | |
70 | ); | |
71 | ||
72 | TRACE_EVENT(zfs_zio__delay__skip, | |
73 | TP_PROTO(zio_t *zio), | |
74 | TP_ARGS(zio), | |
75 | TP_STRUCT__entry(ZIO_TP_STRUCT_ENTRY), | |
76 | TP_fast_assign(ZIO_TP_FAST_ASSIGN), | |
77 | TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS) | |
78 | ); | |
79 | /* END CSTYLED */ | |
80 | ||
81 | #endif /* _TRACE_ZIO_H */ | |
82 | ||
83 | #undef TRACE_INCLUDE_PATH | |
84 | #undef TRACE_INCLUDE_FILE | |
85 | #define TRACE_INCLUDE_PATH sys | |
86 | #define TRACE_INCLUDE_FILE trace_zio | |
87 | #include <trace/define_trace.h> | |
88 | ||
89 | #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */ |