Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] how to compile ocamlc.opt with profiling turned on?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] how to compile ocamlc.opt with profiling turned on?
> We're seeing some long compile times from ocamlc and ocamlc.opt.
> I would like to try to identify in what part of the compiler the
> time is being spent, so for the last hour I have been trying to
> compile ocamlc.opt with 'ocamlopt -p' so that I can profile the compiler.
> But I have not been able to figure out how to do this.
>   make CAMLOPT='ocamlopt -p -nostdlib -I stdlib' opt.opt
> does not seem to work.

You're on the right tracks.  The following seems to work:

        make world opt
        (cd stdlib; ln -s ../asmrun/libasmrunp.a . )
        make CAMLOPT="boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -p" \
          ocamlc.opt ocamlopt.opt

Hope this helps,

- Xavier

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: