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] 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 <> 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,
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: