freebsd-dev/cddl
Andriy Gapon 076dd8eb2e several lockstat improvements
0. For spin events report time spent spinning, not a loop count.
While loop count is much easier and cheaper to obtain it is hard
to reason about the reported numbers, espcially for adaptive locks
where both spinning and sleeping can happen.
So, it's better to compare apples and apples.

1. Teach lockstat about FreeBSD rw locks.
This is done in part by changing the corresponding probes
and in part by changing what probes lockstat should expect.

2. Teach lockstat that rw locks are adaptive and can spin on FreeBSD.

3. Report lock acquisition events for successful rw try-lock operations.

4. Teach lockstat about FreeBSD sx locks.
Reporting of events for those locks completely mirrors
rw locks.

5. Report spin and block events before acquisition event.
This is behavior documented for the upstream, so it makes sense to stick
to it.  Note that because of FreeBSD adaptive lock implementations
both the spin and block events may be reported for the same acquisition
while the upstream reports only one of them.

Differential Revision:	https://reviews.freebsd.org/D2727
Reviewed by:	markj
MFC after:	17 days
Relnotes:	yes
Sponsored by:	ClusterHQ
2015-06-12 10:01:24 +00:00
..
compat/opensolaris Use calloc() instead of malloc() + bzero(). This also gets rid of a warning 2014-12-08 06:10:47 +00:00
contrib several lockstat improvements 2015-06-12 10:01:24 +00:00
lib Add dependencies for libzfs_core and libzpool I missed on my first pass on this 2015-05-20 11:16:17 +00:00
sbin Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are 2015-05-20 12:26:09 +00:00
tests Add placeholder Kyuafiles for various top-level hierarchies. 2014-04-21 21:39:25 +00:00
usr.bin Remove stray DEBUG_FLAGS=-g that's been here since the initial import. 2015-05-21 14:36:12 +00:00
usr.sbin Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are 2015-05-20 12:26:09 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.inc Make DTrace stuff compile with C99 standard. 2014-08-22 20:04:51 +00:00