Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2016 18:02:21 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307780 - head/sys/kern
Message-ID:  <201610221802.u9MI2LXw048889@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Sat Oct 22 18:02:20 2016
New Revision: 307780
URL: https://svnweb.freebsd.org/changeset/base/307780

Log:
  ddb(4): Add sleepchains to "show allchains"
  
  Reported by:	markj
  Reviewed by:	markj
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D8320

Modified:
  head/sys/kern/subr_turnstile.c

Modified: head/sys/kern/subr_turnstile.c
==============================================================================
--- head/sys/kern/subr_turnstile.c	Sat Oct 22 17:21:21 2016	(r307779)
+++ head/sys/kern/subr_turnstile.c	Sat Oct 22 18:02:20 2016	(r307780)
@@ -157,6 +157,9 @@ static void	init_turnstile0(void *dummy)
 #ifdef TURNSTILE_PROFILING
 static void	init_turnstile_profiling(void *arg);
 #endif
+#ifdef DDB
+static void	print_sleepchain(struct thread *td, const char *prefix);
+#endif
 static void	propagate_priority(struct thread *td);
 static int	turnstile_adjust_thread(struct turnstile *ts,
 		    struct thread *td);
@@ -1169,6 +1172,10 @@ DB_SHOW_ALL_COMMAND(chains, db_show_allc
 				db_printf("chain %d:\n", i++);
 				print_lockchain(td, " ");
 			}
+			if (TD_IS_INHIBITED(td) && TD_ON_SLEEPQ(td)) {
+				db_printf("chain %d:\n", i++);
+				print_sleepchain(td, " ");
+			}
 			if (db_pager_quit)
 				return;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610221802.u9MI2LXw048889>