Skip to content
Snippets Groups Projects
Commit b0e78e76 authored by Rene Brun's avatar Rene Brun
Browse files

From Marian Ivanov and Anar Manafov:

Introduce a new package memstat for visualization of the memory usage.
This package is expected to evolve in the coming hours/days.
Principle:
Hook functions for alloc and free are used.
All calls to alloc (new) and free (delete) are catched and the statistical information is collected.
The information is collected per stack trace (Unique identifier and per functions). Following informations are collected as function of time:
    Total number of allocations 
    Total allocation size 
    Allocation count 
    Allocation size 

How to use it:
 Create memstat object
 TMemStat memstat(autoStamSize=10000, autoStampCount=1000);
      autoStamSize - The increase - decrease of size of memory after which stamps are generated  
      autoStampCount - The increase - decrease of memory allocation counter after which stamps are generated
User request for adding the named memory stamp is supported.

memstat.AddStamp("mystamp")

The file "memstat.root" is created after destruction of object.
This class supports following  functions for standard user:
     constructor - TMemStat memstat(filename)
     Report 
     Draw 
     SelectCode(libname, functionname)
     SelectStack() 

The various format options to draw a Graph  can be accessed calling
    TMemStat memstat;
    memstat.Report("?")

More info is available in the classes documentation.

Note that this new package is currently available on Linux systems.
It is not enabled by default. To enable it do
  ./configure --enable-memstat


git-svn-id: http://root.cern.ch/svn/root/trunk@24338 27541ba8-7e3a-0410-8455-c3a389f83636
parent 1afd200a
No related branches found
No related tags found
No related merge requests found
Showing
with 4079 additions and 0 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment