[root] / trunk / misc / memstat / inc / TMemStat.h Repository:
ViewVC logotype

Log of /trunk/misc/memstat/inc/TMemStat.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 36382 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 20 12:27:40 2010 UTC (4 years, 3 months ago) by brun
File length: 1103 byte(s)
Diff to previous 36354
Add a new control argument to TMemStat
// When TMemStat is active it recors every call to malloc/free in a ROOT Tree.
// You must be careful when running jobs with many millions (or more) of calls
// to malloc/free because the generated Tree may become very large.
// The TMemStat constructor TMemStat(const char* system, Int_t buffersize, Int_t maxcalls)
// has its 3 arguments optional:
//   -system refers to the internal algorithm to compute the back traces.
//    the recommended value is "gnubuiltin"
//   -buffersize is the number of calls to malloc or free that can be stored in one memory buffer.
//    when the buffer is full, the calls to malloc/free pointing to the same location
//    are eliminated and not written to the final Tree. The default value 100000
//    is such that between 50 and 90% of the calls are eliminated depending on the application.
//    You can set buffersize <=1 to keep every single call to malloc/free.
//   -maxcalls can set a limit for the maximum number of calls to be registered in the Tree.
//    The default value is 5000000.
// The 3 arguments can be set  in $ROOTSYS/etc/system.rootrc
//    Root.TMemStat.system      gnubuiltin
//    Root.TMemStat.buffersize  100000
//    Root.TMemStat.maxcalls    5000000

Revision 36354 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 14 15:31:50 2010 UTC (4 years, 3 months ago) by brun
File length: 1083 byte(s)
Diff to previous 35660
Start implementing the histogram of leaks sorted by size

Revision 35660 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 14:02:09 2010 UTC (4 years, 4 months ago) by brun
File length: 1063 byte(s)
Diff to previous 35621
The class TMemStat can now be controlled via system.rootrc by activating
Root.TMemStat 1
This way any existing ROOT application becomes trivial to run instrumented
with TMemStat.

Revision 35621 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 07:55:59 2010 UTC (4 years, 4 months ago) by brun
File length: 1011 byte(s)
Diff to previous 35352
The code previously in the tutorial/memstat/memstat.C has been moved to a class TMemStatShow.
This class is called via CINT from the new static function TMemStat::Show.
The new documentation explaining how to use TMemstat and visualize the results is now:

// TMemStat records all the calls to malloc and free and write a TTree
// with the position where the memory is allocated/freed , as well as
// the number of bytes.
//
// To use the class TMemStat, add the following statement at the beginning
// of your script or program
//     TMemStat mm("gnubuiltin");
// or in an interactive session do something like:
//    root > TMemStat mm("gnubuiltin");
//    root > .x somescript.C
//    root > .q
//
// The file collected by TMemStat can be analyzed and results shown
// by executing the static function Show.
//
// TMemStat::Show creates 2 canvases.
// -In canvas1 it displays a dynamic histogram showing for pages (10 kbytes by default)
//  the percentage of the page used.
//  A summary pave shows the total memory still in use when the TMemStat object
//  goes out of scope and the average occupancy of the pages.
//  The average occupancy gives a good indication of the memory fragmentation.
//
// -In canvas2 it displays the histogram of memory leaks in decreasing order.
//  when moving the mouse on this canvas, a tooltip shows the backtrace for the leak
//  in the bin below the mouse.
//
// Simply do:
//   root > TMemStat::Show()
// or specifying arguments
//   root > TMemStat::Show(0.01,"mydir/mymemstat.root");
//
// The first argument to Show is the percentage of the time of the original job
// that produced the file after which the display is updated. By default update=0.01,
// ie 100 time intervals will be shown.
// The second argument is the imput file name (result of TMemStat).
// If this argument is omitted, the script will take the most recent file
// generated by TMemStat.

Revision 35352 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 17 09:39:54 2010 UTC (4 years, 4 months ago) by brun
File length: 944 byte(s)
Diff to previous 32847
Add functions TMemStat::Enable and TMemStat::Disable that call the same functions
in TMemStatMng such that only TMemStat is seen by a user if he wants to control
the parts of the program to be monitored.

Revision 32847 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 31 10:29:17 2010 UTC (4 years, 9 months ago) by anar
File length: 891 byte(s)
Diff to previous 32666
cosmetic changes: coding convention and formatting...

Revision 32666 - (view) (download) (as text) (annotate) - [select for diffs]
Added Thu Mar 18 07:08:15 2010 UTC (4 years, 10 months ago) by rdm
File length: 898 byte(s)
new memstat module from Anar.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9