This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gprof/sprof and shared libraries...again



On Thursday, April 04, 2002 12:02 PM, H . J . Lu wrote:
> 
> On Thu, Apr 04, 2002 at 09:00:40AM -0500, Braman, Paul wrote:
> > 
> > Commands I am running...
> > 
> >     export LD_PROFILE=libprof.so
> >     export LD_PROFILE_OUTPUT=/home/user/proftest
> >     g++ -g -fPIC -c -o prof.lo prof.cpp
> >     g++ --shared -o libprof.so prof.lo
> >     g++ -g -pg -I/home/user/proftest -c -o ptest.o ptest.cpp
> >     g++ -pg -o ptest ptest.o -L/home/user/proftest -lprof \
> >         -Xlinker -rpath -Xlinker /home/user/proftest
> >     /home/user/ptest
> > 
> 
> It profiles libprof.so. That is the calls made from libprof.so.

The question then becomes, "How do I profile the calls made *to*
libprof.so?"

That's a natural thing to profile, since you don't necessarily have control
over a library so you want to see how expensive the calls are, but I can't
figure out how to do it.

Ergo, does anyone have any hints or clues to point me in the right
direction?


Paul Braman
Paul_Braman@tvratings.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]