]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - zfs/include/sys/trace.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_ZFS_H) || defined(TRACE_HEADER_MULTI_READ)
30 #include <linux/tracepoint.h>
31 #include <sys/types.h>
34 * The sys/trace_dbgmsg.h header defines tracepoint events for
35 * dprintf(), dbgmsg(), and SET_ERROR().
37 #define _SYS_TRACE_DBGMSG_INDIRECT
38 #include <sys/trace_dbgmsg.h>
39 #undef _SYS_TRACE_DBGMSG_INDIRECT
42 * Redefine the DTRACE_PROBE* functions to use Linux tracepoints
45 #define DTRACE_PROBE1(name, t1, arg1) \
46 trace_zfs_##name((arg1))
49 #define DTRACE_PROBE2(name, t1, arg1, t2, arg2) \
50 trace_zfs_##name((arg1), (arg2))
53 #define DTRACE_PROBE3(name, t1, arg1, t2, arg2, t3, arg3) \
54 trace_zfs_##name((arg1), (arg2), (arg3))
57 #define DTRACE_PROBE4(name, t1, arg1, t2, arg2, t3, arg3, t4, arg4) \
58 trace_zfs_##name((arg1), (arg2), (arg3), (arg4))
60 #endif /* _TRACE_ZFS_H */
62 #undef TRACE_INCLUDE_PATH
63 #undef TRACE_INCLUDE_FILE
64 #define TRACE_INCLUDE_PATH sys
65 #define TRACE_INCLUDE_FILE trace
66 #include <trace/define_trace.h>
68 #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */