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.
This commit is contained in:
parent
4f24ba2fac
commit
43ab5f3877
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38194
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user