[Top][All Lists]

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

Re: Profiling a library built with libtool

From: Bob Friesenhahn
Subject: Re: Profiling a library built with libtool
Date: Fri, 13 Jul 2007 10:50:30 -0500 (CDT)

On Fri, 13 Jul 2007, Joseph Wakeling wrote:

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.

It is important to know that profiling is based on both adding special code to functions during compilation (influenced by CFLAGS), and use of a special startup-module for linking. That means you should add -pg to LDFLAGS as well. Profiling will be easiest to deal with in a static build (might be a firm requirement). If adding -pg to LDFLAGS does not help, then it is quite possible that libtool itself has a bug. Watch to make sure that libtool is supplying this option to the linker (or compiler if it is used as the linker).

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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