Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Memory Profiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Memory Profiler
> I am looking for a memory profiler à la gprof for the native OCaml compiler.
> I would be interested by the memory consumption (let's say in bytes) of
> each function, something similar to gprof results but for memory. On your
> shelf ?

We do not have any such tools currently, but I agreee we need a memory
profiler!

There are two ways to go about it.  One is to count allocations, as
you propose.  This might be feasible by inserting counters (like
ocamlprof does) at allocation sites.

However, a point can be made that this is not what you want to know:
short-lived allocations consume time, but do not consume memory.  So,
the other direction os to profile live heap data (as a function of
time) and be able to trace it back to its allocation sites.  This is a
lot harder to do, and we currently do not know how to do this.
However, there has been interesting work in this direction for Haskell
(the work of Colin Runciman and colleagues) and also for Scheme
(Manuel Serrano's memory debugger for the Bigloo system).

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr