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:
parent
5af8c64327
commit
d87bdc80f2
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user