[Scons-users] profiling with scons

Chris BeHanna chris at behanna.org
Sun Jul 15 23:24:06 EDT 2012


On Jul 15, 2012, at 20:59, Karen Khar <karen.khar at gmail.com> wrote:


> Hi,

>

> Thanks for getting back to me. My program is a component of a large suite of programs which I compile with gcc through scons. I am unable to compile without scons because the whole suite is necessary. The suite uses scons with some extensions. scons.py implemented as a Python script. I don't know anything about linkers. I tried to use gprof, but the -pg command, but it is incompatible when compiling with scons. Am I out of luck?

>

> I read this in scons man:

>

> --profile=file

> Run SCons under the Python profiler and save the results in the specified file. The results may be analyzed using the Python pstats module.


That option is for profiling SCons itself, not for profiling the things that SCons builds. You are going to have to play with CCFLAGS and with LDFLAGS to get your own software built such that gprof will be able to do something with it.

--
Chris BeHanna
chris at behanna.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20120715/885d6dad/attachment.html>


More information about the Scons-users mailing list