using viewcore to build a GC visualizer

125 views
Skip to first unread message

Aadhav Vignesh

unread,
Oct 17, 2022, 11:22:11 AM10/17/22
to golang-dev
I'm currently working on an interesting hobby project: a GC mark-and-sweep process visualizer. (inspired by Pusher's Go tricolor visualization)

I'm currently using viewcore to generate an object graph (a GraphViz object).

With viewcore in place, I still have the problem of utilizing the object graph for my tool - object liveness cannot be determined accurately, I can't seem to find a way to determine which objects might be collected in the future, which is crucial for the visualization.

I wanted to know if viewcore is meant for internal usage at Google, and would it be considered for future maintenance by the Go team? I'm currently using patched versions of viewcore and heapdump14 (for reading heap dumps).


Keith Randall

unread,
Oct 17, 2022, 11:42:48 AM10/17/22
to Aadhav Vignesh, golang-dev
On Mon, Oct 17, 2022 at 8:22 AM Aadhav Vignesh <aadh...@gmail.com> wrote:
I'm currently working on an interesting hobby project: a GC mark-and-sweep process visualizer. (inspired by Pusher's Go tricolor visualization)

I'm currently using viewcore to generate an object graph (a GraphViz object).

With viewcore in place, I still have the problem of utilizing the object graph for my tool - object liveness cannot be determined accurately, I can't seem to find a way to determine which objects might be collected in the future, which is crucial for the visualization.


viewcore only shows you live objects; objects which are unreachable in the object graph aren't reported.
You can compute the size of all collectable objects, but you can't list them individually.
(The breakdown command should let you know the bytes for all allocated objects. The size of the collectable objects are just that size minus the size of all objects listed.)
 
I wanted to know if viewcore is meant for internal usage at Google, and would it be considered for future maintenance by the Go team? I'm currently using patched versions of viewcore and heapdump14 (for reading heap dumps).


viewcore is supported, although we haven't always been very timely about that.
 

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/4704c577-8587-4610-9bd9-196dd94fdce3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages