From 6ad06a5e50a1e1ea91e25346e15656d2259b3ed8 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 21 Aug 2019 23:13:00 +0000 Subject: [PATCH] Fix inverted predicates for sx lock hold events in lockstat(1). This caused shared sx holds to be reported as exclusive, and vice versa. Reviewed by: mjg MFC after: 3 days Sponsored by: The FreeBSD Foundation --- cddl/contrib/opensolaris/cmd/lockstat/lockstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c index 38bf681325e6..36a86b08377e 100644 --- a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c +++ b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c @@ -206,10 +206,10 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = { "lockstat:::rw-release", "arg1 == 1", "lockstat:::rw-acquire" }, { 'H', "Lock", "SX shared hold", "nsec", - "lockstat:::sx-release", "arg1 == 0", + "lockstat:::sx-release", "arg1 == 1", "lockstat:::sx-acquire" }, { 'H', "Lock", "SX exclusive hold", "nsec", - "lockstat:::sx-release", "arg1 == 1", + "lockstat:::sx-release", "arg1 == 0", "lockstat:::sx-acquire" }, { 'H', "Lock", "Unknown event (type 38)", "units" }, { 'H', "Lock", "Unknown event (type 39)", "units" },