Subject: gprof and flat profile
To: None <tech-userlevel@NetBSD.ORG>
From: Matthias Pfaller <leo@dachau.marco.de>
List: tech-userlevel
Date: 12/10/1996 11:30:30
Sometimes I like the "flat" profile better then the "call graph" profile.
In that cases I always think it is really annoying to have references
to mcount (or e.g. to idle) in the listing. The following change lets
gprof ignore symbols specified with -E ignore for the flat profile as
well. Anyone out there with a better fix?
Matthias
--- gprof.c.ORIG Sat Oct 14 04:10:49 1995
+++ gprof.c Sun Oct 20 23:53:16 1996
@@ -649,6 +649,8 @@
}
# endif DEBUG
nl[j].time += overlap * time / scale;
+ if ( onlist( Elist , nl[j].name ) )
+ totime -= overlap * time / scale;
}
}
}
--- printgprof.c.ORIG Sat Oct 14 04:11:06 1995
+++ printgprof.c Sun Oct 20 23:53:15 1996
@@ -123,6 +123,8 @@
register nltype *np;
{
+ if ( onlist( Elist , np -> name ) )
+ return;
if ( zflag == 0 && np -> ncall == 0 && np -> time == 0 ) {
return;
}
--
leo@dachau.marco.de in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany tel: +49 8131 516142