Re: profile shared libraries with gcc and gprof

Vincent =?ISO-8859-1?Q?Stehl=E9?= <vincent.stehle@stepmind.com>
20 Dec 2001 00:38:34 -0500

          From comp.compilers

Related articles
profile shared libraries with gcc and gprof k.xu@caa.de (2001-12-15)
Re: profile shared libraries with gcc and gprof axel@dtone.org (Axel Kittenberger) (2001-12-19)
Re: profile shared libraries with gcc and gprof vincent.stehle@stepmind.com (Vincent =?ISO-8859-1?Q?Stehl=E9?=) (2001-12-20)
| List of all articles for this month |
From: Vincent =?ISO-8859-1?Q?Stehl=E9?= <vincent.stehle@stepmind.com>
Newsgroups: comp.compilers
Date: 20 Dec 2001 00:38:34 -0500
Organization: Stepmind
References: 01-12-072
Keywords: GCC
Posted-Date: 20 Dec 2001 00:38:34 EST

xukg wrote:
[snip]


> I use gcc (with option -p) to compile my program which uses shared
> libraries. But i cannot find calls of dynamic libraries in my profile.
> I generate my shared libraries (xxx.so) with the option -p too.
> Is it possible to profile shared libraries?


[snip]


    Dear "xukg",


    Did you try to compile with "-pg" rather than "-p" ? This is what is
specified in gprofs documentation [1].


    Is it possible that the time spent in your shared libraries functions
be much less than the profile tick (something like 1/100th of second) ?
In that case, you should either perform many runs (see [2]) and/or try
to force static call graph discovery with gprofs "-c" option (see [3]).


    Good luck anyway !


[1] http://www.gnu.org/manual/gprof-2.9.1/html_node/gprof_2.html#SEC2
[2] http://www.gnu.org/manual/gprof-2.9.1/html_node/gprof_22.html#SEC22
[3] http://www.gnu.org/manual/gprof-2.9.1/html_node/gprof_6.html#SEC6


--
            Vincent Stehlé StepMind S.A.
DSP system engineer Central Buro, Avenue de Campon
                                            06110 Le Cannet, France


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.