Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Profiling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David MENTRE <david.mentre@w...>
Subject: Re: [Caml-list] Profiling
Andrew Birkett <adb@tardis.ed.ac.uk> writes:

> Ah! Let me try that one again ...
> 
> Is it possible to get a profile of execution time of a bytecode program.
> Ocamlprof gives execution counts for bytecode programs, and you can gprof
> native-compiled programs for execution times.  Why can't you profile
> execution times with bytecode programs?

You can (even if I doubt of its usefulness) :

 1. build an ocaml with "-pg" option to cc 
    ('./configure -prefix "gcc -pg" && make world && make install')

 2. make your byte code ocaml program with the ocamlc made in step 1

 3. run your program, it should produce a "gmon.out" file

 4. run gprof on ocamlrun, with the "gmon.out" file in the same
    directory as ocamlrun

 5. admire the wonderful produced statistics :-)


Best regards,
david
-- 
 david.mentre@wanadoo.fr
-------------------
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