Does LDC support profiling at all?
Johan Engelen
j at j.nl
Sat Dec 23 12:23:33 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! :)
Fine grained PGO profiling:
-fprofile-instr-generate
http://johanengelen.github.io/ldc/2016/07/15/Profile-Guided-Optimization-with-LDC.html
Function entry/exit profiling:
-finstrument-functions
https://github.com/ldc-developers/ldc/issues/1839
https://www.youtube.com/watch?v=LNav5qvyK7I
I suspect it is not too much effort to add DMD's -profile and
-profile=gc to LDC, but noone has done it yet.
Another thing that is relatively easy to add to LDC:
https://llvm.org/docs/XRay.html
-Johan
More information about the Digitalmars-d-learn
mailing list