libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiling a library built with libtool


From: Joseph Wakeling
Subject: Re: Profiling a library built with libtool
Date: Fri, 13 Jul 2007 17:36:49 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

Benoit SIGOURE wrote:
> The .la file is a piece of shell script that contains information useful
> to libtool.
> 
> Now the answer to your question is to ask libtool to run gprof (or gdb)
> for you:
> ./libtool --mode=execute gprof ./foo

Ah! That explains much.  Thank you.

I still get results that I don't understand.  This is the beginning of
what I get for profiling my executable:

-----------------------------------------------------------------
Flat profile:

Each sample counts as 0.01 seconds.
 no time accumulated

  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
  0.00      0.00     0.00    56133     0.00     0.00  data_start
  0.00      0.00     0.00       19     0.00     0.00
MG_sigma2_Theta_threaded
-----------------------------------------------------------------

There's a record of calls but not of times, and _nothing_ for the
library functions.  The library and this executable are all built
together in one big ./configure && make.

I don't know whether I need to do more than add -pg to the CFLAGS when
building the library or whether it's simply gprof I'm not using correctly.

Thanks again,

    -- Joe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]