summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-10-10 00:41:34 +0200
committerAraq <rumpf_a@web.de>2012-10-10 00:41:34 +0200
commitd43febf81e78ac79894ab136717c6100a5492b08 (patch)
tree451569132c56fb42c39313f81e7a8e895fff6376 /doc
parentcf06131decb2d46304874bd243c29267876e0076 (diff)
downloadNim-d43febf81e78ac79894ab136717c6100a5492b08.tar.gz
first version of a memory profiler
Diffstat (limited to 'doc')
-rw-r--r--doc/estp.txt16
-rwxr-xr-xdoc/nimrodc.txt1
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.
 ==================   =========================================================