low-level profiling

Simon Marlow marlowsd at gmail.com
Mon Feb 18 21:13:19 CET 2013

On 18/02/13 17:37, Nicolas Frisby wrote:
> Hmm. build.mk.sample includes
> (so do the build.mk <http://build.mk> files I'm using)
> Is that symbol for something else or is there a typo somewhere?

It looks like the GHC build system uses STRIP_CMD, but the nofib build 
system uses STRIP.  We like to keep you on your toes!  (Actually this is 
probably because the nofib build system is a snapshot of an old GHC 
build system, and at some point we consistently renamed lots of make 
variables to be FOO_CMD in GHC).


> On Mon, Feb 18, 2013 at 2:12 PM, Simon Marlow <marlowsd at gmail.com
> <mailto:marlowsd at gmail.com>> wrote:
>     On 15/02/13 20:31, Johan Tibell wrote:
>         On Fri, Feb 15, 2013 at 12:02 PM, Nicolas Frisby
>         <nicolas.frisby at gmail.com <mailto:nicolas.frisby at gmail.com>
>         <mailto:nicolas.frisby at gmail.__com
>         <mailto:nicolas.frisby at gmail.com>>> wrote:
>              Thanks for rallying everyone! I made a bit of a
>         breakthrough while
>              trying to pinpoint where the linker is invoked.
>              Here's the situation:
>                 * If I use nofib's "make" command to build the text, the
>              executable does not have the function symbols in its .text
>         section.
>              The .o files do have them.
>                 * If I use ghc --make instead, the symbols survive in
>         the executable.
>              I'm not up to sleuthing out the details at the moment.
>         Should I open
>              a Trac ticket?
>         Sounds like make for nofib strips the executables after they are
>         created. That probably makes sense if nofib also measures executable
>         sizes, but it might screw you up here. Using ghc --make (command
>         copied
>         form whatever nofib uses) is probably the right thing to do
>         while you're
>         debugging any performance issues.
>     Ah yes, I usually have
>     STRIP=:
>     in my mk/build.mk <http://build.mk>
>     Probably a good idea to get rid of the stripping completely, it
>     doesn't affect the size measurements anyway which use the 'size'
>     command.
>     Cheers,
>              Simon

More information about the ghc-devs mailing list