caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Unix module troubles & Time functions
@ 2006-07-18 10:10 Julien Michel
  2006-07-18 11:59 ` [Caml-list] " Jean-Christophe Filliatre
  2006-07-18 15:33 ` William D. Neumann
  0 siblings, 2 replies; 4+ messages in thread
From: Julien Michel @ 2006-07-18 10:10 UTC (permalink / raw)
  To: caml-list

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-18 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-18 10:10 Unix module troubles & Time functions Julien Michel
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

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).