caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] how to compile ocamlc.opt with profiling turned on?
@ 2003-06-26 21:08 Norman Ramsey
  2003-06-29 16:45 ` Xavier Leroy
  2004-08-04  3:09 ` Chet Murthy
  0 siblings, 2 replies; 3+ messages in thread
From: Norman Ramsey @ 2003-06-26 21:08 UTC (permalink / raw)
  To: caml-list

Dear Camllists,

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.

Can anyone advise me how to build an ocamlc.opt that I can profile
with gprof?


Norman



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] how to compile ocamlc.opt with profiling turned on?
  2003-06-26 21:08 [Caml-list] how to compile ocamlc.opt with profiling turned on? Norman Ramsey
@ 2003-06-29 16:45 ` Xavier Leroy
  2004-08-04  3:09 ` Chet Murthy
  1 sibling, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 2003-06-29 16:45 UTC (permalink / raw)
  To: Norman Ramsey; +Cc: caml-list

> 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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] how to compile ocamlc.opt with profiling turned on?
  2003-06-26 21:08 [Caml-list] how to compile ocamlc.opt with profiling turned on? Norman Ramsey
  2003-06-29 16:45 ` Xavier Leroy
@ 2004-08-04  3:09 ` Chet Murthy
  1 sibling, 0 replies; 3+ messages in thread
From: Chet Murthy @ 2004-08-04  3:09 UTC (permalink / raw)
  To: Norman Ramsey; +Cc: caml-list


Norman,

use Ocamlmakefile.  Ocamlmakefile is your FRIEND.

you change the TARGETS from "nc" (== "native code") to "pnc" (==
"profiled native code") and you're done.

Ocamlmakefile.  -almost- as great as sliced bread.  But Perl's already
got that nailed.  Or was it ... ethereal.  Yep, that's it.  Ethereal,
now, -that's- sliced bread.  Maybe even fire.

--chet--

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-04  3:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 21:08 [Caml-list] how to compile ocamlc.opt with profiling turned on? Norman Ramsey
2003-06-29 16:45 ` Xavier Leroy
2004-08-04  3:09 ` Chet Murthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).