Source-Changes-HG archive

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

[src/trunk]: src/lib/libc Document the PROFDIR environment variable.



details:   https://anonhg.NetBSD.org/src/rev/5676eb07b915
branches:  trunk
changeset: 498444:5676eb07b915
user:      erh <erh%NetBSD.org@localhost>
date:      Tue Oct 24 19:31:59 2000 +0000

description:
Document the PROFDIR environment variable.

diffstat:

 lib/libc/gmon/moncontrol.3 |  11 ++++++++++-
 lib/libc/sys/profil.2      |   5 +++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r ee27b5a011dd -r 5676eb07b915 lib/libc/gmon/moncontrol.3
--- a/lib/libc/gmon/moncontrol.3        Tue Oct 24 15:01:26 2000 +0000
+++ b/lib/libc/gmon/moncontrol.3        Tue Oct 24 19:31:59 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: moncontrol.3,v 1.5 1999/03/22 19:44:48 garbled Exp $
+.\"    $NetBSD: moncontrol.3,v 1.6 2000/10/24 19:31:59 erh Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1992, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -99,6 +99,15 @@
 .Bl -tag -width Pa -compact
 .It Pa gmon.out        execution data file
 .El
+.Sh ENVIRONMENT
+.Bl -tag -width "PROFDIR"
+.It Ev PROFDIR
+Directory to place the output file(s) in.  When this is set, instead of
+writing the profiling output to gmon.out, a filename is generated from
+the process id and name of the program.  (e.g. 123.a.out)  If you are
+profiling a program that forks, or otherwise creates multiple copies,
+setting this is the only reasonable way to get all profiling data.
+.El
 .Sh SEE ALSO
 .Xr cc 1 ,
 .Xr gprof 1 ,
diff -r ee27b5a011dd -r 5676eb07b915 lib/libc/sys/profil.2
--- a/lib/libc/sys/profil.2     Tue Oct 24 15:01:26 2000 +0000
+++ b/lib/libc/sys/profil.2     Tue Oct 24 19:31:59 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: profil.2,v 1.5 1999/12/02 21:42:38 kleink Exp $
+.\"    $NetBSD: profil.2,v 1.6 2000/10/24 19:32:34 erh Exp $
 .\"
 .\" Copyright (c) 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -107,7 +107,7 @@
 .It Pa /usr/lib/gcrt0.o
 profiling C run-time startup file
 .It Pa gmon.out
-conventional name for profiling output file
+conventional name for profiling output file.  This may be different if the PROFDIR environment variable is set.
 .El
 .Sh ERRORS
 The following error may be reported:
@@ -119,6 +119,7 @@
 .El
 .Sh SEE ALSO
 .Xr gprof 1
+.Xr moncontrol 3
 .\" .Sh HISTORY
 .\" wish I knew...  probably v7.
 .Sh BUGS



Home | Main Index | Thread Index | Old Index