Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] profiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: [Caml-list] profiler
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