I would like to visualize CPU usage of my Delphi application as a Flame Graph image. To make it work a periodical dump of the function names existing on the call stack is required. How can I make a dump of the application call stack in Delphi and map it to the function names?
I have tried to use the madStackTrace
unit from madExcept but calling its stackTrace()
function takes around 170ms on my computer which makes it a bad choice for taking probes multiple times per second. Maybe there is a way to dump the raw callstack adresses, and resolve them into function names in a later step?