From 8a4ec68a770c096678746c643b943d9b60432bab Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 4 Jul 2006 17:35:30 +0000 Subject: [PATCH] 1) Hook pctrack into the build. 2) Add DEBUG_PCTRACK to LINT. 3) Perform some minor mdoc cleanup on the manual page. --- sys/config/LINT | 6 +++++- sys/i386/conf/LINT | 6 +++++- usr.bin/Makefile | 3 ++- usr.bin/pctrack/pctrack.8 | 22 ++++++++++++---------- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/sys/config/LINT b/sys/config/LINT index 8f916bb702..ff3d76b8df 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -3,7 +3,7 @@ # as much of the source tree as it can. # # $FreeBSD: src/sys/i386/conf/LINT,v 1.749.2.144 2003/06/04 17:56:59 sam Exp $ -# $DragonFly: src/sys/config/LINT,v 1.85 2006/07/02 12:55:44 swildner Exp $ +# $DragonFly: src/sys/config/LINT,v 1.86 2006/07/04 17:35:30 swildner Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -2627,6 +2627,10 @@ options BUS_DEBUG # enable newbus debugging options DEBUG_VFS_LOCKS # enable vfs lock debugging options NPX_DEBUG # enable npx debugging (FPU/math emu) +# Record the program counter of the code interrupted by the statistics +# clock interrupt. Use pctrack(8) to dump this information. +options DEBUG_PCTRACK + # More undocumented options for linting. # Note that documenting these are not considered an affront. diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index de41a1b8af..c865944f0a 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -3,7 +3,7 @@ # as much of the source tree as it can. # # $FreeBSD: src/sys/i386/conf/LINT,v 1.749.2.144 2003/06/04 17:56:59 sam Exp $ -# $DragonFly: src/sys/i386/conf/Attic/LINT,v 1.85 2006/07/02 12:55:44 swildner Exp $ +# $DragonFly: src/sys/i386/conf/Attic/LINT,v 1.86 2006/07/04 17:35:30 swildner Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -2627,6 +2627,10 @@ options BUS_DEBUG # enable newbus debugging options DEBUG_VFS_LOCKS # enable vfs lock debugging options NPX_DEBUG # enable npx debugging (FPU/math emu) +# Record the program counter of the code interrupted by the statistics +# clock interrupt. Use pctrack(8) to dump this information. +options DEBUG_PCTRACK + # More undocumented options for linting. # Note that documenting these are not considered an affront. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 608664633a..fdebc58299 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,6 +1,6 @@ # From: @(#)Makefile 8.3 (Berkeley) 1/7/94 # $FreeBSD: src/usr.bin/Makefile,v 1.144.2.17 2003/01/04 17:17:07 obrien Exp $ -# $DragonFly: src/usr.bin/Makefile,v 1.32 2006/07/01 10:47:39 eirikn Exp $ +# $DragonFly: src/usr.bin/Makefile,v 1.33 2006/07/04 17:35:30 swildner Exp $ # XXX MISSING: deroff diction graph learn plot # spell spline struct xsend @@ -134,6 +134,7 @@ SUBDIR= alias \ paste \ patch \ pathchk \ + pctrack \ pkill \ pr \ printenv \ diff --git a/usr.bin/pctrack/pctrack.8 b/usr.bin/pctrack/pctrack.8 index cd679a999a..595d8db5a4 100644 --- a/usr.bin/pctrack/pctrack.8 +++ b/usr.bin/pctrack/pctrack.8 @@ -31,14 +31,14 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $DragonFly: src/usr.bin/pctrack/pctrack.8,v 1.1 2006/06/08 18:48:30 dillon Exp $ +.\" $DragonFly: src/usr.bin/pctrack/pctrack.8,v 1.2 2006/07/04 17:35:30 swildner Exp $ .\" .Dd Jun 8, 2006 .Dt PCTRACK 8 .Os .Sh NAME .Nm pctrack -.Nd print kernel system/interrupt pc sampling history +.Nd print kernel system/interrupt PC sampling history .Sh SYNOPSIS .Nm .Op Fl fnsi @@ -47,7 +47,9 @@ .Op Fl M Ar corefile .Op Ar interval .Sh DESCRIPTION -Kernels compiled with DEBUG_PCTRACK record the program counter (PC) of +Kernels compiled with +.Dv DEBUG_PCTRACK +record the program counter (PC) of the code interrupted by the statistics clock interrupt. This information can be dumped with the .Nm @@ -56,12 +58,12 @@ utility The following options are available: .Bl -tag -width ".Fl N Ar execfile" .It Fl c Ar cpu -Specify which cpu to dump. If not specified, all cpus will be dumped. +Specify which CPU to dump. If not specified, all CPUs will be dumped. .It Fl f -If a single cpu and either -.Op Fl i +If a single CPU and either +.Fl i or -.Op Fl s +.Fl s is specified, this option will use the repeat interval to detect changes and dump them as they occur. .It Fl i @@ -69,9 +71,9 @@ Dump the interrupt tracking buffer. .It Fl s Dump the kernel tracking buffer. If neither -.Op Fl i +.Fl i or -.Op Fl s +.Fl s is specified, both tracking buffers will be dumped. .It Fl n .Nm @@ -86,7 +88,7 @@ The core file or memory image to read from. The default is .Pa /dev/mem . .El -.Sh OPERATIONAL NOTES +.\".Sh OPERATIONAL NOTES .Sh HISTORY The .Nm -- 2.41.0