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;
                }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to