Profiling DMD's Compilation Time with dmdprof

Basile B. b2.temp at gmx.com
Sun Nov 18 04:38:57 UTC 2018


On Sunday, 18 November 2018 at 01:12:04 UTC, Vladimir Panteleev 
wrote:
> On Saturday, 17 November 2018 at 23:01:23 UTC, Basile B. wrote:
>> I put a start to the project then today i remembered 
>> callgrind...
>> What are the pros and cons in comparison with callgrind ? By 
>> coincidence i had to callgrind dmd today and got answers to a 
>> performance issue in a very straight forward way because for 
>> example:
>>
>>     $ valgrind --tool=callgrind generated/debug/dmd somefile.d
>>
>> is very simple procedure and produce a file that's easy to 
>> interpret in kcachegrind (which can then also produce a graph 
>> in ps format). Note that i don't try to discredit your work, 
>> i'm just curious to know.
>
> It sounds like you misunderstood the purpose of dmdprof.
>
> dmdprof will show you a profile graph of the source code *being 
> compiled* (i.e. which parts take more time to compile and which 
> parts cause other parts to get compiled), not of DMD source 
> code.

Damn, you're right. Actually i didn't try your stuff at all and 
instead used callgrind intuitively. Bad advice was here: 
https://github.com/dlang/dmd/pull/8945#issuecomment-439388332. 
Also along the thread there was discussion about building DMD and 
one saying that DMD had not been profiled for ages.


More information about the Digitalmars-d-announce mailing list