[Top][All Lists]

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

Profiling a library built with libtool

From: Joseph Wakeling
Subject: Profiling a library built with libtool
Date: Fri, 13 Jul 2007 16:39:23 +0200
User-agent: Thunderbird (X11/20070604)

I have a small library which is built using the GNU autotools.  It also
includes some executable programs which use the main library.  I would
like to profile the performance using gprof or another tool but have
been having trouble working out how to do so.  I tried simply adding -p
to the CFLAGS but the resulting gmon.out appeared to contain no data
(e.g. running gprof on the executable or on the .la file resulted in an
error, "not in executable format", while running it on one of the object
files produced no information).

I wonder if someone could give me a brief run-through on how to profile
the library---what options I need to place in the autotools-related
files and when using ./configure, and how to use gprof effectively on
the library once built.

Thanks in advance,

    -- Joe

P.S. Apologies if this would be better placed on the autoconf or
automake mailing list; since it's library related I assumed this would
be the appropriate place.

reply via email to

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