From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 5131A7EEB4 for ; Fri, 1 Feb 2013 13:11:59 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rixed@happyleptic.org) identity=pra; client-ip=213.251.171.101; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rixed@happyleptic.org"; x-sender="rixed@happyleptic.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rixed@happyleptic.org) identity=mailfrom; client-ip=213.251.171.101; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rixed@happyleptic.org"; x-sender="rixed@happyleptic.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@eneide.happyleptic.org) identity=helo; client-ip=213.251.171.101; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rixed@happyleptic.org"; x-sender="postmaster@eneide.happyleptic.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAGuvC1HV+6tl/2dsb2JhbABFvyUWc4IfAQU6TwshJQ8FKCGIKMJakCthA5YTkE+CfIFlJA X-IPAS-Result: Av4EAGuvC1HV+6tl/2dsb2JhbABFvyUWc4IfAQU6TwshJQ8FKCGIKMJakCthA5YTkE+CfIFlJA X-IronPort-AV: E=Sophos;i="4.84,579,1355094000"; d="scan'208";a="986901" Received: from eneide.happyleptic.org ([213.251.171.101]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 01 Feb 2013 13:11:59 +0100 Received: from extranet.securactive.net ([82.240.34.113] helo=ccellier.rd.securactive.lan) by eneide.happyleptic.org with esmtp (Exim 4.72) (envelope-from ) id 1U1FUF-0002om-8t for caml-list@inria.fr; Fri, 01 Feb 2013 13:12:55 +0100 Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.80) (envelope-from ) id 1U1FTE-0000RI-VC for caml-list@inria.fr; Fri, 01 Feb 2013 13:11:52 +0100 Date: Fri, 1 Feb 2013 13:11:52 +0100 From: rixed@happyleptic.org To: caml-list Message-ID: <20130201121152.GA1262@securactive.lan> References: <104129e3.ee2.13c953b6025.Coremail.syshen@nudt.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <104129e3.ee2.13c953b6025.Coremail.syshen@nudt.edu.cn> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] ::how to locate the function in profile generated by gprof -[ Fri, Feb 01, 2013 at 06:09:21PM +0800, ?????? ]---- > For example, I have a module Misc, so there are function name like camlMisc__fun_1201. > So how can I locate the this function in source code? What I'd do is recompile the Misc module with -S to have the assembly temporary file and look in there camlMisc__fun_1201. First I'd note if this anonymous function does raise some exception or allocate some memory (it's easy to tell from the asm version), then I'd follow up the caller chain up to the first named function. Then back to the definition of this named function in misc.ml, I'd look for all anonymous functions available from there that have the same caracteristics reguarding exceptions and allocation. In case there are many anonymous functions in there or because of inlining this may be hard but in general it's quite easy to find out the culprit from there.