Simplest ticky-ticky profiling (was RE: Selective compilation)
Wed, 30 Jan 2002 09:45:52 +0000 (GMT)
On Tue, 29 Jan 2002, Simon Marlow wrote:
> > If you want to build GHC in different ways, eg. with
> > ticky-ticky profiling
> > on, you can do it by setting "GhcLibWays=t". This make two
> > versions of
> > all the library .o files and .a files, a normal one, and a ticky-ticky
> > one.
> > My question is: can you stop it from making the normal one?
> In a single directory, you can say 'make way=t' to just build the
> ticky-ticky versions of everything. There isn't a way to omit the
> normal way from the whole tree, unfortunately.
Ok, AFAICT, the easiest way to get ticky-ticky profiling working with
minimal compilation is this: in a build tree containing a normal build, run
"make way=t" in these directories:
$(BUILD)/ghc/rts # runtime system
$(BUILD)/ghc/lib # standard library
$(BUILD)/hslibs # hslibs
This seems to create the necessary *.t_o and *_t.a files, and doesn't
create any unnecessary ones. Then -ticky can be given to the "ghc" in that
build tree, eg:
$(BUILD)/ghc/compiler/ghc-inplace -ticky Foo.hs
The compiled program can then be profiled, eg: "Foo +RTS -rstderr"
Is this correct? Have I overlooked anything else that might need to be
compiled with way=t? (Maybe other projects? I'm only considering ghc and
If it is correct, perhaps this information could be added to the user's
manual. Section 5.7 on using ticky-ticky profiling says:
To be able to use ticky-ticky profiling, you will need to have built
appropriate libraries and things when you made the system. See
"Customising what libraries to build," in the installation guide.
I couldn't find such a section in the installation or building guides;
the nearest thing was Section 8.8 "Way Management" in the building guide,
but that still wasn't as clear as what I've written above.