* Specifying ocamlprof.dump output filename
@ 2006-11-12 9:15 Janne Hellsten
2006-11-28 15:27 ` [Caml-list] " Damien Doligez
0 siblings, 1 reply; 2+ messages in thread
From: Janne Hellsten @ 2006-11-12 9:15 UTC (permalink / raw)
To: caml-list
Hi all,
I have come across a slight usability issue with the use of the
ocamlprof utility. The problem is the accumulation of results when my
profilee program is executed several times in several different
working directories.
My OCaml program is a command line tool that gets tested by my
regression test suite. The regression test calls my command line tool
from several different locations, e.g.
$PROJ/test/size
$PROJ/test/speed
$PROJ/test/func
As my profilee gets executed from these separate directories (size,
speed, func), the "ocamlprof.dump" files also end up in these
different directories. This is problematic for the following reasons:
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
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.
This problem could be solved by being able to specify where the
ocamlprof.dump files get generated. If I could do this, I would
simply generate ocamlprof.dump files in the bin directory of my tested
program.
Would it make sense to add a command line option for ocamlcp that
would override the default ocamlprof.dump output path?
Thanks,
Janne
P.S. I have workarounded this problem temporarily by always switching
my working dir when running my tool.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Specifying ocamlprof.dump output filename
2006-11-12 9:15 Specifying ocamlprof.dump output filename Janne Hellsten
@ 2006-11-28 15:27 ` Damien Doligez
0 siblings, 0 replies; 2+ messages in thread
From: Damien Doligez @ 2006-11-28 15:27 UTC (permalink / raw)
To: caml users
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-28 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-12 9:15 Specifying ocamlprof.dump output filename Janne Hellsten
2006-11-28 15:27 ` [Caml-list] " Damien Doligez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox