This is the mail archive of the
mailing list for the glibc project.
- From: "Bhattacharya, Soubhik" <soubhik_bhattacharya at mentorg dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 08 Jul 2003 17:09:17 +0530
- Subject: sprof QUICKSTART
- Organization: Mentor Graphics
this mail is for someone who's fumbling the net to know how to use
`sprof' and `LD_PROFILE' to profile a shared object (as I was doing just
a while ago).
say, your application is called `my_app', which links against a shared
object `my_sobj'. you've tried to use gprof for performance profiling
and discovered that it does not provide any profiling information about
the functions residing in my_sobj. so it's time you try sprof to know
how your functions, which are in my_sobj, have fared.
#set the environment variable LD_PROFILE to the name of the shared obj
setenv LD_PROFILE my_obj
#run your application
#this should create a file /var/tmp/my_sobj.profile
#now run sprof
sprof my_sobj my_sobj.profile
I've done these on a RedHat 7.2 running on PIII. My system does not have
any info manual for sprof. the man page sprof(1) only describes the
options accepted by sprof.
AFAIK, sprof can profile only one shared object at a run. Also, it does
not profile the application itself.
The following mail and its follow-ups in libc mailing list can be
Member Technical Staff