From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA30119; Mon, 12 Mar 2001 12:00:53 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA30096 for ; Mon, 12 Mar 2001 12:00:52 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2CAxmH20058; Mon, 12 Mar 2001 11:59:48 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA30092; Mon, 12 Mar 2001 11:59:48 +0100 (MET) Date: Mon, 12 Mar 2001 11:59:48 +0100 From: Xavier Leroy To: Pascal Brisset Cc: caml-list@inria.fr Subject: Re: [Caml-list] Memory Profiler Message-ID: <20010312115948.A29585@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: ; from brisset@recherche.enac.fr on Tue, Mar 06, 2001 at 06:25:29PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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