aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-08-21 23:43:58 +0000
committerMark Johnston <markj@FreeBSD.org>2019-08-21 23:43:58 +0000
commit5b699f1614221b8b158ea47562ab84a6dce34c72 (patch)
tree28914c3796c5288b5a71cc791d34b1a5ee928746 /cddl/contrib/opensolaris/cmd
parent81f666e79dfde97ef26a61863b08c9e59eeb32c1 (diff)
downloadsrc-5b699f1614221b8b158ea47562ab84a6dce34c72.tar.gz
src-5b699f1614221b8b158ea47562ab84a6dce34c72.zip
Add lockmgr(9) probes to the lockstat DTrace provider.
They follow the conventions set by rw and sx lock probes. There is an additional lockstat:::lockmgr-disown probe. Update lockstat(1) to report on contention and hold events for lockmgr locks. Document the new probes in dtrace_lockstat.4, and deduplicate some of the existing probe descriptions. Reviewed by: mjg MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21355
Notes
Notes: svn path=/head/; revision=351361
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
-rw-r--r--cddl/contrib/opensolaris/cmd/lockstat/lockstat.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
index 36a86b08377e..84796c3b004a 100644
--- a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
+++ b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c
@@ -158,29 +158,33 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
{ 'C', "Lock", "R/W writer blocked by readers", "nsec",
"lockstat:::rw-block", "arg2 == 0 && arg3 == 0 && arg4" },
{ 'C', "Lock", "R/W reader blocked by writer", "nsec",
- "lockstat:::rw-block", "arg2 != 0 && arg3 == 1" },
+ "lockstat:::rw-block", "arg2 == 1 && arg3 == 1" },
{ 'C', "Lock", "R/W reader blocked by write wanted", "nsec",
- "lockstat:::rw-block", "arg2 != 0 && arg3 == 0 && arg4" },
+ "lockstat:::rw-block", "arg2 == 1 && arg3 == 0 && arg4" },
{ 'C', "Lock", "R/W writer spin on writer", "nsec",
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 1" },
{ 'C', "Lock", "R/W writer spin on readers", "nsec",
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 0 && arg4" },
{ 'C', "Lock", "R/W reader spin on writer", "nsec",
- "lockstat:::rw-spin", "arg2 != 0 && arg3 == 1" },
+ "lockstat:::rw-spin", "arg2 == 1 && arg3 == 1" },
{ 'C', "Lock", "R/W reader spin on write wanted", "nsec",
- "lockstat:::rw-spin", "arg2 != 0 && arg3 == 0 && arg4" },
+ "lockstat:::rw-spin", "arg2 == 1 && arg3 == 0 && arg4" },
{ 'C', "Lock", "SX exclusive block", "nsec",
"lockstat:::sx-block", "arg2 == 0" },
{ 'C', "Lock", "SX shared block", "nsec",
- "lockstat:::sx-block", "arg2 != 0" },
+ "lockstat:::sx-block", "arg2 == 1" },
{ 'C', "Lock", "SX exclusive spin", "nsec",
"lockstat:::sx-spin", "arg2 == 0" },
{ 'C', "Lock", "SX shared spin", "nsec",
- "lockstat:::sx-spin", "arg2 != 0" },
- { 'C', "Lock", "Unknown event (type 16)", "units" },
- { 'C', "Lock", "Unknown event (type 17)", "units" },
- { 'C', "Lock", "Unknown event (type 18)", "units" },
- { 'C', "Lock", "Unknown event (type 19)", "units" },
+ "lockstat:::sx-spin", "arg2 == 1" },
+ { 'C', "Lock", "lockmgr writer blocked by writer", "nsec",
+ "lockstat:::lockmgr-block", "arg2 == 0 && arg3 == 1" },
+ { 'C', "Lock", "lockmgr writer blocked by readers", "nsec",
+ "lockstat:::lockmgr-block", "arg2 == 0 && arg3 == 0 && arg4" },
+ { 'C', "Lock", "lockmgr reader blocked by writer", "nsec",
+ "lockstat:::lockmgr-block", "arg2 == 1 && arg3 == 1" },
+ { 'C', "Lock", "lockmgr reader blocked by write wanted", "nsec",
+ "lockstat:::lockmgr-block", "arg2 == 1 && arg3 == 0 && arg4" },
{ 'C', "Lock", "Unknown event (type 20)", "units" },
{ 'C', "Lock", "Unknown event (type 21)", "units" },
{ 'C', "Lock", "Unknown event (type 22)", "units" },