DMD profiler very slow

Clemens Hofreither clemens.hofreither at gmx.net
Sat Jul 12 09:25:41 PDT 2008


Koroskin Denis Wrote:

[....snip....]

> >
> > Hm, something like that might be doable, though it's certainly annoying.  
> > Can I compile some modules with "-profile" and some without, and the  
> > linker will "do the right thing"?
> >
> > -Clemens
> 
> Yes, you can. Some module will get instrumented, while others wont.
> You can have a look into profiler implementation in phobos/internal/trace.d
> 
> You can write your own implementation, too!

Hm, that's very interesting, I had no idea that part was open source. I'm a bit unclear on how it all fits together though, especially since I use Tango. I'm guessing the compiler inserts calls to certain functions in trace.d if it is invoked with the "-profile" switch? If so, where does that object code reside in my dmd installation? My dmd/import/std directory contains only very little stuff, and this doesn't seem to be there. So I'm guessing it must be in dmd/lib, but there is no phobos.lib there. Is that part compiled into one of the Tango libraries when I use Tango? If so, shouldn't that code be in the Tango repository somewhere too? Couldn't find it there, either.

Sorry for that slew of questions...

-Clemens



More information about the Digitalmars-d mailing list