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_dbgmsg
31 #if !defined(_TRACE_DBGMSG_H) || defined(TRACE_HEADER_MULTI_READ)
32 #define _TRACE_DBGMSG_H
34 #include <linux/tracepoint.h>
37 * This file defines tracepoint events for use by the dbgmsg(),
38 * dprintf(), and SET_ERROR() interfaces. These are grouped here because
39 * they all provide a way to store simple messages in the debug log (as
40 * opposed to events used by the DTRACE_PROBE interfaces which typically
41 * dump structured data).
43 * This header is included inside the trace.h multiple inclusion guard,
44 * and it is guarded above against direct inclusion, so it and need not
45 * be guarded separately.
49 * Generic support for one argument tracepoints of the form:
55 DECLARE_EVENT_CLASS(zfs_dprintf_class
,
56 TP_PROTO(const char *msg
),
62 __assign_str(msg
, msg
);
64 TP_printk("%s", __get_str(msg
))
69 #define DEFINE_DPRINTF_EVENT(name) \
70 DEFINE_EVENT(zfs_dprintf_class, name, \
71 TP_PROTO(const char *msg), \
74 DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf
);
76 #endif /* _TRACE_DBGMSG_H */
78 #undef TRACE_INCLUDE_PATH
79 #undef TRACE_INCLUDE_FILE
80 #define TRACE_INCLUDE_PATH sys
81 #define TRACE_INCLUDE_FILE trace_dbgmsg
82 #include <trace/define_trace.h>
86 DEFINE_DTRACE_PROBE1(zfs__dprintf
);
88 #endif /* HAVE_DECLARE_EVENT_CLASS */