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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D6AA181798 for ; Fri, 12 Jul 2013 16:36:00 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of Maxime.Denes@inria.fr) identity=pra; client-ip=46.105.63.121; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxime.denes@inria.fr"; x-sender="Maxime.Denes@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of maxime.denes@inria.fr) identity=mailfrom; client-ip=46.105.63.121; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxime.denes@inria.fr"; x-sender="maxime.denes@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mo2.mail-out.ovh.net) identity=helo; client-ip=46.105.63.121; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxime.denes@inria.fr"; x-sender="postmaster@mo2.mail-out.ovh.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8DAKoT4FEuaT95nGdsb2JhbABAGoM6wiCBHw4BAQEBAQYNCQkUKAQDAwKCFwEBBThAEQsYCRYPCQMCAQIBRRMIAQGICwQIM7cCj2gWg2EDl1yBKZM4 X-IPAS-Result: Am8DAKoT4FEuaT95nGdsb2JhbABAGoM6wiCBHw4BAQEBAQYNCQkUKAQDAwKCFwEBBThAEQsYCRYPCQMCAQIBRRMIAQGICwQIM7cCj2gWg2EDl1yBKZM4 X-IronPort-AV: E=Sophos;i="4.89,653,1367964000"; d="scan'208";a="21015457" Received: from 1.mo2.mail-out.ovh.net (HELO mo2.mail-out.ovh.net) ([46.105.63.121]) by mail3-smtp-sop.national.inria.fr with ESMTP; 12 Jul 2013 16:36:00 +0200 Received: from mail195.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo2.mail-out.ovh.net (Postfix) with SMTP id F1BD8DC8420 for ; Fri, 12 Jul 2013 16:35:59 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 12 Jul 2013 16:38:58 +0200 Received: from deepblue.inria.fr (HELO ?138.96.199.207?) (mail@maximedenes.fr@138.96.199.207) by ns0.ovh.net with SMTP; 12 Jul 2013 16:38:52 +0200 Message-ID: <51E01448.1000801@inria.fr> Date: Fri, 12 Jul 2013 16:35:52 +0200 From: =?ISO-8859-1?Q?Maxime_D=E9n=E8s?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: caml-list@inria.fr X-Ovh-Mailout: 178.32.228.2 (mo2.mail-out.ovh.net) References: <20130712134650.GG15268@three-tuns.net> In-Reply-To: <20130712134650.GG15268@three-tuns.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 1512083575333295904 X-Ovh-Remote: 138.96.199.207 (deepblue.inria.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeijedrudeiucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeijedrudeiucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecu X-Validation-by: maxime.denes@inria.fr Subject: Re: [Caml-list] enhancements for "perf" on OCaml code Hello, Is it related to the recently introduced "-with-frame-pointers" configure flag http://caml.inria.fr/mantis/view.php?id=5721 ? The purpose of this flag seemed to be the use of the same perf tool. Maxime. On 12/07/2013 15:46, Mark Shinwell wrote: > Linux has a tool called "perf" that enables the display of source code > alongside time profiling information and the corresponding assembly code. > (See https://perf.wiki.kernel.org/index.php/Tutorial, "perf annotate"). > > I am pleased to announce an alpha version of the OCaml native code compiler > that permits perf to do the same for OCaml code. This compiler works only on > x86-64 Linux, although porting it to other Linux targets should be > straightforward. > > The compiler is available in OPAM. If you add the remote repository > git://github.com/mshinwell/opam-repo-dev then you should be able to > "opam switch" to the 4.01-perf-annotate compiler. Please let me have any > reports of problems. > > After compilation, you can run "perf record" to gather data about your > OCaml program, and then use "perf report" to interactively examine it. > If you hit Return on a function, then you should be given the option to > annotate it, and then you should see the OCaml code as above. Note that > line number information is not yet as fine-grained for OCaml as it might > be for C code. > > You need to have the source files available at the same location on the > filesystem when you run "perf report" as you did when you compiled the > program. > > This work forms part of a larger project in collaboration with OCaml Labs > at Cambridge, UK, to enhance the level of debugging information emitted > by the OCaml compiler. The perf-annotate compiler emits debugging sections > that aim to be compliant with the DWARF-2 standard. > > Mark > > P.S. The eagle-eyed of you will notice that there is another compiler, > 4.01-allocation-profiling, also available in that OPAM repo. This provides > allocation profiling capabilities for native code, documentation for which I > will endeavour to circulate to the list shortly. >