Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2008 21:48:28 +0000 (UTC)
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184487 - in head/sys: conf kern
Message-ID:  <200810302148.m9ULmTDu062491@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sobomax
Date: Thu Oct 30 21:48:28 2008
New Revision: 184487
URL: http://svn.freebsd.org/changeset/base/184487

Log:
  Make it possible to compile kernel with KTR but without DDB.

Modified:
  head/sys/conf/files
  head/sys/kern/subr_stack.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Oct 30 21:02:00 2008	(r184486)
+++ head/sys/conf/files	Thu Oct 30 21:48:28 2008	(r184487)
@@ -1691,7 +1691,7 @@ kern/subr_sbuf.c		standard
 kern/subr_scanf.c		standard
 kern/subr_sleepqueue.c		standard
 kern/subr_smp.c			standard
-kern/subr_stack.c		optional ddb | stack
+kern/subr_stack.c		optional ddb | stack | ktr
 kern/subr_taskqueue.c		standard
 kern/subr_trap.c		standard
 kern/subr_turnstile.c		standard

Modified: head/sys/kern/subr_stack.c
==============================================================================
--- head/sys/kern/subr_stack.c	Thu Oct 30 21:02:00 2008	(r184486)
+++ head/sys/kern/subr_stack.c	Thu Oct 30 21:48:28 2008	(r184487)
@@ -155,15 +155,18 @@ stack_sbuf_print_ddb(struct sbuf *sb, st
 		    name, offset);
 	}
 }
+#endif
 
 #ifdef KTR
 void
 stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth,
     int cheap)
 {
+#ifdef DDB
 	const char *name;
 	long offset;
 	int i;
+#endif
 
 	KASSERT(st->depth <= STACK_MAX, ("bogus stack"));
 	if (cheap) {
@@ -180,6 +183,7 @@ stack_ktr(u_int mask, const char *file, 
 		ktr_tracepoint(mask, file, line, "#2 %p %p %p %p %p %p",
 		    st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15],
 		    st->pcs[16], st->pcs[17]);
+#ifdef DDB
 	} else {
 		if (depth == 0 || st->depth < depth)
 			depth = st->depth;
@@ -188,10 +192,10 @@ stack_ktr(u_int mask, const char *file, 
 			ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx",
 			    i, st->pcs[i], (u_long)name, offset, 0, 0);
 		}
+#endif
 	}
 }
 #endif
-#endif
 
 /*
  * Two variants of stack symbol lookup -- one that uses the DDB interfaces



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