summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-08-08 17:48:26 +0000
committerjdp <jdp@FreeBSD.org>1998-08-08 17:48:26 +0000
commit993b274d0375fe6121794409bc94d2f0438211e6 (patch)
tree8a8d15fed380e0d34ae69f71b5dcec2892e85c99 /usr.bin/gprof
parent6d5504d566be043a9006a02560b8ba779c67265b (diff)
downloadFreeBSD-src-993b274d0375fe6121794409bc94d2f0438211e6.zip
FreeBSD-src-993b274d0375fe6121794409bc94d2f0438211e6.tar.gz
Don't ignore symbols containing "$". C++ destructors and other
special functions have names containing dollar signs, and ignoring them causes gprof to produce incorrect and sometimes bizarre results. The comment in the original code said that dollar signs were excluded because they are used in Pascal labels. That's not much of an issue these days.
Diffstat (limited to 'usr.bin/gprof')
-rw-r--r--usr.bin/gprof/gprof.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index 6ad9962..185e2c6 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)gprof.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: gprof.c,v 1.5 1997/07/10 06:45:00 charnier Exp $";
+ "$Id: gprof.c,v 1.6 1997/07/15 08:04:40 charnier Exp $";
#endif /* not lint */
#include <err.h>
@@ -728,8 +728,7 @@ funcsymbol( nlistp )
/*
* name must start with an underscore if uflag is set.
* can't have any `funny' characters in name,
- * where `funny' includes `.', .o file names
- * and `$', pascal labels.
+ * where `funny' means `.' (.o file names)
* need to make an exception for sparc .mul & co.
* perhaps we should just drop this code entirely...
*/
@@ -747,7 +746,7 @@ funcsymbol( nlistp )
}
#endif
while ( c = *name++ ) {
- if ( c == '.' || c == '$' ) {
+ if ( c == '.' ) {
return FALSE;
}
}
OpenPOWER on IntegriCloud