Sleepy is a C/C++ CPU profiler for Windows systems.
The original version is a bit lacking in many areas, so I’ve been doing some work on it.
My version (“Very Sleepy”) has a boatload of improvements in, such as call-graph profiling, an improved UI, load-save, GCC support, and 64-bit support.
It supports any native Windows app, if it has standard PDB or DWARF2 debugging information. No recompilation is necessary – it can just attach to any app as it’s running.
Sleepy is released under the GNU Public License, so you’re guaranteed the right to the source code and to change it how you wish.
version 0.82 – 1.4.2012
version 0.81 – 11.21.2011
version 0.8 – 11.15.2011
version 0.7 – 10.13.2010
version 0.6 – 8.8.2009
version 0.5 – 3.25.2009
version 0.4 – 4.10.2008
version 0.3 – 26.1.2008
version 0.2 – 26.7.2007
- 0.82 changes:
- Bugfix release – fixed crash with long symbol names causing a buffer overflow.
- 0.81 changes:
- Bugfix release – fixed crash on systems with non-English localisation.
- Added a crash reporter.
- 0.8 changes:
- Support for GCC/mingw. You can now profile executables with embedded DWARF2 data and it should work. No special options are required for this, just compile with “-g” to make sure you have symbols present. You may also wish to use “-fno-omit-frame-pointer” to ensure correct callstacks, although Sleepy will generally work either way. You don’t need to use “-pg” or any rubbish. It can even walk correct stacks between a Microsoft DLL into a GCC one, which was harder than you’d think.
- Symbol server support. Just click the ‘download’ button and it will automatically fetch any symbols from the configured symbol server (by default, Microsoft’s public server). You can select a different one from the options dialog.
- Unicode support, so you can now have unicode snowmen in your filenames.
- Pause and resume while capturing.
- Output from the DBGHELP library is now captured and displayed in a log window, to aid tracking down mysterious PDB errors.
- Sleepy will now automatically search in the same directory as the EXE when looking for PDB files, as well as in the configured symbol cache.
- Speed throttle, in case you wish to capture over a very long time with a lower profiler overhead.
- Fixed bug where it would not load on Windows 2000.
- Launching executables from inside Sleepy now has a higher chance of actually working.
- You can restrict the tree to start from a given subset, for example, if you’re only profiling one part of your program and want to throw out all the unrelated stuff. Just right-click on the symbol.
- Fixed a bug where the window settings could get screwed up sometimes.
- 0.7 changes:
- 64-bit support (hooray!). ×64 only, no Itanium.
- A new view for showing whole callstacks at once.
- Automatic collapsing of internal Windows kernel functions.
- More accurate time measurement when sampling deep callstacks.
- Profiling statistics (filename, date, duration, etc) are written into the .sleepy file.
- Syntax highlighting for the source view.
- Automatically find Microsoft CRT source paths.
- Added PID display to the process selector.
- Export data to a CSV file.
- Ability to select the working directory when launching an EXE.
- 0.6 changes:
- Stops correctly upon process/thread termination.
- Added ability to launch an EXE, both from the GUI and the command line.
- Thread picker list now shows the function each thread is executing.
- Fixed module sorting (thanks to aras-p).
- Debug privilege patch (again thanks to aras-p).
- New capture progress window.
- Fixed bug where red margin counts would often not add up to 100%.
- Fixed callees count for some recursive functions.
- Upgraded to latest DBGHELP.DLL.
- Fixed SuspendThread problem when debugger is attached.
- Added helpful hint for system calls.
- Unknown functions now get the address shown.
- Delete temporary capture files on exit.
- Fixed bug where high CPU load would kill profile sampling rate.
- Many threading improvements.
- Rewrote CallStack class to not allocate memory all over the place.
- 0.5 changes:
- multi-thread support
- 0.4 changes:
- you can sort columns (hooray!)
- better handling of recursive functions
- remembers window position, and other small tweaks
- (you’ll need to uninstall any old versions first, sorry)
- 0.3 changes:
- doesn’t throw an error if the process stops early
- better installer (installs correct CRT, I hope)
- 0.2 changes:
- revamped UI
- call-graph profiling