Log of /trunk/misc/memstat/src/TMemStat.cxx
Parent Directory
Revision
37063 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 29 13:00:55 2010 UTC (4 years, 1 month ago) by
brun
File length: 6765 byte(s)
Diff to
previous 36382
Several changes to support the allocation mechanism under SLC5 and more than 4 GBytes of RAM.
The analysis class TMemStatShow can now restrict itself to a subset of the address range or/and
entry range in the data Tree if the machine where the analysis is run does not have enough memory.
You can restrict the address range to be analyzed via TMemStatShow::SetAddressRange
You can restrict the entry range to be analyzed via TMemStatShow::SetEntryRange
the option "gnubuiltin" is not anymore the default in TMemStat.
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: 6592 byte(s)
Diff to
previous 36362
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
36362 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 16 17:23:52 2010 UTC (4 years, 3 months ago) by
brun
File length: 5858 byte(s)
Diff to
previous 36354
More improvements in TMemStat::Show
//
// TMemStat::Show creates 3 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.
//
// -In canvas3 it displays the histogram of the nbigleaks largest leaks (default is 20)
// for each leak, the number of allocs and average alloc size is shown.
//
//
// Simply do:
// root > TMemStat::Show()
// or specifying arguments
// root > TMemStat::Show(0.01,20,"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 nbigleaks.
// The third 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
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: 5617 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: 4656 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: 2543 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.
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.