'Sleepy' is a non-invasive profiler for the Windows platform that allows statistical profiling of C++ applications through sampling the instruction pointer register. Sleepy presents results in a GUI built with wxWindows.

The Sleepy profiler uses a technique where the profiler runs in a different thread from the target program. Every 1ms or so, the profiler thread suspends the target thread, and pulls out the current instruction pointer register value from the thread context. These mem addresses are resolved into procedure names and line numbers using debug information. This allows line-level resolution, without making any changes to the target program. The only requirement is that the target program is compiled with (MS) debug information

Sleepy uses the MS Debug Help (dbghelp) library to read debug information, and is therefore limited to the debug info formats that dbghelp can understand. As far as I know, debug information produced by non-MS compilers such as GCC will not be understood, and therefore such code cannot be profiled.

Current Limitations

Any coders out there should feel free to add this stuff in and send the patch to me :)

SourceForge project page

Web CVS view

Download Sleepy

Source as a .zip

If you don't want to use CVS, you can grab the v0.1 source as a zip here. It comes with a Visual Studio .Net solution as well.

Screens

Nick Chapman, nickamy@paradise.net.nz
Home