Tom S schrieb:
You could try using an external non-intrusive profiler. If you compile your stuff with GCC on *nix, I've been hearing that kcachegrind is pretty awesome: http://kcachegrind.sourceforge.net/html/Home.html If you'd like to profile a DMD-Win-compiled executable, I've written a simple tool to do it which is similar to the Sleepy profiler: http://sleepy.sourceforge.net/ ( Sleepy doesn't work with DMD-made executables ): http://team0xf.com:1024/dprof/ ; if you compile Main.d and run it, passing the name of your executable as a parameter, it will attach to it (your app must be compiled with -g and without -O). Then it pauses the target thread a few thousand times a second, checking its register states and finding the currently executed function. The stats are gathered and when you hit Enter, you're provided with some info. The program is a pretty simple one and may not do what you'd like, however the actual profiler is a separate lib (dprof.Profiler) which could be used in a more sophisticated way. So far, I've used it to successfully optimize some ray-tracing code and remove a few bottlenecks from Hybrid.


There is also an advanced version of sleepy called verysleepy :-) (http://www.codersnotes.com/sleepy) and a commercial profiler called LTProf (http://www.lw-tech.com) using the same technique.


KlausO

Reply via email to