caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Peter Hawkins <hawkinsp@cs.stanford.edu>
To: Warren Harris <warrensomebody@gmail.com>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] gc overhead
Date: Tue, 2 Mar 2010 13:01:27 -0800	[thread overview]
Message-ID: <b0b348901003021301l2d198e46vc73844c7cdbc0fb1@mail.gmail.com> (raw)
In-Reply-To: <5043CED0-7CEC-4813-8325-76C3196E8FEE@gmail.com>

Hi...

On Tue, Mar 2, 2010 at 12:11 PM, Warren Harris <warrensomebody@gmail.com> wrote:
>
> On Mar 1, 2010, at 12:54 AM, Richard Jones wrote:
>
>> On Sun, Feb 28, 2010 at 04:16:03PM -0800, Warren Harris wrote:
>>>
>>> I would like to determine what percentage of my application's cpu time
>>> is spent in the garbage collector (for tuning purposes, but also just
>>> to monitor the overhead). Is there any way to obtain this information
>>> short of using gprof? Additional information provided by Gc.stat would
>>> be ideal, or perhaps a Gc.alarm that was called at the beginning of
>>> the gc cycle, but neither of these seem to exist.
>>
>> I would have to say what's wrong with using gprof?
>
> What's wrong with it is that it provides no way to monitor gc overhead in an
> active service.

I would have recommended using oprofile on linux, which I greatly
prefer to GCC's built-in profiling support for profiling C programs.
It has a low and tunable overhead, and because it's a sampling
profiler it doesn't perturb the results anywhere near as much as
standard profiling instrumentation.

Unfortunately last time I checked it had poor OCaml support (no
support for unwinding the OCaml call stack, so no context-sensitivity
in the profiles). That said, you probably don't need
context-sensitivity to determine the fraction of execution time spent
in the GC.

It might be worth a try...

Peter


  reply	other threads:[~2010-03-02 21:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01  0:16 Warren Harris
2010-03-01  8:54 ` [Caml-list] " Richard Jones
2010-03-02 20:11   ` Warren Harris
2010-03-02 21:01     ` Peter Hawkins [this message]
2010-03-02 23:08       ` Warren Harris
2010-03-03  0:55         ` Peter Hawkins
2010-03-03  7:06           ` Warren Harris
2010-03-03  8:33             ` David MENTRE
2010-03-02 22:03 ` Sylvain Le Gall
2010-03-02 23:09   ` [Caml-list] " Warren Harris
2010-03-03  1:58     ` Edgar Friendly
2010-03-03  8:12       ` Sylvain Le Gall
2010-03-03  8:49 ` [Caml-list] " Olivier Andrieu
2010-03-03 11:11 ` Goswin von Brederlow
2017-11-28 18:11 Julia Lawall
2017-11-28 20:05 ` Yawar Amin
2017-11-29  6:20   ` Julia Lawall
2017-12-11 18:53   ` Julia Lawall
2017-12-11 20:56     ` Gabriel Scherer
2017-12-11 21:05       ` Julia Lawall

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=b0b348901003021301l2d198e46vc73844c7cdbc0fb1@mail.gmail.com \
    --to=hawkinsp@cs.stanford.edu \
    --cc=caml-list@inria.fr \
    --cc=warrensomebody@gmail.com \
    /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).