summaryrefslogtreecommitdiff
path: root/sys/dev/lockstat.h
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2015-03-08 22:45:16 +0000
committerchristos <christos@NetBSD.org>2015-03-08 22:45:16 +0000
commite6df83a65039d4cfab2bdc8346acf55e8fcf329d (patch)
tree1fb56c3e1450076f922cac9039d8e8181e6f1175 /sys/dev/lockstat.h
parent42f7e7f2ae51aeaae06bdd45eba11f7f6443ea39 (diff)
dtrace bits from riastradh
Diffstat (limited to 'sys/dev/lockstat.h')
-rw-r--r--sys/dev/lockstat.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/lockstat.h b/sys/dev/lockstat.h
index d3d0e91b319..ef95d7c0562 100644
--- a/sys/dev/lockstat.h
+++ b/sys/dev/lockstat.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lockstat.h,v 1.10 2009/01/20 14:49:00 yamt Exp $ */
+/* $NetBSD: lockstat.h,v 1.11 2015/03/08 22:45:16 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
#define _SYS_LOCKSTAT_H_
#ifdef _KERNEL_OPT
+#include "opt_dtrace.h"
#include <lockstat.h>
#endif
@@ -195,4 +196,17 @@ extern volatile u_int lockstat_enabled;
#endif
+#ifdef KDTRACE_HOOKS
+#define LS_COMPRESS(f) \
+ ((((f) & 3) | (((f) & 7) >> 6)) & (LS_NPROBES - 1))
+#define LS_NPROBES 0x20 /* 5 bits */
+
+extern uint32_t lockstat_probemap[];
+extern void (*lockstat_probe_func)(uint32_t, uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t, uintptr_t);
+
+void lockstat_probe_stub(uint32_t, uintptr_t, uintptr_t,
+ uintptr_t, uintptr_t, uintptr_t);
+#endif
+
#endif /* _SYS_LOCKSTAT_H_ */