How accurate is dmd profile? (and do I need GMD/LDC to use gprof?)

max haughton maxhaton at
Sun Oct 3 16:20:58 UTC 2021

On Sunday, 3 October 2021 at 08:31:14 UTC, Chris Katko wrote:
> Does it break down on multi-threaded scenarios?
> I'm running dmd (newest) + Allegro (a C game programming 
> library) with DAllegro (a nice templated binder). My executable 
> is multi-threaded (mostly just helper functions / glue logic 
> from libraries/D/etc), and using OpenGL on 64-bit Linux with a 
> very recent DMD release.
> [...]

Unless your profiler does call stack sampling (which I don't 
think gprof or dmd does), don't use it. They're not reliable 
unless you are doing very targeted profiling.

For profiling code, if you're on an Intel, vTune is top dog. 
Nothing else is as good.

More information about the Digitalmars-d mailing list