Profiling libraries
Daniel Kegel
dank@kegel.com
Thu Jul 15 19:13:00 GMT 2004
Linux Newbie wrote:
> I am trying to profile a program which uses zlib1.2.1 i.e. libz.so.1.2.1
>
> As I read on internet, it is easier to get profile data when linked statically.
> so I am trying that first.
>
> 1st: Just compile source of the lib with -pg option.
> Compile example.c, that comes with zlib , with -pg option
> statically linked the libz.a
> Run the make test, it also executes example and creates gmon.out
> gprof ./example
> It shows all the lib functions in the profile ,
> but timing is 0.00 for all
A couple questions:
1. did you compile and link the main program with -pg?
2. was runtime long enough (tens of seconds) to accumulate
sufficient samples?
- Dan
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list