From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA11892; Wed, 23 Jun 2004 01:15:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA11797 for ; Wed, 23 Jun 2004 01:15:11 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5MNF7EV021675 for ; Wed, 23 Jun 2004 01:15:09 +0200 Received: from [192.168.1.200] (ppp215-31.lns1.syd2.internode.on.net [203.122.215.31]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i5MNF44Y054597 for ; Wed, 23 Jun 2004 08:45:05 +0930 (CST) Subject: [Caml-list] profiler From: skaller Reply-To: skaller@users.sourceforge.net To: caml-list Content-Type: text/plain Message-Id: <1087946103.29427.65.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 23 Jun 2004 09:15:04 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40D8BD7B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; sourceforge:01 3.07:01 2004:99 bug:01 ocamlcp:01 ocamlprof:01 annotated:01 misses:01 annotating:01 fragment:01 dirs:01 hashtbl:01 dfns:01 9660:01 glebe:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The Objective Caml compiler, version 3.07+14 (2004-02-03) I may be missing something, so before i report a bug: I ran ocamlcp (without -p option) and then ocamlprof. The annotated output marks every match as specified. But it misses every single named function, annotating only unnamed functions. This fragment shows pattern match and anon function being profiled (well function call is a match in Ocaml?): List.map (fun table -> (* PROF 616626 *) match lookup_name_in_htab table name with | Some x -> (* PROF 236720 *) [x] | None -> (* PROF 379906 *) [] ) dirs and here is a function without annotation (but which is clearly called): and mk_bare_env syms index = match Hashtbl.find syms.dfns index with {parent=parent;privmap=table} -> (* PROF 215928 *) (table,[]) :: match parent with | None -> (* PROF 107964 *) [] | Some index -> (* PROF 107964 *) mk_bare_env syms index -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners