From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5F1C9BB83 for ; Tue, 18 Jul 2006 12:12:46 +0200 (CEST) Received: from min.univ-orleans.fr (min.univ-orleans.fr [193.49.83.6]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6IACfrm016471 for ; Tue, 18 Jul 2006 12:12:45 +0200 Received: from mailetu.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 8823612B101 for ; Tue, 18 Jul 2006 12:12:41 +0200 (CEST) Received: from localhost (etu [127.0.0.1]) by mailetu.univ-orleans.fr (Postfix) with ESMTP id 1232B80A6 for ; Tue, 18 Jul 2006 12:10:35 +0200 (CEST) Received: from 81.80.205.253 ([81.80.205.253]) by webmailetu.univ-orleans.fr (Horde MIME library) with HTTP; Tue, 18 Jul 2006 12:10:35 +0200 Message-ID: <20060718121035.hy7o1wa1cmhus4g0@webmailetu.univ-orleans.fr> Date: Tue, 18 Jul 2006 12:10:35 +0200 From: Julien Michel To: caml-list@yquem.inria.fr Subject: Unix module troubles & Time functions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) X-Miltered: at concorde with ID 44BCB419.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; univ-orleans:01 unix:01 gettimeofday:01 unix:01 gettimeofday:01 ocamlrun:01 plateform:01 ocamlc:01 dllunix:01 usr:01 lib:01 ocaml:01 stublibs:01 dllunix:01 ocamlc:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hi all, I would like to measure the time a function spends inside a Caml program, fo= r 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 ha= ve the same accuracy than the unix one. I work on an embedded system and I had to specially compile ocamlrun for thi= s target. I first tried to compile the sources from my developpement plateform this wa= y: ocamlc -o main unix.cma *.ml... then I executed the generated byecode on my embedded target ad got the follo= wing 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 ano= ther 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.