New to profiling: dmd -profile; ldc2 --fdmd-trace-functions

Paul phshaffer at gmail.com
Fri Mar 31 16:52:30 UTC 2023


Thanks in advance for any assistance.

As the subject line states I'm just now trying to learn 
profiling.  I have a very small program with 1/2 dozen functions 
and would like to see where the cpu is spending the most time.

I've tried both of these lines with identical results:
**ldc2 --fdmd-trace-functions myprog.d**
**dmd -profile myprog.d**

The result is that no 'trace' files are generated....as far as I 
can tell.  When I run myprog.exe it generates no errors, runs 
very quickly, and does not do what it previously was doing.

**ldc2 --version**
**LDC - the LLVM D compiler (1.30.0-git-5fd86e5):**
**based on DMD v2.100.1 and LLVM 14.0.3**

**dmd --version**
**DMD64 D Compiler v2.100.2-dirty**


More information about the Digitalmars-d-learn mailing list