From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6EE27BB91 for ; Mon, 24 Jan 2005 21:13:10 +0100 (CET) Received: from simon.cs.cornell.edu (simon.cs.cornell.edu [128.84.154.10]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0OKD9BL024339 for ; Mon, 24 Jan 2005 21:13:10 +0100 Received: from sundial.cs.cornell.edu (sundial.cs.cornell.edu [128.84.96.115]) by simon.cs.cornell.edu (8.11.7-20031020/8.11.7/R-3.18) with ESMTP id j0OKD8h25992 for ; Mon, 24 Jan 2005 15:13:08 -0500 (EST) Received: from suzy-q.cs.cornell.edu (suzy-q.cs.cornell.edu [128.84.96.56]) by sundial.cs.cornell.edu (8.11.7-20031020/8.11.7/M-3.22) with ESMTP id j0OKD7i13968 for ; Mon, 24 Jan 2005 15:13:07 -0500 (EST) Received: from localhost (ebreck@localhost) by suzy-q.cs.cornell.edu (8.11.7-20031020/8.11.7/C-3.4) with ESMTP id j0OKD7P04514 for ; Mon, 24 Jan 2005 15:13:07 -0500 (EST) X-Authentication-Warning: suzy-q.cs.cornell.edu: ebreck owned process doing -bs Date: Mon, 24 Jan 2005 15:13:07 -0500 (EST) From: Eric Breck To: Subject: profiling anonymous functions Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 41F556D5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; cornell:01 ocaml:01 ocamlopt:01 foo:01 corresponds:01 graph:01 functions:01 functions:01 defined:01 output:02 output:02 module:03 gprof:03 gprof:03 arg:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: Hello folks, I'm profiling an ocaml program compiled with ocamlopt -p on linux/x86, and I'm having trouble reading the gprof output. In particular, is there a way to tell which of the thirty or so anonymous functions (fun arg -> ) in my module foo.ml corresponds to, say 'camlFoo__fun_664' in the gprof output? I can sometimes infer which ones are which by looking at gprof's call graph, but sometimes not. Is there some way to get from the identifer gprof uses to the location in the source file where that anonymous function is defined? thanks, Eric Breck