Search code examples
performanceprofilerprofilingaqtime

How Does AQTime Do It?


I've been testing out the performance and memory profiler AQTime to see if it's worthwhile spending those big $$$ for it for my Delphi application.

What amazes me is how it can give you source line level performance tracing (which includes the number of times each line was executed and the amount of time that line took) without modifying the application's source code and without adding an inordinate amount of time to the debug run.

The way that they do this so efficiently makes me think there might be some techniques/technologies used here that I don't know about that would be useful to know about.

Do you know what kind of methods they use to capture the execution line-by-line without code changes?

Are there other profiling tools that also do non-invasive line-by-line checking and if so, do they use the same techniques?


Solution

  • This is just speculation, but perhaps AQtime is based on a technology that is similar to Microsoft Detours?

    Detours is a library for instrumenting arbitrary Win32 functions on x86, x64, and IA64 machines. Detours intercepts Win32 functions by re-writing the in-memory code for target functions.