lockstat.h (285663) | lockstat.h (285664) |
---|---|
1/*- 2 * Copyright (c) 2008-2009 Stacey Son <sson@FreeBSD.org> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * | 1/*- 2 * Copyright (c) 2008-2009 Stacey Son <sson@FreeBSD.org> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/sys/lockstat.h 285663 2015-07-18 00:22:00Z markj $ | 25 * $FreeBSD: head/sys/sys/lockstat.h 285664 2015-07-18 00:57:30Z markj $ |
26 */ 27 28/* 29 * DTrace lockstat provider definitions 30 * 31 */ 32 33#ifndef _SYS_LOCKSTAT_H --- 110 unchanged lines hidden (view full) --- 144#define LSX_UPGRADE (LS_TYPE_SX "-" LS_UPGRADE) 145#define LSX_DOWNGRADE (LS_TYPE_SX "-" LS_DOWNGRADE) 146#define LST_SPIN (LS_TYPE_THREAD "-" LS_SPIN) 147 148/* 149 * The following must match the type definition of dtrace_probe. It is 150 * defined this way to avoid having to rely on CDDL code. 151 */ | 26 */ 27 28/* 29 * DTrace lockstat provider definitions 30 * 31 */ 32 33#ifndef _SYS_LOCKSTAT_H --- 110 unchanged lines hidden (view full) --- 144#define LSX_UPGRADE (LS_TYPE_SX "-" LS_UPGRADE) 145#define LSX_DOWNGRADE (LS_TYPE_SX "-" LS_DOWNGRADE) 146#define LST_SPIN (LS_TYPE_THREAD "-" LS_SPIN) 147 148/* 149 * The following must match the type definition of dtrace_probe. It is 150 * defined this way to avoid having to rely on CDDL code. 151 */ |
152struct lock_object; |
|
152extern uint32_t lockstat_probemap[LS_NPROBES]; 153typedef void (*lockstat_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1, 154 uintptr_t arg2, uintptr_t arg3, uintptr_t arg4); 155extern lockstat_probe_func_t lockstat_probe_func; | 153extern uint32_t lockstat_probemap[LS_NPROBES]; 154typedef void (*lockstat_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1, 155 uintptr_t arg2, uintptr_t arg3, uintptr_t arg4); 156extern lockstat_probe_func_t lockstat_probe_func; |
156extern uint64_t lockstat_nsecs(void); | 157extern uint64_t lockstat_nsecs(struct lock_object *); |
157extern int lockstat_enabled; 158 159#ifdef KDTRACE_HOOKS 160/* 161 * Macros to record lockstat probes. 162 */ 163#define LOCKSTAT_RECORD4(probe, lp, arg1, arg2, arg3, arg4) do { \ 164 uint32_t id; \ --- 60 unchanged lines hidden --- | 158extern int lockstat_enabled; 159 160#ifdef KDTRACE_HOOKS 161/* 162 * Macros to record lockstat probes. 163 */ 164#define LOCKSTAT_RECORD4(probe, lp, arg1, arg2, arg3, arg4) do { \ 165 uint32_t id; \ --- 60 unchanged lines hidden --- |