first version of a memory profiler

This commit is contained in:
Araq 2012-10-10 00:41:34 +02:00
commit d43febf81e
8 changed files with 115 additions and 54 deletions

View file

@ -28,6 +28,22 @@ the option ``--stackTrace:on`` is active! Unfortunately this means that a
profiling build is much slower than a release build.
Memory profiler
===============
You can also use ESTP as a memory profiler to see which stack traces allocate
the most memory and thus create the most GC pressure. It may also help to
find memory leaks. To activate the memory profiler you need to do:
* compile your program with the ``--profiler:off --stackTrace:on -d:memProfiler``
command line options
* import the ``nimprof`` module
* run your program as usual.
Define the symbol ``ignoreAllocationSize`` so that only the number of
allocations is counted and the sizes of the memory allocations do not matter.
Example results file
====================