This is the mail archive of the
mailing list for the binutils project.
RE: gprof/sprof and shared libraries...again
- From: "Braman, Paul" <Paul_Braman at tvratings dot com>
- To: "'H . J . Lu'" <hjl at lucon dot org>
- Cc: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Thu, 4 Apr 2002 13:27:45 -0500
- Subject: 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*
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