diff options
author | Araq <rumpf_a@web.de> | 2012-10-10 00:41:34 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-10-10 00:41:34 +0200 |
commit | d43febf81e78ac79894ab136717c6100a5492b08 (patch) | |
tree | 451569132c56fb42c39313f81e7a8e895fff6376 /doc | |
parent | cf06131decb2d46304874bd243c29267876e0076 (diff) | |
download | Nim-d43febf81e78ac79894ab136717c6100a5492b08.tar.gz |
first version of a memory profiler
Diffstat (limited to 'doc')
-rw-r--r-- | doc/estp.txt | 16 | ||||
-rwxr-xr-x | doc/nimrodc.txt | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/estp.txt b/doc/estp.txt index 48df19739..58b788aa0 100644 --- a/doc/estp.txt +++ b/doc/estp.txt @@ -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 ==================== diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 117d226a6..8e43ce32c 100755 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -160,6 +160,7 @@ Define Effect for further information. ``nodejs`` The EcmaScript target is actually ``node.js``. ``ssl`` Enables OpenSSL support for the sockets module. +``memProfiler`` Enables memory profiling for the native GC. ================== ========================================================= |