- 1 About
- 2 Using LazProfiler
- 3 How does it work
- 4 Known issues
- 5 Version History
LazProfiler is an IDE addon which adds a One-Click-Profiler to Lazarus.
- It's available on GitHub.
System Requirements / Dependencies
- FPC trunk (needs generics and additional PascalParser funktionality)
- Lazarus trunk (revision 56254 and above)
Download from here and install manually.
It depends on LCLExtension, EpikTimer and VirtualTreeView.
- Open your project (if not done already)
- Choose Profile from Run menu:
- Use your program
- Close your program
- study LazProfiler output:
Hints in source code
By default the profiling automatically starts.
If you just want to profile some parts of your code
you can surround it by two comments:
// start-profiler code_to_profile; // stop-profiler
How does it work
When profiling is started the following steps are done:
- project is build to test if project is okay
- all sources in the projects unit and include directories are backuped (except units below fpc and lazarus source directories)
- procedures and funtions in units are instrumented with special profiling code
- project is build with instrumented code
- instumented sources are deleted and backups are restored
- program is run with no debugger
- profiling result is shown when program ends
- Profiling does not stop counting at ShowModal, ShowMessage, ...
- Initial release
- leaving sources instrumented if compile after instrumenting fails
- checking if backup was successfully created before writing instrumented code to original file