caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: Kasper Janssens <Kasper.Janssens@hgst.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Profiling ocaml with lwt
Date: Wed, 9 Mar 2016 19:13:46 +0100	[thread overview]
Message-ID: <20160309181346.GA27584@notk.org> (raw)
In-Reply-To: <1CF03778-3645-47D9-A713-4341373801F3@HGST.com>

Hi,

I tend to (ab)use strace. It has options to only instrument some
syscalls, it can count time spent in syscalls, time spent between
syscalls, has microsecond precision, ...

My first runs are usually "strace -tt -f -o log" to get times with
microseconds, follow forks and write to a file rather than stderr
(heavily advised, especially since text editors have syntax highlighting
for strace's output [ vim at least even though you need to :set
ft=strace when using -tt).

After that, you can also use -T to get the time spent in syscalls, -e to
trace fewer things, ...

It's a hammer and requires a fair bit of eye-crossing but it covers
everything, it's overhead isn't that big and it can easily reduce the
scope of what you need to look more deeply at. However it's probably useless to try
to spend more than 2 hours on a strace's output if you can't find the
answer you're looking for.

  parent reply	other threads:[~2016-03-09 18:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09  8:54 Kasper Janssens
2016-03-09  9:49 ` Malcolm Matalka
2016-03-09  9:57   ` Kasper Janssens
2016-03-10  7:41     ` Török Edwin
2016-03-10  7:55       ` Malcolm Matalka
2016-03-09 18:13 ` Adrien Nader [this message]
     [not found] <1911376179.6660816.1457526862329.JavaMail.yahoo.ref@mail.yahoo.com>
2016-03-09 12:34 ` tools

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=20160309181346.GA27584@notk.org \
    --to=adrien@notk.org \
    --cc=Kasper.Janssens@hgst.com \
    --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).