BRT: Check bv_mos_entries in brt_entry_lookup()
[zfs.git] / include / os / linux / spl / sys / trace_taskq.h
blob0e25e642f27995830c2c48614140c8e9c07d881d
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 https://opensource.org/licenses/CDDL-1.0.
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 DECLARE_EVENT_CLASS(zfs_taskq_ent_class,
44 TP_PROTO(taskq_ent_t *taskq_ent),
45 TP_ARGS(taskq_ent),
46 TP_STRUCT__entry(__field(taskq_ent_t *, taskq_ent)),
47 TP_fast_assign(
48 __entry->taskq_ent = taskq_ent;
50 TP_printk("taskq_ent %p", __entry->taskq_ent)
53 #define DEFINE_TASKQ_EVENT(name) \
54 DEFINE_EVENT(zfs_taskq_ent_class, name, \
55 TP_PROTO(taskq_ent_t *taskq_ent), \
56 TP_ARGS(taskq_ent))
57 DEFINE_TASKQ_EVENT(zfs_taskq_ent__birth);
58 DEFINE_TASKQ_EVENT(zfs_taskq_ent__start);
59 DEFINE_TASKQ_EVENT(zfs_taskq_ent__finish);
61 #endif /* _TRACE_TASKQ_H */
63 #undef TRACE_INCLUDE_PATH
64 #undef TRACE_INCLUDE_FILE
65 #define TRACE_INCLUDE_PATH sys
66 #define TRACE_INCLUDE_FILE trace_taskq
67 #include <trace/define_trace.h>
69 #else
72 * When tracepoints are not available, a DEFINE_DTRACE_PROBE* macro is
73 * needed for each DTRACE_PROBE. These will be used to generate stub
74 * tracing functions and prototypes for those functions. See
75 * include/os/linux/spl/sys/trace.h.
78 DEFINE_DTRACE_PROBE1(taskq_ent__birth);
79 DEFINE_DTRACE_PROBE1(taskq_ent__start);
80 DEFINE_DTRACE_PROBE1(taskq_ent__finish);
82 #endif /* HAVE_DECLARE_EVENT_CLASS */
83 #endif /* _KERNEL */