]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - include/sys/trace_zrlock.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 #undef TRACE_SYSTEM_VAR
28 #define TRACE_SYSTEM_VAR zfs_zrlock
30 #if !defined(_TRACE_ZRLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
31 #define _TRACE_ZRLOCK_H
33 #include <linux/tracepoint.h>
34 #include <sys/types.h>
37 * Generic support for two argument tracepoints of the form:
44 DECLARE_EVENT_CLASS(zfs_zrlock_class
,
45 TP_PROTO(zrlock_t
*zrl
, uint32_t n
),
48 __field(int32_t, refcount
)
50 __field(pid_t
, owner_pid
)
51 __field(const char *, caller
)
56 __entry
->refcount
= zrl
->zr_refcount
;
58 __entry
->owner_pid
= zrl
->zr_owner
? zrl
->zr_owner
->pid
: 0;
59 __entry
->caller
= zrl
->zr_caller
;
64 TP_printk("zrl { refcount %d owner_pid %d caller %s } n %u",
65 __entry
->refcount
, __entry
->owner_pid
, __entry
->caller
,
68 TP_printk("zrl { refcount %d } n %u",
69 __entry
->refcount
, __entry
->n
)
73 #define DEFINE_ZRLOCK_EVENT(name) \
74 DEFINE_EVENT(zfs_zrlock_class, name, \
75 TP_PROTO(zrlock_t *zrl, uint32_t n), \
77 DEFINE_ZRLOCK_EVENT(zfs_zrlock__reentry
);
79 #endif /* _TRACE_ZRLOCK_H */
81 #undef TRACE_INCLUDE_PATH
82 #undef TRACE_INCLUDE_FILE
83 #define TRACE_INCLUDE_PATH sys
84 #define TRACE_INCLUDE_FILE trace_zrlock
85 #include <trace/define_trace.h>
87 #endif /* _KERNEL && HAVE_DECLARE_EVENT_CLASS */