www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any interest in detailed GC traces

reply "safety0ff" <safety0ff.dev gmail.com> writes:
I found this link on reddit: 
http://dave.cheney.net/2014/07/11/visualising-the-go-garbage-collector 
and I was wondering if there was interest in having D's GC output 
detailed trace information.

I was thinking perhaps collecting data and then writing it as a 
json file when the process exits.

Thoughts?
Jul 11 2014
next sibling parent reply "Kiith-Sa" <kiithsacmp gmail.com> writes:
On Saturday, 12 July 2014 at 03:54:59 UTC, safety0ff wrote:
 I found this link on reddit: 
 http://dave.cheney.net/2014/07/11/visualising-the-go-garbage-collector 
 and I was wondering if there was interest in having D's GC 
 output detailed trace information.

 I was thinking perhaps collecting data and then writing it as a 
 json file when the process exits.

 Thoughts?
Would definitely like this. I even think something like this should be built in. (now if possible, it'd also be good to have a way to get Massif-like stats (i.e. which line has allocated how much at which moment), but that might take some work)
Jul 12 2014
parent "safety0ff" <safety0ff.dev gmail.com> writes:
On Saturday, 12 July 2014 at 11:06:10 UTC, Kiith-Sa wrote:
 Would definitely like this. I even think something like this 
 should be built in.
Sadly, I think this feature would require recompiling druntime because of overhead.
 (now if possible, it'd also be good to have a way to get 
 Massif-like stats
 (i.e. which line has allocated how much at which moment), but 
 that might take some work)
Massif's functionality can come in handy. Though, I'm not interested in implementing it.
Jul 12 2014
prev sibling parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 12.07.2014 05:54, safety0ff wrote:
 I found this link on reddit:
 http://dave.cheney.net/2014/07/11/visualising-the-go-garbage-collector
 and I was wondering if there was interest in having D's GC output
 detailed trace information.

 I was thinking perhaps collecting data and then writing it as a json
 file when the process exits.

 Thoughts?
Being able to visualize GC behaviour can be very helpful in analyzing what's going on during the execution of a program. When developing the precise GC presented at last years conference, I added a simple version of this by adding a hook that is called during collections. It wrote some GC info to a file for plotting the memory usage diagrams.
Jul 12 2014