summaryrefslogtreecommitdiffstats
path: root/sys/cddl/dev
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-07-21 17:16:37 +0000
committermarkj <markj@FreeBSD.org>2015-07-21 17:16:37 +0000
commit84c91edd5356f5693f0ecd74d787e98b52fee0b4 (patch)
treee3d69a4db0089a008c7c2596149b6277d1473fbf /sys/cddl/dev
parent10c80a84dab9d6dfc505ebcda9ca49b6caa78f90 (diff)
downloadFreeBSD-src-84c91edd5356f5693f0ecd74d787e98b52fee0b4.zip
FreeBSD-src-84c91edd5356f5693f0ecd74d787e98b52fee0b4.tar.gz
MFC r285663, r285664, r285667:
Ensure that locstat_nsecs() has no effect when lockstat probes are not enabled or when the profiled lock carries the LO_NOPROFILE flag. PR: 201642, 201517 Approved by: re (gjb) Tested by: Jason Unovitch
Diffstat (limited to 'sys/cddl/dev')
-rw-r--r--sys/cddl/dev/lockstat/lockstat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/dev/lockstat/lockstat.c b/sys/cddl/dev/lockstat/lockstat.c
index 9b3f7d7..bd7c812 100644
--- a/sys/cddl/dev/lockstat/lockstat.c
+++ b/sys/cddl/dev/lockstat/lockstat.c
@@ -161,6 +161,8 @@ lockstat_enable(void *arg, dtrace_id_t id, void *parg)
ASSERT(!lockstat_probemap[probe->lsp_probe]);
+ lockstat_enabled++;
+
lockstat_probemap[probe->lsp_probe] = id;
#ifdef DOODAD
membar_producer();
@@ -184,6 +186,8 @@ lockstat_disable(void *arg, dtrace_id_t id, void *parg)
ASSERT(lockstat_probemap[probe->lsp_probe]);
+ lockstat_enabled--;
+
lockstat_probemap[probe->lsp_probe] = 0;
#ifdef DOODAD
lockstat_hot_patch();
OpenPOWER on IntegriCloud