Added much-needed new options -[lL], to suppress printing of either the

call-graph or the flat profile, since often you only want one of them.
This commit is contained in:
Garrett Wollman 1994-12-22 20:52:15 +00:00
parent 5af8c64327
commit d87bdc80f2
2 changed files with 21 additions and 3 deletions

View File

@ -194,6 +194,10 @@ option may be given.
Only one pair of routine names may be given with each
.Fl k
option.
.It Fl l
Suppresses the printing of the call-graph profile.
.It Fl L
Suppresses the printing of the flat profile.
.It Fl s
A profile file
.Pa gmon.sum

View File

@ -52,6 +52,8 @@ char *defaultEs[] = { "mcount" , "__mcleanup" , 0 };
static struct gmonhdr gmonhdr;
static bool uflag;
static int lflag;
static int Lflag;
main(argc, argv)
int argc;
@ -123,7 +125,15 @@ main(argc, argv)
addlist( ktolist , *++argv );
kflag = TRUE;
break;
case 's':
case 'l':
lflag = 1;
Lflag = 0;
break;
case 'L':
Lflag = 1;
lflag = 0;
break;
case 's':
sflag = TRUE;
break;
case 'u':
@ -194,11 +204,15 @@ main(argc, argv)
/*
* print the dynamic profile
*/
printgprof( timesortnlp );
if(!lflag) {
printgprof( timesortnlp );
}
/*
* print the flat profile
*/
printprof();
if(!Lflag) {
printprof();
}
/*
* print the index
*/