From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2B77CBBAF for ; Tue, 5 May 2009 17:10:38 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8AAC/z/0nUnwdkjWdsb2JhbACCH5RXAQEBAQkJCgkPBroGhAEF X-IronPort-AV: E=Sophos;i="4.40,298,1238968800"; d="scan'208";a="25657957" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 May 2009 17:10:37 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKzz/0nUnw4R/2dsb2JhbACCH88chAEF Received: from pih-relay04.plus.net ([212.159.14.17]) by relay.pcl-ipout02.plus.net with ESMTP; 05 May 2009 16:10:37 +0100 Received: from [87.112.4.70] (helo=leper.local) by pih-relay04.plus.net with esmtp (Exim) id 1M1MI0-0007wO-Az for caml-list@yquem.inria.fr; Tue, 05 May 2009 16:10:36 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: memory profiling Date: Tue, 5 May 2009 16:17:54 +0100 User-Agent: KMail/1.9.9 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905051617.54283.jon@ffconsultancy.com> X-Plusnet-Relay: 2bf341990d9f36f51f363d4815049cf9 X-Spam: no; 0.00; ocaml:01 toplevel:01 allocating:01 fwiw:01 camlp:01 ocaml:01 run-time:01 2009:98 frog:98 wrote:01 wrote:01 caml-list:01 slower:02 override:03 christoph:04 On Tuesday 05 May 2009 15:39:21 Sylvain Le Gall wrote: > Hello, > > On 05-05-2009, Christoph Bauer wrote: > > Hi, > > > > what is the best option to do memory profiling with ocaml? > > Is there a patch of ocaml-memprof for 3.11.0? What about > > objsize? > > I use a more simple approach (though I have used objsize to estimate > some datastructure size, but only in the toplevel): GC allocation rate. > > You can override a little ocaml-benchmark to measure the allocation rate > of the GC. This gives you a pretty good understanding on the fact you > are allocating too much or not. FWIW, I automated the same approach using camlp4 and intend to write it up in the OCaml Journal. The results were quite good although run-time performance was seriously degraded (~50x slower) and it would have been nice to visualize the results in an IDE. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e