English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
memory profiling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-05-05 (15:10)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Re: memory profiling
On Tuesday 05 May 2009 15:39:21 Sylvain Le Gall wrote:
> Hello,
> On 05-05-2009, Christoph Bauer <christoph.bauer@lmsintl.com> 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.