Version française
Home     About     Download     Resources     Contact us    
Browse thread
Specifying ocamlprof.dump output filename
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Specifying ocamlprof.dump output filename

On 2006-11-12, at 10:15, Janne Hellsten wrote:

> 1. Profiling results are not accumulated across all of the separate
>   testers.  Each test directory produce a separate results file, and
>   I need to go through these results one by one.  I'd like to only
>   get the combined results:
>
>   $PROJ/test/size/ocamlprof.dump
>   $PROJ/test/speed/ocamlprof.dump
>   $PROJ/test/func/ocamlprof.dump
>
>   =>
>
>   $PROJ/bin/ocamlprof.dump  # combined result

You can solve this one by setting up symbolic links before profiling
your program.

> 2. Running other bytecode programs compiled for profiling resets the
>   dump files.  I run several OCamlprof-enabled programs in my
>   regression suite.  As all of these are run in the same working
>   directory, these programs end up overwriting each others results.

You can solve this one by copying or renaming the dump files
between the runs of your programs.  I agree this is inconvenient.

> Would it make sense to add a command line option for ocamlcp that
> would override the default ocamlprof.dump output path?

Not really.  What to do when two source files are compiled
with different values for this option?

What I will implement is an environment variable, to specify
the name of the dump file used when profiling.  Then you just
have to set it before running your programs.

-- Damien