first version of a memory profiler
This commit is contained in:
parent
cf06131dec
commit
d43febf81e
8 changed files with 115 additions and 54 deletions
16
doc/estp.txt
16
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
|
||||
====================
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
================== =========================================================
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue