From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4C31BBC57 for ; Thu, 15 Apr 2010 02:40:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BAMb8xUtCbwQakWdsb2JhbACbWxUBAQEBCQsKBxEEHr14BYUNgy0 X-IronPort-AV: E=Sophos;i="4.52,208,1270418400"; d="scan'208";a="48503703" Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 15 Apr 2010 02:40:32 +0200 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 9C722EA902; Wed, 14 Apr 2010 20:40:31 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 14 Apr 2010 20:40:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=AdUK8BZFB+xZDG6Z4T6VRsQsttI=; b=jcH3dQaosMKsLxME9WBvmRJr5wfhlU2FEY+q6oIfd0fgheWsXzWJwQ39i6iucK6Zm536CpgtdIMb/Ruku80O0+ARUCwEvf3CpdVOiQqeStN0LZRaAokw3EKE7t4gwRIgOFlM5H/+4wkZCAJX+2tr7UWIqq7TJRPtkkwnZBJ04qs= X-Sasl-enc: x5cUwVh8W06Hmv6UGkvCxHTH51zGXXFM6UXwEiLnzomO 1271292031 Received: from [192.168.1.61] (64-71-1-162.static.wiline.com [64.71.1.162]) by mail.messagingengine.com (Postfix) with ESMTPSA id F046D3DEF6; Wed, 14 Apr 2010 20:40:30 -0400 (EDT) Message-ID: <4BC6607D.2090806@ens-lyon.org> Date: Wed, 14 Apr 2010 17:40:29 -0700 From: Martin Jambon User-Agent: Thunderbird 2.0.0.22 (X11/20090908) MIME-Version: 1.0 To: Kaspar Rohrer Cc: Richard Jones , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap References: <3FB04EDC-37F4-4336-A435-13ACF038051D@gmail.com> <20100414224529.GA24089@annexia.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ens-lyon:01 ocaml:01 graphviz:01 graphviz:01 blog:98 wrote:01 wrote:01 graph:01 graph:01 heap:01 caml-list:01 jambon:01 jambon:01 closure:01 output:02 Kaspar Rohrer wrote: > On Apr 15, 2010, at 12:45 AM, Richard Jones wrote: >> Graphviz output is interesting, but I would add that such a thing >> exists as the 'Std.dump' function in extlib. > > The last time I've checked, Std.dump had several shortcomings. It did not handle cycles in the object graph that well (that's probably an understatement, it did not print much information about some value types (e.g. custom, closure). > I tried to remedy that in my library. I also do not try to interpret the values (e.g. lists are printed as either 0 or (BL0#2 hd tl) ). The library simply dumps the object graph, with references or links where appropriate or needed. > > I will go into more detail if anybody is interested, but right now I just want to get the code out there. > > In the meantime, there are two sample pictures of graphviz dumps on my personal blog: http://lambdamuesli.blogspot.com/ (I apologize for the shameless plug) By the way, there is also Dum, which takes care of cycles. No graphviz/dot output though: http://oss.wink.com/dum/ Martin -- http://mjambon.com/