[Midnightbsd-cvs] src: usr.bin/gprof: sync with freebsd 7
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Mar 27 18:20:53 EDT 2009
Log Message:
-----------
sync with freebsd 7
Modified Files:
--------------
src/usr.bin/gprof:
gprof.1 (r1.1.1.1 -> r1.2)
gprof.h (r1.1.1.1 -> r1.2)
printgprof.c (r1.1.1.1 -> r1.2)
-------------- next part --------------
Index: gprof.h
===================================================================
RCS file: /home/cvs/src/usr.bin/gprof/gprof.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L usr.bin/gprof/gprof.h -L usr.bin/gprof/gprof.h -u -r1.1.1.1 -r1.2
--- usr.bin/gprof/gprof.h
+++ usr.bin/gprof/gprof.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)gprof.h 8.1 (Berkeley) 6/6/93
- * $FreeBSD: src/usr.bin/gprof/gprof.h,v 1.24 2004/10/03 18:22:35 stefanf Exp $
+ * $FreeBSD: src/usr.bin/gprof/gprof.h,v 1.25 2006/08/23 12:11:18 ru Exp $
*/
#include <sys/types.h>
@@ -41,9 +41,6 @@
#include <stdio.h>
#include <stdlib.h>
-#if __alpha__
-# include "alpha.h"
-#endif
#if __amd64__
# include "amd64.h"
#endif
Index: gprof.1
===================================================================
RCS file: /home/cvs/src/usr.bin/gprof/gprof.1,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L usr.bin/gprof/gprof.1 -L usr.bin/gprof/gprof.1 -u -r1.1.1.1 -r1.2
--- usr.bin/gprof/gprof.1
+++ usr.bin/gprof/gprof.1
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)gprof.1 8.1 (Berkeley) 6/6/93
-.\" $FreeBSD: src/usr.bin/gprof/gprof.1,v 1.28 2005/02/13 22:25:22 ru Exp $
+.\" $FreeBSD: src/usr.bin/gprof/gprof.1,v 1.29 2005/10/07 11:58:46 bde Exp $
.\"
-.Dd June 20, 2004
+.Dd October 7, 2005
.Dt GPROF 1
.Os
.Sh NAME
@@ -111,9 +111,19 @@
similar to that provided by
.Xr prof 1 .
This listing gives the total execution times, the call counts,
-the time in msec or usec the call spent in the routine itself, and
-the time in msec or usec the call spent in the routine itself including
+the time that the call spent in the routine itself, and
+the time that the call spent in the routine itself including
its descendants.
+The units for the per-call times are normally milliseconds,
+but they are nanoseconds if the profiling clock frequency
+is 10 million or larger,
+and if a function appears to be never called then its total self time
+is printed as a percentage in the self time per call column.
+The very high profiling clock frequencies needed to get sufficient
+accuracy in the per-call times for short-lived programs are only
+implemented for
+.Dq high resolution
+(non-statistical) kernel profiling.
.Pp
Finally, an index of the function names is provided.
.Pp
Index: printgprof.c
===================================================================
RCS file: /home/cvs/src/usr.bin/gprof/printgprof.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -L usr.bin/gprof/printgprof.c -L usr.bin/gprof/printgprof.c -u -r1.1.1.1 -r1.2
--- usr.bin/gprof/printgprof.c
+++ usr.bin/gprof/printgprof.c
@@ -38,7 +38,7 @@
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/gprof/printgprof.c,v 1.12 2004/05/24 12:44:00 stefanf Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/gprof/printgprof.c,v 1.13 2005/10/07 10:59:41 bde Exp $");
#include <err.h>
#include <string.h>
@@ -130,7 +130,8 @@
register nltype *np;
{
- if ( zflag == 0 && np -> ncall == 0 && np -> time == 0 ) {
+ if ( zflag == 0 && np -> ncall == 0 && np -> time == 0 &&
+ np -> childtime == 0 ) {
return;
}
actime += np -> time;
@@ -153,6 +154,9 @@
printf( " %8ld %8.2f %8.2f " , np -> ncall ,
1000 * np -> time / hz / np -> ncall ,
1000 * ( np -> time + np -> childtime ) / hz / np -> ncall );
+ } else if ( np -> time != 0 || np -> childtime != 0 ) {
+ printf( " %8ld %7.2f%% %8.8s " , np -> ncall ,
+ 100 * np -> time / ( np -> time + np -> childtime ) , "" );
} else {
printf( " %8.8s %8.8s %8.8s " , "" , "" , "" );
}
More information about the Midnightbsd-cvs
mailing list