caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: KC Sivaramakrishnan <sk826@cl.cam.ac.uk>
To: caml-list@inria.fr
Subject: [Caml-list] Allocation profiler for bytecode interpreter
Date: Tue, 22 Sep 2015 19:53:39 +0100	[thread overview]
Message-ID: <3273EF3E-7113-4107-B542-349A325AFF99@cl.cam.ac.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

As someone who does not yet have the expertise to clearly see the cost of abstractions by looking at the source code, the lack of a freely available and 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 bytecode instead of native is to profile the multicore OCaml compiler, which doesn’t support native compilation yet. I find it to be quite useful in practice to get an overview of allocation bottlenecks before applying targeted optimisations. 

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 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-profiler/ <http://kcsrk.info/ocaml/profiling/2015/09/23/bytecode-allocation-profiler/>

[-- Attachment #2: Type: text/html, Size: 1639 bytes --]

                 reply	other threads:[~2015-09-22 18:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3273EF3E-7113-4107-B542-349A325AFF99@cl.cam.ac.uk \
    --to=sk826@cl.cam.ac.uk \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).