Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/kgmon Add a flag to turn on debugging so you don't ...



details:   https://anonhg.NetBSD.org/src/rev/86819e75def4
branches:  trunk
changeset: 495735:86819e75def4
user:      eeh <eeh%NetBSD.org@localhost>
date:      Thu Aug 03 21:14:19 2000 +0000

description:
Add a flag to turn on debugging so you don't need to recompile or patch
the binary to turn it on.

diffstat:

 usr.sbin/kgmon/kgmon.8 |   6 ++++--
 usr.sbin/kgmon/kgmon.c |  10 +++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (65 lines):

diff -r a9008fcc9c6c -r 86819e75def4 usr.sbin/kgmon/kgmon.8
--- a/usr.sbin/kgmon/kgmon.8    Thu Aug 03 21:02:04 2000 +0000
+++ b/usr.sbin/kgmon/kgmon.8    Thu Aug 03 21:14:19 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: kgmon.8,v 1.10 2000/07/03 05:21:19 enami Exp $
+.\"    $NetBSD: kgmon.8,v 1.11 2000/08/03 21:14:19 eeh Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -41,7 +41,7 @@
 .Nd generate a dump of the operating system's profile buffers
 .Sh SYNOPSIS
 .Nm kgmon
-.Op Fl bhpr
+.Op Fl bdhpr
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Sh DESCRIPTION
@@ -66,6 +66,8 @@
 .Bl -tag -width Ds
 .It Fl b
 Resume the collection of profile data.
+.It Fl d
+Enable debug output.
 .It Fl h
 Stop the collection of profile data.
 .It Fl p
diff -r a9008fcc9c6c -r 86819e75def4 usr.sbin/kgmon/kgmon.c
--- a/usr.sbin/kgmon/kgmon.c    Thu Aug 03 21:02:04 2000 +0000
+++ b/usr.sbin/kgmon/kgmon.c    Thu Aug 03 21:14:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kgmon.c,v 1.11 1997/11/01 06:54:12 lukem Exp $ */
+/*     $NetBSD: kgmon.c,v 1.12 2000/08/03 21:14:20 eeh Exp $   */
 
 /*
  * Copyright (c) 1983, 1992, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "from: @(#)kgmon.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: kgmon.c,v 1.11 1997/11/01 06:54:12 lukem Exp $");
+__RCSID("$NetBSD: kgmon.c,v 1.12 2000/08/03 21:14:20 eeh Exp $");
 #endif
 #endif /* not lint */
 
@@ -96,7 +96,7 @@
        seteuid(getuid());
        kmemf = NULL;
        system = NULL;
-       while ((ch = getopt(argc, argv, "M:N:bhpr")) != -1) {
+       while ((ch = getopt(argc, argv, "M:N:bdhpr")) != -1) {
                switch((char)ch) {
 
                case 'M':
@@ -124,6 +124,10 @@
                        rflag = 1;
                        break;
 
+               case 'd':
+                       debug = 1;
+                       break;
+
                default:
                        (void)fprintf(stderr,
                            "usage: kgmon [-bhrp] [-M core] [-N system]\n");



Home | Main Index | Thread Index | Old Index