Does LDC support profiling at all?

Prasun Anand prasunanand.bitsp at gmail.com
Tue Dec 26 08:43:59 UTC 2017


On Friday, 22 December 2017 at 09:52:26 UTC, Chris Katko wrote:
> DMD can use -profile and -profile=gc. But I tried for HOURS to 
> find the equivalent for LDC and came up with only 
> profile-guided optimization--which I don't believe I want. Yet, 
> if we can get PGO... where's the PROFILE itself it's using to 
> make those decisions! :)
>
> Thanks.

Hi Chris,

I think you might be looking for google perftools.
See:
  1. https://github.com/prasunanand/gperftools_d/
  2. https://github.com/gperftools/gperftools

I have been using gperftools_d a lot to profile my code and 
optimize.It generates really
cool 
[graphs](https://github.com/prasunanand/gperftools_d/blob/master/examples/profile.pdf).

If you need PGO, you can look here for reference:
https://github.com/prasunanand/faster_lmm_d/blob/master/Makefile#L122

Let me know if this helps or you face any issues using 
gperftools_d.

Regards,
Prasun


More information about the Digitalmars-d-learn mailing list