Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Janne Hellsten" <jjhellst@gmail.com>
To: caml-list@inria.fr
Subject: Specifying ocamlprof.dump output filename
Date: Sun, 12 Nov 2006 11:15:39 +0200	[thread overview]
Message-ID: <700d600f0611120115v77c2b9ebh76b94791fb24a05b@mail.gmail.com> (raw)

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.


             reply	other threads:[~2006-11-12  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-12  9:15 Janne Hellsten [this message]
2006-11-28 15:27 ` [Caml-list] " Damien Doligez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=700d600f0611120115v77c2b9ebh76b94791fb24a05b@mail.gmail.com \
    --to=jjhellst@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox