LDC2 and classic profiling
    Denis Feklushkin 
    feklushkin.denis at gmail.com
       
    Sat May 11 11:34:35 UTC 2019
    
    
  
On Saturday, 11 May 2019 at 09:12:24 UTC, Johan Engelen wrote:
> Those calls are to templated functions I presume?
No
> instantiated in your program and hence instrumented)
>
>> Also I changed flags to "dflags-ldc": 
>> ["-fprofile-instr-generate", "-O0"] - second flag disables 
>> optimisation (I assumed that optimizations magically 
>> completely remove calls to my functions. But this is probably 
>> not the case.)
>
> No, indeed, -O0 doesn't (shouldn't!) matter.
Ok.
> It is strange that you don't see calls to your functions. Just 
> to verify, could you compile a simple program manually (without 
> dub) and verify that you see calls to your own functions?
Tried, and it works!
> Lambdas should also be instrumented, so please test that.
Works on simple program too.
> By the way, if you are on linux, then XRay should work like 
> with clang ( -fxray-instrument )
Tried it, and xray also does not returns any info about my own 
functions...
    
    
More information about the Digitalmars-d-learn
mailing list