aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lockstat.h
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2015-07-18 00:57:30 +0000
committerMark Johnston <markj@FreeBSD.org>2015-07-18 00:57:30 +0000
commite2b25737ee5492d8c05810f1fc4cd1eb13a10fae (patch)
tree48bc169b760d8c8ec849015d1d70e37b2d8315d4 /sys/sys/lockstat.h
parentefe8b26b82a7fc541e2f6a112ce34bf7a3d84973 (diff)
downloadsrc-e2b25737ee5492d8c05810f1fc4cd1eb13a10fae.tar.gz
src-e2b25737ee5492d8c05810f1fc4cd1eb13a10fae.zip
Pass the lock object to lockstat_nsecs() and return immediately if
LO_NOPROFILE is set. Some timecounter handlers acquire a spin mutex, and we don't want to recurse if lockstat probes are enabled. PR: 201642 Reviewed by: avg MFC after: 3 days
Notes
Notes: svn path=/head/; revision=285664
Diffstat (limited to 'sys/sys/lockstat.h')
-rw-r--r--sys/sys/lockstat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/lockstat.h b/sys/sys/lockstat.h
index b550e8d27c34..b9a900d9f9e0 100644
--- a/sys/sys/lockstat.h
+++ b/sys/sys/lockstat.h
@@ -149,11 +149,12 @@
* The following must match the type definition of dtrace_probe. It is
* defined this way to avoid having to rely on CDDL code.
*/
+struct lock_object;
extern uint32_t lockstat_probemap[LS_NPROBES];
typedef void (*lockstat_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1,
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4);
extern lockstat_probe_func_t lockstat_probe_func;
-extern uint64_t lockstat_nsecs(void);
+extern uint64_t lockstat_nsecs(struct lock_object *);
extern int lockstat_enabled;
#ifdef KDTRACE_HOOKS