caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Whitington <john@coherentgraphics.co.uk>
To: Edgar Friendly <thelema314@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement?
Date: Wed, 24 Oct 2012 13:53:07 +0100	[thread overview]
Message-ID: <5087E4B3.1020707@coherentgraphics.co.uk> (raw)
In-Reply-To: <5087E301.2090201@gmail.com>

Hi,

Edgar Friendly wrote:
> On 10/24/2012 8:39 AM, John Whitington wrote:
>> David MENTRE wrote:
>>> <spontaneous>
>>> [2] 84.6 0.03 449.61 caml_call_gc [2]
>>> 0.00 449.61 755484/755484 caml_garbage_collection [3]
>> <spontaneous> means gprof can't find the calling function(s). Are you
>> sure you've used the -p both for compiling all source files and also
>> when linking them into the final executable?
>
> This line in the original profile might explain:
>> 9.79 347.23 52.01 88113 0.00 0.00 camlMap__map_181
> I'm guessing there's a lot of calls to Map.map, and this is causing all
> the garbage. As part of the stdlib, it wouldn't automatically be
> compiled for profiling, no?

You would expect to see some calls to caml_call_gc from functions in 
David's code (statistically, some allocations triggering gc would come 
from the user code).

So just <spontaneous> for the whole thing is very suspicious, especially 
for long-running code - see all the 1/4988 etc. lines in my original 
example.

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/


  reply	other threads:[~2012-10-24 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 10:08 David MENTRE
2012-10-24 10:33 ` John Whitington
2012-10-24 12:30   ` David MENTRE
2012-10-24 12:39     ` John Whitington
2012-10-24 12:45       ` Edgar Friendly
2012-10-24 12:53         ` John Whitington [this message]
2012-10-24 13:19       ` David MENTRE
2012-10-24 13:27         ` John Whitington
2012-10-24 13:38         ` Oliver Bandel
2012-10-24 14:30           ` David MENTRE
2012-10-24 15:09             ` David MENTRE
2012-10-24 16:07               ` AW: " Gerd Stolpmann
2012-10-24 17:23                 ` Martin Jambon
     [not found]               ` <1351094817.12207.11@samsung>
2012-10-25  6:48                 ` David MENTRE
2012-10-25  7:37                   ` David House
2012-10-24 10:38 ` Török Edwin
2012-10-25 10:06   ` David MENTRE
2012-10-25 10:16     ` Török Edwin
2012-10-25 10:19       ` David MENTRE
2012-11-07 11:52     ` David MENTRE

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=5087E4B3.1020707@coherentgraphics.co.uk \
    --to=john@coherentgraphics.co.uk \
    --cc=caml-list@inria.fr \
    --cc=thelema314@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).