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 C639A7F737 for ; Tue, 22 Sep 2015 20:53:44 +0200 (CEST) IronPort-PHdr: 9a23:5TTAAxcRgmvOHu5XJfsUtcw3lGMj4u6mDksu8pMizoh2WeGdxc6+YB7h7PlgxGXEQZ/co6odzbGG7+a8ASdZu83JmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvip9uPO04R3mH1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdRCTBjN2Eu+OXqswPCRE2B/CgySGITxzljSzPE8hjgV5L4sTH7rep70S/Sadb1HepqcT+mqaxiTVnhg2EaNGhqoynslsVsgfcD81qarBtlztuMbQ== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=sk826@hermes.cam.ac.uk; spf=None smtp.mailfrom=sk826@hermes.cam.ac.uk; spf=Pass smtp.helo=postmaster@ppsw-41.csi.cam.ac.uk Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of sk826@hermes.cam.ac.uk) identity=pra; client-ip=131.111.8.141; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sk826@hermes.cam.ac.uk"; x-sender="sk826@hermes.cam.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of sk826@hermes.cam.ac.uk) identity=mailfrom; client-ip=131.111.8.141; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sk826@hermes.cam.ac.uk"; x-sender="sk826@hermes.cam.ac.uk"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@ppsw-41.csi.cam.ac.uk designates 131.111.8.141 as permitted sender) identity=helo; client-ip=131.111.8.141; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sk826@hermes.cam.ac.uk"; x-sender="postmaster@ppsw-41.csi.cam.ac.uk"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DoAgAXowFWnI0Ib4Ndg3hqv2OHQzwQAQEBAQEBAQEQAQEBAQEICwkJIS6CHYIxSB8OPgKJIAQJpxCPao9/hEWJAogZglIvgRQFlWAHd4QaigyZDziCAAEBAYIqil0BAQE X-IPAS-Result: A0DoAgAXowFWnI0Ib4Ndg3hqv2OHQzwQAQEBAQEBAQEQAQEBAQEICwkJIS6CHYIxSB8OPgKJIAQJpxCPao9/hEWJAogZglIvgRQFlWAHd4QaigyZDziCAAEBAYIqil0BAQE X-IronPort-AV: E=Sophos;i="5.17,574,1437429600"; d="scan'208,217";a="178945024" Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2015 20:53:44 +0200 X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc3-papw5-2-0-cust129.5-3.cable.virginm.net ([86.30.206.130]:54629 helo=[192.168.0.7]) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:587) with esmtpsa (PLAIN:sk826) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1ZeShD-00019N-Rv (Exim 4.86_36-e07b163) for caml-list@inria.fr (return-path ); Tue, 22 Sep 2015 19:53:43 +0100 From: KC Sivaramakrishnan Content-Type: multipart/alternative; boundary="Apple-Mail=_ECF13403-9025-4457-A2D7-C14E8EE4F843" Message-Id: <3273EF3E-7113-4107-B542-349A325AFF99@cl.cam.ac.uk> Date: Tue, 22 Sep 2015 19:53:39 +0100 To: caml-list@inria.fr Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) Sender: Sivaramakrishnan Krishnamoorthy Chandrasekaran Subject: [Caml-list] Allocation profiler for bytecode interpreter --Apple-Mail=_ECF13403-9025-4457-A2D7-C14E8EE4F843 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 As someone who does not yet have the expertise to clearly see the cost of a= bstractions by looking at the source code, the lack of a freely available a= nd easily usable allocation profiler is often a hindrance for writing high-= performance OCaml code. I have implemented a simple allocation profiler for= the bytecode interpreter [1]. Part of the motivation to write one for byte= code instead of native is to profile the multicore OCaml compiler, which do= esn=E2=80=99t support native compilation yet. I find it to be quite useful = in practice to get an overview of allocation bottlenecks before applying ta= rgeted optimisations.=20 The profiler is quite naive at this point. The tooling support is non-exist= ent; one has to manually search through the relevant text files to figure o= ut the source of allocations. I am interested in understanding how to make = this better. As a first step, I would like to do something similar to `ocam= lprof`. I plan to keep improving the allocation profiler for vanilla OCaml = as the multicore OCaml development continues. Kind Regards, KC [1] http://kcsrk.info/ocaml/profiling/2015/09/23/bytecode-allocation-profil= er/ = --Apple-Mail=_ECF13403-9025-4457-A2D7-C14E8EE4F843 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 As someone who doe= s not yet have the expertise to clearly see the cost of abstractions by loo= king at the source code, the lack of a freely available and easily usable a= llocation profiler is often a hindrance for writing high-performance OCaml = code. I have implemented a simple allocation profiler for the bytecode inte= rpreter [1]. Part of the motivation to write one for bytecode instead of na= tive is to profile the multicore OCaml compiler, which doesn=E2=80=99t supp= ort native compilation yet. I find it to be quite useful in practice to get= an overview of allocation bottlenecks before applying targeted optimisatio= ns. 

The profiler = is quite naive at this point. The tooling support is non-existent; one has = to manually search through the relevant text files to figure out the source= of allocations. I am interested in understanding how to make this better. = As a first step, I would like to do something similar to `ocamlprof`. I pla= n to keep improving the allocation profiler for vanilla OCaml as the multic= ore OCaml development continues.

=
Kind Regards,
= --Apple-Mail=_ECF13403-9025-4457-A2D7-C14E8EE4F843--