Marian Ivanov, Anar Manafov ROOT - Memory checker Marian Ivanov, Anar Manafov
Outlook Motivation Code availability Example – run the checker Example – analysis of the memory checker output
Motivation (0) The check of the memory consumption very important for large project Several crisis in ALIROOT during the last years Standard tools (free software) Valgrind - memory consumption leaks at the end of process (e.g. aliroot) Massif – time profile of memory consumption Problems (Vagrind) Slow down factor ~ 50 ( few days for AliRoot simulation) Impossible to use for AliRoot project
Motivation (1) Root memory checker Originally developed by MI Much faster - slow down factor ~ 2-3 But, Had problems with loading of libraries on demand (current root, aliroot strategy) Did not provide dynamic memory information Problems to port it on 64 bit platform
New memory checker All (previously mentioned)problems removed Adding functionality for the visualization of the memory consumption as function of time (stamps) Possibility to select information by library, functions Sorting according different criterias (Current memory usage, Max, memory usage, maximal number of allocations..) Make reports for selected code Possibility to use as automatic test General remark Faster More functionality
Code availability Code availbale in Alisoft repository https://alisoft.cern.ch/memstat Installation example (last release version) svn co https://alisoft.cern.ch/memstat/tags/v0-01 cd v0-01 make source memstat_env.sh
Simple example See $MEMSTAT/test diretory root.exe .x test/run_test.C
TPC calibration example Initialization – In root prompt or macro gSystem->Load("$ROOTSYS/lib/libGui.so"); gSystem->Load("$ROOTSYS/lib/libTree.so"); gSystem->Load("$MEMSTAT/libMemStat.so"); TMemStat memstat(100000000,10000000,kTRUE); memstat->AddStamp("Start"); AliSysInfo::AddCallBack(TMemStatManager::GetInstance()->fStampCallBack); Code Create manager mgr->SetNSysInfo(100); mgr->StartAnalysis("local",chain); Output – memstat.root file to be visualized, analyzed
Simple example - Report with selected function
Simple example – Report full
Simple example - Draw draw->Draw()
Analysis example - Draw draw->Draw()
GUI Work in progress - all features to be integrated