Google Groups Home
Help | Sign in
Specifying ocamlprof.dump output filename
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Janne Hellsten  
View profile
 More options Nov 12 2006, 4:19 am
Newsgroups: fa.caml
From: "Janne Hellsten" <jjhel...@gmail.com>
Date: Sun, 12 Nov 2006 09:19:04 UTC
Local: Sun, Nov 12 2006 4:19 am
Subject: [Caml-list] Specifying ocamlprof.dump output filename
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.

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damien Doligez  
View profile
 More options Nov 28 2006, 10:29 am
Newsgroups: fa.caml
From: Damien Doligez <damien.doli...@inria.fr>
Date: Tue, 28 Nov 2006 15:29:23 UTC
Local: Tues, Nov 28 2006 10:29 am
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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google