summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-12-02 20:40:35 +0000
committerrwatson <rwatson@FreeBSD.org>2007-12-02 20:40:35 +0000
commit99285f7544399971d1bcb6e3c18e7010905925e5 (patch)
tree25f0781d4e40520309936f686c0accc99753b656 /sys/conf
parente6e32be1d57fbe0f67adfd9c0cb818a1660dca5a (diff)
downloadFreeBSD-src-99285f7544399971d1bcb6e3c18e7010905925e5.zip
FreeBSD-src-99285f7544399971d1bcb6e3c18e7010905925e5.tar.gz
Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9). - Introduce per-architecture machine/stack.h to capture any common definitions required between db_trace.c and stack_machdep.c. - Add new kernel option "options STACK"; we will build in stack(9) if it is defined, or also if "options DDB" is defined to provide compatibility with existing users of stack(9). Add new stack_save_td(9) function, which allows the capture of a stacktrace of another thread rather than the current thread, which the existing stack_save(9) was limited to. It requires that the thread be neither swapped out nor running, which is the responsibility of the consumer to enforce. Update stack(9) man page. Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/NOTES7
-rw-r--r--sys/conf/files2
-rw-r--r--sys/conf/files.amd641
-rw-r--r--sys/conf/files.arm1
-rw-r--r--sys/conf/files.i3861
-rw-r--r--sys/conf/files.ia641
-rw-r--r--sys/conf/files.powerpc1
-rw-r--r--sys/conf/files.sparc641
-rw-r--r--sys/conf/files.sun4v1
-rw-r--r--sys/conf/options1
10 files changed, 16 insertions, 1 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 2f62598..eb66fa7 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -465,6 +465,13 @@ options REGRESSION
#
options COMPILING_LINT
+#
+# STACK enables the stack(9) facility, allowing the capture of kernel stack
+# for the purpose of procinfo(1), etc. stack(9) will also be compiled in
+# automatically if DDB(4) is compiled into the kernel.
+#
+options STACK
+
#####################################################################
# PERFORMANCE MONITORING OPTIONS
diff --git a/sys/conf/files b/sys/conf/files
index ff4d8f2..a0a796d 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1504,7 +1504,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
+kern/subr_stack.c optional ddb | stack
kern/subr_taskqueue.c standard
kern/subr_trap.c standard
kern/subr_turnstile.c standard
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index dbe920d..8276f85 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -119,6 +119,7 @@ amd64/amd64/nexus.c standard
amd64/amd64/pmap.c standard nowerror
amd64/amd64/prof_machdep.c optional profiling-routine
amd64/amd64/sigtramp.S standard
+amd64/amd64/stack_machdep.c optional ddb | stack
amd64/amd64/support.S standard
amd64/amd64/sys_machdep.c standard
amd64/amd64/trap.c standard
diff --git a/sys/conf/files.arm b/sys/conf/files.arm
index 42eb602..3cb7a5c 100644
--- a/sys/conf/files.arm
+++ b/sys/conf/files.arm
@@ -34,6 +34,7 @@ arm/arm/nexus.c standard
arm/arm/pmap.c standard
arm/arm/setcpsr.S standard
arm/arm/setstack.s standard
+arm/arm/stack_machdep.c optional ddb | stack
arm/arm/support.S standard
arm/arm/swtch.S standard
arm/arm/sys_machdep.c standard
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 1ddcb4c..9e43eca 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -308,6 +308,7 @@ i386/i386/nexus.c standard
i386/i386/perfmon.c optional perfmon
i386/i386/pmap.c standard nowerror
i386/i386/ptrace_machdep.c standard
+i386/i386/stack_machdep.c optional ddb | stack
i386/i386/support.s standard
i386/i386/swtch.s standard
i386/i386/sys_machdep.c standard
diff --git a/sys/conf/files.ia64 b/sys/conf/files.ia64
index f2f5b36..3824fe4 100644
--- a/sys/conf/files.ia64
+++ b/sys/conf/files.ia64
@@ -98,6 +98,7 @@ ia64/ia64/sapic.c standard
ia64/ia64/setjmp.S standard
ia64/ia64/ssc.c optional ski
ia64/ia64/sscdisk.c optional ski
+ia64/ia64/stack_machdep.c optional ddb | stack
ia64/ia64/support.S standard
ia64/ia64/sys_machdep.c standard
ia64/ia64/syscall.S standard
diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc
index fc72f32..3e85464 100644
--- a/sys/conf/files.powerpc
+++ b/sys/conf/files.powerpc
@@ -61,6 +61,7 @@ powerpc/powerpc/pmap_dispatch.c standard
powerpc/powerpc/sc_machdep.c optional sc
powerpc/powerpc/setjmp.S standard
powerpc/powerpc/sigcode.S standard
+powerpc/powerpc/stack_machdep.c optional ddb | stack
powerpc/powerpc/suswintr.c standard
powerpc/powerpc/syncicache.c standard
powerpc/powerpc/sys_machdep.c standard
diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64
index 5f29180..3a0f6f0 100644
--- a/sys/conf/files.sparc64
+++ b/sys/conf/files.sparc64
@@ -124,6 +124,7 @@ sparc64/sparc64/rtc.c optional rtc ebus | rtc isa
sparc64/sparc64/rwindow.c standard
sparc64/sparc64/sc_machdep.c optional sc
sparc64/sparc64/spitfire.c standard
+sparc64/sparc64/stack_machdep.c optional ddb | stack
sparc64/sparc64/support.S standard
sparc64/sparc64/sys_machdep.c standard
sparc64/sparc64/swtch.S standard
diff --git a/sys/conf/files.sun4v b/sys/conf/files.sun4v
index 37dfc32..700ca8a 100644
--- a/sys/conf/files.sun4v
+++ b/sys/conf/files.sun4v
@@ -74,6 +74,7 @@ sparc64/sparc64/prof_machdep.c optional profiling-routine
sparc64/sparc64/rwindow.c standard
sun4v/sun4v/rtc.c standard
sun4v/sun4v/simdisk.c optional simulator
+sun4v/sun4v/stack_machdep.c optional ddb | stack
sun4v/sun4v/support.S standard
sparc64/sparc64/sys_machdep.c standard
sun4v/sun4v/swtch.S standard
diff --git a/sys/conf/options b/sys/conf/options
index 143c0aa..3f9769a 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -140,6 +140,7 @@ SHOW_BUSYBUFS
SLEEPQUEUE_PROFILING
SLHCI_DEBUG opt_slhci.h
SPX_HACK
+STACK opt_stack.h
SUIDDIR
MSGMNB opt_sysvipc.h
MSGMNI opt_sysvipc.h
OpenPOWER on IntegriCloud