gprof/sprof and shared libraries...again
Braman, Paul
Paul_Braman@tvratings.com
Thu Apr 4 10:28:00 GMT 2002
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
More information about the Binutils
mailing list