Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Inspect and dump values on the OCaml heap
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-04-15 (00:40)
From: Martin Jambon <martin.jambon@e...>
Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap
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: (I apologize for the shameless plug)

By the way, there is also Dum, which takes care of cycles. No graphviz/dot
output though: