caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Julien Michel <julien.michel@etu.univ-orleans.fr>
To: caml-list@yquem.inria.fr
Subject: Unix module troubles & Time functions
Date: Tue, 18 Jul 2006 12:10:35 +0200	[thread overview]
Message-ID: <20060718121035.hy7o1wa1cmhus4g0@webmailetu.univ-orleans.fr> (raw)

Hi all,
I would like to measure the time a function spends inside a Caml program, for
performance purpose.
I need a function with an accuracy of at least 1us.
I usually use \"gettimeofday\" to achieve this kind of measures with Unix.

So I would like to use the Unix.gettimeofday() function which I expect to have
the same accuracy than the unix one.

I work on an embedded system and I had to specially compile ocamlrun for this
target.

I first tried to compile the sources from my developpement plateform this way:
ocamlc -o main unix.cma *.ml...

then I executed the generated byecode on my embedded target ad got the following
error:
Fatal error: cannot load shared library dllunix
Reason: /usr/local/lib/ocaml/stublibs/dllunix.so: cannot open shared object
file: No such file or directory

whereas, \"dllunix.so\" exists well and the path to raise it is good too!


if I try to compile this way:
ocamlc -o main -cclib -lunix unix.cma *ml
I get the same error as in the message above.


and trying to compile this way:
ocamlc -custom -o main unix.cma *ml
returns this error while executing on my target:
Fatal error: unknown C primitive `unix_dup\'

What can be wrong with my system so that I cannot use the Unix.module?
The Gettimeofday unix function usually works well on my target, is there another
way for having access to it with Caml?

Or generally speaking, does any other function exists to achieve such a
measurement (accuracy about 1 us) ?


Thanks to all

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


             reply	other threads:[~2006-07-18 10:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 10:10 Julien Michel [this message]
2006-07-18 11:59 ` [Caml-list] " Jean-Christophe Filliatre
2006-07-18 13:27   ` Julien Michel
2006-07-18 15:33 ` William D. Neumann

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=20060718121035.hy7o1wa1cmhus4g0@webmailetu.univ-orleans.fr \
    --to=julien.michel@etu.univ-orleans.fr \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).