Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Warren Harris <warrensomebody@gmail.com>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] gc overhead
Date: Wed, 03 Mar 2010 12:11:06 +0100	[thread overview]
Message-ID: <87bpf5lkxh.fsf@frosties.localdomain> (raw)
In-Reply-To: <37150F07-8902-464A-9A0E-44A0C424C87B@gmail.com> (Warren Harris's message of "Sun, 28 Feb 2010 16:16:03 -0800")

Warren Harris <warrensomebody@gmail.com> writes:

> 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.
>
> Warren

In my code I have a cache structure that implements a last-recently-used
ordering of cached objects. As objects are used the list grows an every
now and then I have to shrink it. It would be real nice if I could
shrink it exactly before evrey GC major cycle or compaction.

I also saw that Gc.alarm is called AFTER each GC cycle. But maybe that
doesn't matter as after a cycle is before a cycle. With the major cycle
being done in increments the next cycle probably starts right after the
last one finished compared to the time the cycle takes overall.

MfG
        Goswin


  parent reply	other threads:[~2010-03-03 11:11 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
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 [this message]
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=87bpf5lkxh.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --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