summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof/gprof.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-12-22 20:52:15 +0000
committerwollman <wollman@FreeBSD.org>1994-12-22 20:52:15 +0000
commit18f4f1ed44dd9cbd6db64ddb4b62fee1f4f8448e (patch)
tree52b488628d95f562dbd35627b78bc8211b94ec10 /usr.bin/gprof/gprof.c
parentb9b9ce83b825198b3168ce98ad49474ae7cb3dbf (diff)
downloadFreeBSD-src-18f4f1ed44dd9cbd6db64ddb4b62fee1f4f8448e.zip
FreeBSD-src-18f4f1ed44dd9cbd6db64ddb4b62fee1f4f8448e.tar.gz
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.
Diffstat (limited to 'usr.bin/gprof/gprof.c')
-rw-r--r--usr.bin/gprof/gprof.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index c1d45b7..6873422 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -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
*/
OpenPOWER on IntegriCloud