config/dracut/90zfs: handle cases where hostid(1) returns all zeros
[zfs.git] / include / os / linux / spl / sys / trace_taskq.h
blobdbbb3c4c79609ab9c3c04984123be6b8065343ae
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
22 #if defined(_KERNEL)
23 #if defined(HAVE_DECLARE_EVENT_CLASS)
25 #undef TRACE_SYSTEM
26 #define TRACE_SYSTEM zfs
28 #undef TRACE_SYSTEM_VAR
29 #define TRACE_SYSTEM_VAR zfs_taskq
31 #if !defined(_TRACE_TASKQ_H) || defined(TRACE_HEADER_MULTI_READ)
32 #define _TRACE_TASKQ_H
34 #include <linux/tracepoint.h>
35 #include <sys/types.h>
38 * Generic support for single argument tracepoints of the form:
40 * DTRACE_PROBE1(...,
41 * taskq_ent_t *, ...);
43 /* BEGIN CSTYLED */
44 DECLARE_EVENT_CLASS(zfs_taskq_ent_class,
45 TP_PROTO(taskq_ent_t *taskq_ent),
46 TP_ARGS(taskq_ent),
47 TP_STRUCT__entry(
48 __field(taskq_ent_t *, taskq_ent)
50 TP_fast_assign(
51 __entry->taskq_ent = taskq_ent;
53 TP_printk("taskq_ent %p", __entry->taskq_ent)
55 /* END CSTYLED */
57 /* BEGIN CSTYLED */
58 #define DEFINE_TASKQ_EVENT(name) \
59 DEFINE_EVENT(zfs_taskq_ent_class, name, \
60 TP_PROTO(taskq_ent_t *taskq_ent), \
61 TP_ARGS(taskq_ent))
62 /* END CSTYLED */
63 DEFINE_TASKQ_EVENT(zfs_taskq_ent__birth);
64 DEFINE_TASKQ_EVENT(zfs_taskq_ent__start);
65 DEFINE_TASKQ_EVENT(zfs_taskq_ent__finish);
67 #endif /* _TRACE_TASKQ_H */
69 #undef TRACE_INCLUDE_PATH
70 #undef TRACE_INCLUDE_FILE
71 #define TRACE_INCLUDE_PATH sys
72 #define TRACE_INCLUDE_FILE trace_taskq
73 #include <trace/define_trace.h>
75 #else
78 * When tracepoints are not available, a DEFINE_DTRACE_PROBE* macro is
79 * needed for each DTRACE_PROBE. These will be used to generate stub
80 * tracing functions and prototypes for those functions. See
81 * include/os/linux/spl/sys/trace.h.
84 DEFINE_DTRACE_PROBE1(taskq_ent__birth);
85 DEFINE_DTRACE_PROBE1(taskq_ent__start);
86 DEFINE_DTRACE_PROBE1(taskq_ent__finish);
88 #endif /* HAVE_DECLARE_EVENT_CLASS */
89 #endif /* _KERNEL */