CyberShadow / dmdprof

DMD compilation time profiler
https://blog.thecybershadow.net/2018/02/07/dmdprof/
Boost Software License 1.0
19 stars 4 forks source link

Function/aggregate/symbol names #2

Open John-Colvin opened 5 years ago

John-Colvin commented 5 years ago

It would be nice if we could get symbol names as well as line-col numbers.

CyberShadow commented 5 years ago

Have a look at the dmdprof_get_loc function at the top of dmdprof.py; you can make it look for a symbol name in the arguments it checks, in the same way it checks for location. (If you don't know where to start, just pause dmd randomly in gdb while it's compiling your code, then look at its stack trace, and figure out how to get the identifier from stack function arguments.)

Alternatively, you can change the linkify program to also emit links to files in your codebase, which would make inspecting the results easier.