Bug with profiling GC with multiple threads/fibers

WebFreak001 d.forum at webfreak.org
Sun Apr 21 16:20:51 UTC 2019


I'm trying to GC profile serve-d which uses a lot of fibers 
potentially also across some threads and some threads doing some 
dedicated work, however -profile=gc doesn't seem to work 
properly. It logs `shared static this` calls and some methods, 
however none of the actual stuff is in there (and the total bytes 
allocated is way too small)

Here is the profilegc.log for reference: 
https://wfr.moe/feshNx/profilegc.log

When I call GC.stats I can see that it eventually has around 20 
MB allocated using the GC and I can also see in the resource 
monitor that it keeps allocating properly when using stuff

Also all the places where I would expect a GC allocation don't 
show anything in the profilegc.log then (like array modifications 
and just "new" in code that is definitely called)

In a simple minimal test case I can't seem to reproduce this 
behavior. Is there any way to check why it isn't profiling 
properly?

OS: Linux, DMD 2.085.1 (also reproducible by someone else)
Project: https://github.com/Pure-D/serve-d (run via code-d in 
vscode)


More information about the Digitalmars-d-learn mailing list