From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 63B147EC41 for ; Wed, 24 Oct 2012 14:53:14 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=pra; client-ip=188.64.186.31; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=mailfrom; client-ip=188.64.186.31; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@bluemoon3.ukhost4u.com) identity=helo; client-ip=188.64.186.31; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="postmaster@bluemoon3.ukhost4u.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQBAELkh1C8QLofgWdsb2JhbABEwXwjAQEWJieCHgEBBThAARALBwcKCRMDDwkDAgECAUUGDogNuymLYCKGSQOpHA X-IronPort-AV: E=Sophos;i="4.80,639,1344204000"; d="scan'208";a="160239355" Received: from bluemoon3.ukhost4u.com ([188.64.186.31]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2012 14:53:13 +0200 Received: from 78-105-203-81.zone3.bethere.co.uk ([78.105.203.81]:55659 helo=feast.lan) by bluemoon3.ukhost4u.com with esmtpa (Exim 4.80) (envelope-from ) id 1TR0N7-0003ey-Bu; Wed, 24 Oct 2012 13:47:48 +0100 Message-ID: <5087E4B3.1020707@coherentgraphics.co.uk> Date: Wed, 24 Oct 2012 13:53:07 +0100 From: John Whitington User-Agent: Postbox 3.0.5 (Macintosh/20120826) MIME-Version: 1.0 To: Edgar Friendly CC: caml-list@inria.fr References: <5087C409.3030203@coherentgraphics.co.uk> <5087E16C.8020503@coherentgraphics.co.uk> <5087E301.2090201@gmail.com> In-Reply-To: <5087E301.2090201@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluemoon3.ukhost4u.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement? Hi, Edgar Friendly wrote: > On 10/24/2012 8:39 AM, John Whitington wrote: >> David MENTRE wrote: >>> >>> [2] 84.6 0.03 449.61 caml_call_gc [2] >>> 0.00 449.61 755484/755484 caml_garbage_collection [3] >> 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 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/